How to define resources for a task
The dependencies between tasks in an ASM model, coupled with the tasks' preconditions, govern when tasks are allowed to start according to information dependencies. This can be supplemented with resource requirements, in which tasks that could be executed concurrently if resource were unlimited are forced into a sequence during simulation (this simulates the situation in which a given resource - eg. a designer - must choose between multiple tasks to determine which one is done first).
- To create resource constraints, first use the 'Resource group' node in the project-explorer tree displayed on the left-hand pane of CAM window, to create the list of resources in the model. Each resource can be assigned to have a certain number, which is available during simulation. For instance, if the 'default availability' is 2, this implies that only 2 tasks that require 1 unit of the resource can be attempted simultaneously. Also the default availability can be defined in terms of user-defined process variables or as a user-specified function which may reference the variables.
- To assign the resource to tasks, use the resources tab of the task properties dialog. Enter the number of units of the resource that are required to start the task (usually, 1, but see also the comments on fractional resources below). You can define units as numerical values or in terms of user-defined process variables or as a user-specified function which may reference the variables. If you enter multiple resource requirements, all of them must be available to start the task.
When a choice must be made between tasks that are available to start at a certain time according to their preconditions, but those tasks compete for the same limited resource, the priority function located on the 'resources' tab of the ASM task properties dialog) is used to find the highest priority task, which will be started first. The others must then wait until the task completes, at which point the competition for resource begins again. A function of the process variables may be entered in the priority function, or just a number (if one task is always prioritised over another).
How to account for the difference between calendar days and working days using resource calendars
A common requirement is to set up a simulation such that tasks can only be worked on for 8 hours a day, and not at all during weekends. There are two ways to approach this:
Option 1: Assign a resource to each task (could be the same resource, with many units available if you dont want to limit concurrency). Then, set up the resource to have the calendar "Default (UK)" instead of "24hr". You cansee by double-clicking the calendar icon shown in the sidebar tree that this allows the resource to work only 8 hours a day instead of 24, and allows no work at all on the weekend. Then, if you set up your task durations appropriately (ie. specify units of "Day (8hr)" instead of "Day (24hr)"), the software will do the calculations for you. You can rename the axis on the histogram manually, by clicking the button "Population plot properties" just to the right of the "View" label at the top of the sidebar when the plot is active. There is an option under the tab "Display" in the dialog to edit the label.
Option 2: Do the calculations manually when you enter the task durations, by multiplying every duration by 3. Thus, if a task took 4 hours, that is equal to 50% of a normal 8hr working day, yet only 15% of a 24hr calendar day. So you would multiply 4hr (or whatever the duration was) by 3, in this case entering 12 hours into the task duration field instead. You might want to take non-working weekend days into account in the multiplying factor. If a task's duration is measured in working days, you could just use the number of days, but make sure that the unit is "Day (24hr)" instead of "Day (8hr)".
About fractional resources and prioritisation
You can enter decimal values in the 'units' field for a task's resource requirement to assign fractional resource to a task.
Note that the resourcing model is currently not 'smart'. When two or more tasks compete, it will first find the competing task with highest priority (in the 'resources' tab of the task properties dialog - or randomly if they all have the same priority). It will then assign the required amount of resource, until the task is complete (duration is independent of the resource units required). If another task needs the resource, it will have to wait until the first is finished. However, it has to have all the resource it needs before it can start; you cannot make it automatically, eg. take 10 days for 100% resource or stretch to 20 days with 50% resource. Thus, in the case explained above, starting the 30% task will prevent any other task that needs more than 70% of the same resource from being executed simultaneously.