Skip to content
Snippets Groups Projects
Commit 34602636 authored by DanSloan0386's avatar DanSloan0386
Browse files

Merge origin/master

parents b800c1ea f8b7cbd5
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,7 @@ public class ExampleSimulationProgram ...@@ -107,7 +107,7 @@ public class ExampleSimulationProgram
{ {
/** seconds for real-time execution (not simulation time, which may or may not be the same) */ /** seconds for real-time execution (not simulation time, which may or may not be the same) */
final double SIMULATION_LOOP_DURATION_SECONDS = 1.0; final double SIMULATION_LOOP_DURATION_SECONDS = 1.0;
final int SIMULATION_MAX_LOOP_COUNT = 10; // be deliberate out out there! also avoid infinite loops. final int SIMULATION_MAX_LOOP_COUNT = 15; // be deliberate out out there! also avoid infinite loops.
int simulationLoopCount = 0; // variable, initialized at 0 int simulationLoopCount = 0; // variable, initialized at 0
boolean simulationComplete = false; // sentinel variable as termination condition,, are we done yet? boolean simulationComplete = false; // sentinel variable as termination condition,, are we done yet?
boolean fireBool = false; boolean fireBool = false;
...@@ -214,16 +214,16 @@ public class ExampleSimulationProgram ...@@ -214,16 +214,16 @@ public class ExampleSimulationProgram
// etc. etc. your code goes here for your simulation of interest // etc. etc. your code goes here for your simulation of interest
// something happens between my simulation entities, la de da de da... // something happens between my simulation entities, la de da de da...
System.out.println ("... My simulation just did something, no really..."); System.out.println ("Phase complete. Next phase initiating...");
// make your reports: narrative code for CommentPdu here (set all to empty strings to avoid sending) // make your reports: narrative code for CommentPdu here (set all to empty strings to avoid sending)
narrativeMessage1 = "MV3500 ExampleSimulationProgramAllen_3"; narrativeMessage1 = "MV3500 Homework 3 - Simulation Program";
narrativeMessage2 = "runSimulation() loop " + simulationLoopCount; narrativeMessage2 = "runSimulation() loop " + simulationLoopCount;
narrativeMessage3 = "this is working!"; // intentionally blank for testing narrativeMessage3 = "Simulation Started!"; // intentionally blank for testing
// your loop termination condition goes here // your loop termination condition goes here
if (simulationLoopCount > 4) // for example if (simulationLoopCount > 5) // for example
{ {
simulationComplete = true; simulationComplete = true;
} }
......
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