Please submit all project-related correspondence
Test the elevator system.
The purpose of this assignment is for you to become familiar with the simulation framework. For this assignment you will not be working with the fully functional elevator, but rather you will see how a sample module works within the simulation framework. You will need to perform the following steps:
Download TestLight.java and add it to the simulator.elevatorcontrol package. Study the file and try to understand what it does. More information is provided in the testlight summary.
There are two locations in TestLight.java marked with the word “TODO:”. Modify TestLight.java according to these instructions:
Compile the rest of the simulator using the makefile. Execute “java simulator.framework.Elevator” to see the command line parameters for the simulator.
Run the unit test on the TestLight module:
Write a configuration file that instantiates the TestLight module and no other module. Instantiate the the 4th floor, front hallway, down direction instance with a period of 100 milliseconds and the verbose option set to TRUE. You can read more about these files in the command line summary and in the comments in TestLight.java
If you are having trouble with the configuration file, please check the output from part 5, or refer to the .cf files from the pepsi machine example (eg). (The portfolio will be discussed in lecture 5, but the .cf files may still prove a useful guide)
Download and study defines.mf and testlight_01.mf message injector files. See if you think it is correctly testing the statechart.
Run the simulator with the .cf file you wrote and testlight_01.mf message injector file. Be sure you save all the output! Hint: in the BASH shell, use '&>' to redirect both stdout and stderr to a single file. Also, as noted in the simulator documentation, you can use the -head command line parameter to automatically add the header information to generated files.
Run an acceptance test using basicpass.pass.
Configure
the
simulator
to
run
with
the
gui
enabled and for at least 400s.
The simulation may take a little
while to complete, but
observe how the elevator behaves. You may be asked questions
about the simulation in the first group meeting. Be sure you save
the
elevator.stats output file.
Back to Project 1