Skip to content
Snippets Groups Projects
Commit 00833481 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

initializeSimulationEntities(), SimulationManager addition

parent d77816c2
No related branches found
No related tags found
No related merge requests found
......@@ -51,23 +51,25 @@ public class ExampleTrackInterpolation extends ExampleSimulationProgram
*/
@SuppressWarnings("SleepWhileInLoop") // yes we do that
@Override // indicates that this method supercedes corresponding superclass method
public void runSimulationLoops() {
try {
public void runSimulationLoops()
{
try
{
final int SIMULATION_MAX_LOOP_COUNT = 50; // be deliberate out there! also avoid infinite loops.
int simulationLoopCount = 0; // variable, initialized at 0
boolean simulationComplete = false; // sentinel variable as termination condition, are we done yet?
// TODO reset Clock Time to today's date and timestamp to zero, providing consistent outputs for each simulation run
simulationTime = initialTime - currentTimeStep; // pre-initialization for first loop
initializeSimulationEntities();
// create PDU objects and set their values.
EntityID entityID_1 = new EntityID();
// use declared PDU objects and set their values.
entityID_1.setSiteID(1).setApplicationID(2).setEntityID(3); // made-up example ID;
// TODO someday, use enumerations; is there a unique site triplet for MOVES Institute?
pduRecorder.setVerbose(false);
pduRecorder.hasVerboseOutput();
pduRecorder.hasVerboseOutput(); // debug check
EntityStatePdu espdu_1 = pduFactory.makeEntityStatePdu();
espdu_1.setEntityID(entityID_1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment