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

comments

parent 30d9c459
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,7 @@ public class ExampleSimulationProgram
// TODO simulation management PDUs for startup, planning to design special class support
// ===================================================================================================
// loop the simulation while allowed, programmer can set additional conditions to break out and finish
while (simulationLoopCount < SIMULATION_MAX_LOOP_COUNT) // are we done yet?
{
......@@ -149,14 +150,15 @@ public class ExampleSimulationProgram
System.out.println ("... [PDUs successfully sent for this loop]");
// ===============================
// loop now finished, check whether to terminate if simulation complete, otherwise continue
// current loop now finished, check whether to terminate if simulation complete, otherwise continue
if (simulationComplete || (simulationLoopCount > 10000)) // for example; including fail-safe condition is good
{
System.out.println ("... [loop termination condition met, simulationComplete=" + simulationComplete + "]"); // ", final loopCount=" + loopCount +
break;
}
} // end of simulation loop
// ===================================================================================================
narrativeMessage2 = "runSimulation() completed successfully"; // all done
sendCommentPdu(narrativeComment, narrativeMessage1, narrativeMessage2, narrativeMessage3);
System.out.println ("... [final CommentPdu successfully sent for simulation]");
......
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