One of the common uses for conditional Containers is to simulate projects. In particular, a conditional Container is used to simulate a task in a project (that starts and completes), with, for example, the start or completion of one task triggering other tasks. A simple example which illustrates the use of conditional Containers to simulate projects (ProjectSimulation.gsm) can be found in the Containers subfolder of the General Examples folder of your GoldSim directory (accessed by selecting File | Open Example... from the main menu). Let’s explore that model briefly here.
This simple project consists of two tasks:
The Conditionality tab for the first task looks like this:
If you press the Activation… button you will see that the task starts immediately (when the Model activates). If you press the Deactivation... button you will see two different triggers:
The first simply says the task deactivates when the simulation ends. The second uses an “At Duration” trigger. GoldSim keeps track of how long the Container has been active (the Duration) and this trigger is pulled when the Duration exceeds the specified input (in this case, Task_Duration).
If we look inside the Task1 Container, we see that what is calculated inside is simply the Task_Duration and the Cost:
The Duration is sampled from a distribution when the task is activated. A fixed and variable cost are also sampled from distributions when the task is activated. The variable cost is accumulated while the task is active. In addition, three “problems” are defined that may occur while the task is active. If they occur, they instantaneously increment the cost and duration.
Note that on the Conditionality tab for Task1 is a field labeled Treat deactivation as completion if this condition is true. In this case, it is set to True, so that all deactivations are treated as completions. However, it is possible to deactivate a task without completing it (e.g., if the task runs out of money), and this can have important implications on the rest of the project.
In fact, if we go to the Conditionality tab for Task2 and press the Activation… button we see the following trigger:
Note that Task2 starts when Task1 completes. This is why specifying whether or not a deactivation is a completion is important. If Task1 was defined in such a way that it could deactivate without completing, Task2 would not always start upon deactivation of Task1.
Task2 is defined in a similar manner to Task1 in terms of determining its duration and cost.
The Results Container displays probabilistic results for total cost and duration for the project:
This is a very simple example of project simulation. By using the various features of conditional Containers and GoldSim’s discrete event features you can represent much more complex projects. As one example, you could trigger Task2 to start 30 days after Task1 starts (or completes) by using an Event Delay.
Learn more about: