Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CheckOutSimulation is a GUI, which uses java Swings package and brings all the agent classes and landscape together to run a simulation.  It is almost identical to AgentSimulation class from the last week's project.  Below is the animation of running CheckOutSimulation with command line arguments: 500 1.  I will explain what the arguments are in the extension.

simulation.mov

 Statistics)

Because my spawner agent class generates 5 customers every iteration, I ran my simulation 400 times (count up to 2000 customers) and calculated statistics for each strategy.  The results are as below.

StrategyMeanSD
167.040.12
27638.1
36938

 

 

Extensions:

  • Make the simulation visually interesting.

...

I enabled user to control the number of iterations for simulation and which strategy to use for customers using command line argument.  The first command line argument refers to the number of iterations and the second arguments, which should be 1, 2, or 3, refers to the strategy.

 

Conclusion: 

I learned how queue can be useful as a data structure.  More importantly, I realized the importance of designing before starting to code and understanding the purpose of each Java class.  

For this project, I received help from professor Maxwell and Layton and used Nhi's report as a reference.