The model of a system, following the process-oriented approach is composed of two kinds of information: the flowchart diagram and the experimental data.
In this document the construction of a new model, with both components, will be detailed.
The first step to construct a new model is to create a new Modelica model that extends the SIMANLib.Draft model.
model tutorial extends DESLib.SIMANLib.Draft; equations end tutorial;
The flowchart diagram represents the possible flows of entities in the system. These flows can be described in SIMANLib using the Blocks package.
The flow of entities must start in one or more Create blocks, and usually end in a Dispose Block
(other possible places for entity diposal are the balk port of a Queue and the end of a BRule).
In order to construct the flowchart diagram, the blocks have to be included from the Blocks package into the diagram of the newly created model.
After that, the ports of the included blocks have to be properly connected.
The flowchart diagram of a single server with queue system is shown in the next figure.
The parameters of each block has to be defined to represent the behavior of the system (e.g. the inter-arrival times, the processing delays, capacity of the queue, etc.).
If an algebraic loop is inserted in the diagram (i.e. the output of one block is connected to a previous block in the flowchart diagram, creating a loop), it can be broken using the BreakLoop model of the DEVSLib library.
An example of this situation is given in the model P3_2.
To complete the development of the model, the experimental data has to be included.
This can be performed in SIMANLib by inserting elements from the Elements package into the diagram of the model.
The elements required by the single server with queue model are shown in the next figure.
The parameters of each element has also to be defined to represent the behavior of the system (e.g. ordering policy of the queue, capacity of the resource, etc.)
Due to the characteristics of the Resource element an algebraic loop is always created with the Seize or Resource blocks. To avoid this situation and facilitate the construction of new models, a BreakLoop model has been included in the Resource element.
The process described above represents the construction of a discrete-event system model,
but its execution will not provide much information without the inclusion of some statistical indicators.
Depending on the experiment performed to the model, different statistical indicators can be included in the model:
However, the evolution of some of the variables of the model over the time can be plotted using the standard functionalities provided by Dymola.
For example, the number of entities in a queue can be observed with the variable Queue.NQ, or the number of busy resource units with Resource.NR.