Dynamic Run-Time Model Building and Analysis

From Support

Jump to: navigation, search

SIGMA lets you interact with a model during a simulation. You can alter your model in virtually any way you wish while it is running! For example, with a running model, you can change an edge condition or delay time expression by double-clicking on the edge and making the necessary changes in the dialog box. If you do the same to a vertex, you can modify the state changes or displayed variables. You can change the run mode by making changes in the Run Options dialog box during a run. You can even add and delete edges or event vertices during a run.

Changing a simulation during execution is simple: just make the changes as if the model were not
running!

Changing the Value of State Variable Values During a Run

To illustrate the usefulness of changing variable values during a run, we will examine a simple model of a multiple-server single-line queue such as that found in an airport check-in lineā€”AIRPORT.MOD. If you open AIRPORT.MOD, your screen should look like the one below. (This model is very similar to BANK1.MOD but an INPUT vertex has been added.)

A Multi-Server Queueing Model - AIRPORT.MOD
A Multi-Server Queueing Model - AIRPORT.MOD

Start this simulation. Watch the queue increase for a few seconds in the simulation plot window. Next, double-click on the INPUT vertex; it will not have executed since it is not connected to the graph. The Edit Vertex dialog box for the INPUT event should look like the one below.

The Dialog Box for the INPUT Vertex
The Dialog Box for the INPUT Vertex

When you click on the Execute button in an Edit Vertex dialog box during a run, that vertex will be the next event executed. State changes for this vertex will then occur. Try this by pressing Execute in the INPUT vertex. You will see the QUEUE jump to 10 in the simulation plot, and the number of idle servers will be reset to 6. Continue to increase the number of idle servers in the running model until the system appears to stabilize. Do this by repeatedly editing and executing the state changes for the INPUT event. Note that in this model the variable, SERVERS, is defined as the number of idle servers. Thus, servers that are busy will stay in the system; only the QUEUE and number of idle servers are changed.

To delete servers, double-click on the LEAVE vertex and close the resulting dialog box with the Remove button. This will remove the next pending LEAVE event, effectively removing one busy server.

The Execute and Remove commands buttons at the bottom of the Edit Vertex dialog box are useful for executing an event or removing an event from the future events list during a run. Since the executed event can itself schedule or cancel other events, this gives complete run-time control over the future events list.

It is good practice to include an isolated empty vertex, like the INPUT vertex in this example, for making variable changes during a run. You could use the ASK{} function discussed in Functions to do the same thing. However, that function is more for interactive games, where you want to prompt the model user to make a decision during a run.

NOTE: Change the values of variables during a run to feasible values. For example, you can change
QUEUE to a negative number if you wish; however, it makes no sense to have a negative number of
customers in line.

Changing Edges and Vertices During a Run

Now try double-clicking on the self-scheduling edge for the ENTER event.You can change the time between arrivals by editing the delays time in the Edit Edge dialog box. The changes you enter will take effect as soon as you press OK. You make change to vertices similarly, just as if the model were not running. Again, changes take effect the next time the vertex is executed in the run, or you can force the vertex to execute immediately by clicking on Execute on the dialog box. In this manner you can ask "what-if" questions concerning changes in demand rate and number of servers while the model is running.

Adding and Deleting Edges and Vertices During a Run

To delete an edge click once on the particular edge and then press [Delete]. (This should be done carefully since you are now changing the model logic not just the values of variables.) Delete vertices the same way, by clicking once on the vertex you wish to delete and pressing [Delete].

CAUTION: Adding or deleting edges or event vertices during a run may change the model logic.

You can connect a vertex to a running model or create a new edge. First click on the vertex that is to serve as the origin of the new edge. Next, click the right mouse button to get into Create Process mode. Then click where you would like to have a new vertex created. (Click on an existing vertex if you want only a new edge.) Continue clicking if you would like to spawn a series of new vertices and edges off an existing vertex. Press the right mouse button again to return to Select or Edit mode. Click on the new edges or vertices to open their dialog boxes. You will generally alternate right and left mouse clicks as you add new vertices and edit them in a running model.

NOTE: Do not try to delete a vertex while there are grouped vertices in the model. See Animations for a discussion of vertex groups.


Back to Building Models

Personal tools
Navigation