This project is read-only.

The library should be installed following the [Installation Guide]. Minimum requirements for that are Microsoft Windows 2000 operating system (or later versions) and Microsoft Visual Studio .NET (version 1.0), with .NET Framework.

The library is a Dynamic Link Library (DLL) and should be used with other .NET components. Interoperability with other component interfaces such as Component Object Model (COM) is possible respecting .NET principles and it will depend exclusively on the user’s design decisions.

The user of this library should be either a simulation modeller with .NET programming knowledge or a developer with good knowledge of discrete-event simulation modelling using three-phase approach.

Build a simulation model

Since the library is a component of a simulation model, it requires the latter to be built in first place. A demonstration of such models withis included on the installation (a simple [Critical Care Unit Model]).

This User Guide does not aim to give instructions on how to design and build a conceptual model that can be simulated using three-phase, but only how the library can be used with a simulation model.

Use of simulation class

A usual set-up after referencing the library in a simulation model is to have a class where the Simulation class is contained. This class could be called Model, for example, and should contain also all other elements of the model. Below there is a snippet of C# code that exemplify this. It defines a class called Model and a Simulation class as a public field (theSimulation) of this class.

class Model
   public Simulation theSimulation = new Simulation();

Adding events to simulation collection

Adding B Events and C Activities to the simulation collection is very similar to adding Resources and Entities. The difference here is that B Events and C Activities are not declared as classes but as delegates. The methods created by the user should then be passed to the Simulation class in the library. Below there is an example of previously defined B Event (EmergencyArrival) and a C Activity (BeginOccupyBed) being added to the Simulation object.

theSimulation.AddBEvent (Model.EmergencyArrival);
theSimulation.AddCActivity (Model.BeginOccupyBed);

Scheduling B Events

B Events are defined by the user of the library and scheduled to occur with a particular entity at some time in the future through a method in the Simulation class. This method (Schedule) takes three arguments: a reference to an object derived from the EntityBase class, a reference to the method that contains code of the B Event, and the portion of time (added to current simulation time) that B Event will occur.

The Schedule operation will usually appears inside the B Events and C Activities code. Example below shows how the Schedule operation was executed.

//schedule a B Event (EndOccupyBed) to occur within 24 hours
theSimulation.Schedule (Emergency, EndOccupyBed, 24);

Last edited Mar 23, 2013 at 10:19 PM by axcosta, version 1


No comments yet.