Skip to content
Snippets Groups Projects
Commit f8b7cbd5 authored by Chojnacki, Bruce (LTC)'s avatar Chojnacki, Bruce (LTC)
Browse files

HW3

parent 494f78c5
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,7 @@ public class ExampleSimulationProgram
{
/** 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 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
boolean simulationComplete = false; // sentinel variable as termination condition,, are we done yet?
boolean fireBool = false;
......@@ -214,16 +214,16 @@ public class ExampleSimulationProgram
// etc. etc. your code goes here for your simulation of interest
// 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)
narrativeMessage1 = "MV3500 ExampleSimulationProgramAllen_3";
narrativeMessage1 = "MV3500 Homework 3 - Simulation Program";
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
if (simulationLoopCount > 4) // for example
if (simulationLoopCount > 5) // for example
{
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