Project Planner Functions in AnalytiCalc I want a function (lexically it probably needs to be a command in the * command arg:arg:arg style) or more likely a SET of commands that will handle project planning in a way the current PPLN*.* templates can't. Idea is to build a project data structure in a scratch area of the sheet (so it can be saved/loaded). Then a FUNCTION set needs to be present for things like: "is this activity on the critical path?" and "when does this activity start" or "when does this activity end", or alternatively this could be stored in documented locations in the scratch area (probably better so done, as it allows postprocessing by other programs.) The main difference is introduction of RESOURCES, so that a new activity can be done whenever: 1. It can get the resources it needs, AND 2. Its precondition activities are done. (For instance, one can put on a shoe when the shoe is available and a sock is put on. There are many examples, but the most common is probably people.) The ppln models assume only 2, not 1. Several functions seem to be needed. 1. Add this activity to the model 2. Compute start date of this activity 3. Compute critical path and flag. (I'm presuming end date is start date + duration.) Each activity needs: Act'y name Duration precondition activities (must wait till end of all of these before this activity can start) Resources needed: name, amount (or address, amount) We can use the ppln trick to get an initial start date from preconditions. Then we must check resource use. The current model of one activity per row may be usable. Extend to using lots of columns out beyond the normally viewed area to allow save/restore of data. To add an activity, record preconditions, resources / amounts needed, and duration. Save cells for amounts of resources held, but do this in the computation using some scratch areas that can be re-used...only need as many cells as resources supported. To compute timing: Get initial start date using max end date of all precondition acty's. Compute these dates w/o resources first until no dates change, and sort the list by increasing start date, so that computation will be in this order also. For each resource the activity needs, See if enough exists at resource table. If so, decrement that amount by what's required and mark that resource as present. If not enough there, search other activities to see which have resource allocated. Find activity with earliest end date and bump our start date to then, and increment our resources by what's needed. If more needed, find activity with next earliest end date and grab what's needed. Keep going until we have enough. During this computation, record resource-precondition activities found so they will be available for critical path. When all resources are allocated, mark OUR end date as our start date plus our duration. To compute critical path, Find last end date That activity is on C.P. Find last end date of preconditions. That activity is on critical path also. Continue to search for last end date of precondition of activities on crit. path. Should allow ties to all be on critical path. Permit some sorting option or at least output in time order somehow so that paths can be sorted as needed...possibly by an exterior program.