-
Notifications
You must be signed in to change notification settings - Fork 5
Experiments
The runSim.sh script is used to run experiments in the simulator. This takes a directory containing scenarios and writes the results in a special csv format to a results directory.
Usage is as follows:
./runSim.sh ./myscenarios ./myresults
This will take all scenario files in the myscenarios directory and run each scenario 30 times with the following parameters:
- Each communication policy (broadcast, smooth, step)
- Each auction schedule (active, passive)
- On each camera
So for three cameras, the number of experiments run are 30 * 3 * 2 * 3.
The './myresults' parameter has the date added to it in ddMMyyyy format, and the results will be found in this directory.
To add your custom communication policies and auction schedules to the full simulation script, you have to add your policy or schedule to the src directory. Furthermore, you have to add the new schedule/policy to the enumeration of existing schedules/policies in simsim.epics.simSim.SimSim.
Locate the enumerations at the end of the file and simply add your policy or schedule at the appropriate place in the list.
enum CommPolicy{
BROADCAST("epics.commpolicy.Broadcast", "0"),
SMOOTH("epics.commpolicy.Smooth", "1"),
STEP("epics.commpolicy.Step", "2")
;
...
}and
enum AuctionsSchedule {
ACTIVE("epics.ai.ActiveAINodeMulti", "A"),
PASSIVE("epics.ai.PassiveAINodeMulti", "P")
;
...
}Note that besides the enumeration qualifier, one has also to define the full qualified name of the schedule or policy as a String. Furthermore, an abbriviation has to be given as a String. This abbreviation is being used for the GUI as a label for the camera as well as for creating unique directories when running the experiments. Make sure your abbriviation is unique among the scheduls AND the policies!
The results for each experiment (consisting of 30 runs) are written to a summary.csv file. The first line provides the field denoted by the column. The entire file can be loaded into Matlab, Microsoft Excel, LibreOffice Calc, etc.
Here is a description for each field:
| Field | Description |
|---|---|
| SEED | The random seed used for this run |
| TIME | The number of time steps for the run |
| GLOBAL_UTILITY | The global utility at the final time step |
| CUMULATIVE_UTILITY | The cumulative (total) utility for all time steps |
| COMMUNICATION | The amount of communication between all nodes at the final time step |
| CUMULATIVE_COMM | The cumulative communication between all nodes for all time steps |
| HANDOVER | The number of handovers at the final time step |
| CUMULATIVE_HANDOVER | The cumulative number of handovers between all nodes for all time steps |
| CUMULATIVE_COMM_OH | The cumulative communication overhead for all time steps |