26.08.2013 Views

3.1 MB - Evernote

3.1 MB - Evernote

3.1 MB - Evernote

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementation<br />

Euclidean distance because AvgUncommittedMoves is directly linked to the actuator and<br />

CommittedMoveRate is the performance indicator that is hoped to be maximized.<br />

Test and Debugging of the Shock Resistant Time Warp and the State Cluster Space<br />

The State Cluster Space was tested and debugged using the test application class<br />

TestStateClusterSpaceApp, which allows for the StateClusterSpace class to be tested<br />

outside the parallel simulator. Using this class the detailed functionality of the State<br />

Cluster Space was tested using specific scenarios that would have been difficult to<br />

create within the parallel simulator. The test application class is left in the project so that<br />

possible future changes or enhancements to the StateClusterSpace class can also be<br />

tested outside the parallel simulator.<br />

The implementation of the Shock Resistant Time Warp algorithm was tested and<br />

debugged in the final version of the parallel simulator using a selection of different<br />

models of which a significant one was chosen for validation 5 in section 6.5.<br />

5.3 Specific Implementation Details<br />

The following sections describe some specific implementation details of the parallel<br />

simulator.<br />

5.<strong>3.1</strong> Scheduling<br />

The scheduling of the parallel simulator was implemented in two phases. The first part<br />

is the basic scheduling of the GPSS simulation that was implemented using the<br />

SimulationEngine class as described in section 5.2.2. This scheduling algorithm was<br />

later extended for the parallel simulation by the LogicalProcess class and the<br />

ParallelSimulationEngine class, which inherits from the SimulationEngine class as part<br />

of the Time Warp parallel simulator implementation phase described in 5.2.3.<br />

Basic GPSS Scheduling<br />

The basic GPSS scheduling is implemented using the functionality provided by the<br />

SimulationEngine class. A flowchart diagram of the scheduling algorithm is shown in<br />

Figure 17. As seen from this diagram the scheduling algorithm will first initialise the<br />

GENERATE blocks in order to create the first Transactions. Subsequent Transactions<br />

56

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!