Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
f8b7cbd5
Commit
f8b7cbd5
authored
2 years ago
by
Chojnacki, Bruce (LTC)
Browse files
Options
Downloads
Patches
Plain Diff
HW3
parent
494f78c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assignments/src/MV3500Cohort2023MarchJune/homework3/Chojnacki/ExampleSimulationProgram.java
+5
-5
5 additions, 5 deletions
...rchJune/homework3/Chojnacki/ExampleSimulationProgram.java
with
5 additions
and
5 deletions
assignments/src/MV3500Cohort2023MarchJune/homework3/Chojnacki/ExampleSimulationProgram.java
+
5
−
5
View file @
f8b7cbd5
...
...
@@ -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
=
1
0
;
// be deliberate out out there! also avoid infinite loops.
final
int
SIMULATION_MAX_LOOP_COUNT
=
1
5
;
// 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
Example
SimulationProgram
Allen_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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment