26.08.2013 Views

3.1 MB - Evernote

3.1 MB - Evernote

3.1 MB - Evernote

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

65<br />

Implementation<br />

calculations that are triggered when the next LPCC processing is needed. An additional<br />

parameter for the method receiveGvt() of the LogicalProcess class indicates to the LP<br />

that an LPCC processing is needed after the new GVT has been received. Finally the<br />

user can also trigger a GVT calculation, which is useful for simulations in normal Time<br />

Warp mode that might not require any GVT calculation for large parts of the simulation.<br />

Forcing a GVT calculation allows the user to check what progress the simulation has<br />

made so far as the GVT is an approximation for the confirmed simulation times that has<br />

been reached by all LPs.<br />

End of simulation<br />

The detection of the simulation end is closely linked to the GVT calculation because a<br />

provisional simulation end reached by one of the LPs can only be confirmed by a GVT.<br />

The background of detecting the simulation end has already been discussed in 4.4 but<br />

the actual implementation will be explained here. When an LP reaches a provisional<br />

simulation end then the parallel simulator will attempt to confirm this simulation end as<br />

soon as possible if at all possible. First the LP reaching the provisional simulation end<br />

will request a GVT calculation from the Simulation Controller. But the resulting GVT<br />

might not confirm the provisional simulation end if the LP is ahead of other LPs in<br />

respect of the simulation time. For this case a scheme is introduced in which the LP<br />

reaching the provisional simulation end tells all other LPs to request a GVT calculation<br />

themselves if they pass the simulation time of that provisional simulation end. The<br />

method forceGvtAt() of the LogicalProcess class is used to tell other LPs about the<br />

provisional simulation end time. Because it is possible for more than one LP to reach a<br />

provisional simulation end before any of them is confirmed this method will keep a list<br />

of the times at which the LPs need to request GVT calculations.<br />

Whether or not a provisional simulation end reached by one of the LPs is confirmed, is<br />

detected by the private method performGvtCalculation() of the SimulationController<br />

class that also performs the calculation of the GVT. In order to make this possible the<br />

method requestGvtCalculation() of the LogicProcess class returns additional<br />

information about a possible simulation end reached by that LP. This way the GVT<br />

calculation process described above is also used to confirm a provisional simulation<br />

end. Such a simulation end is confirmed during the GVT calculation when it is found<br />

that all other LPs have reached a later simulation time than the one that reported the

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

Saved successfully!

Ooh no, something went wrong!