Difference between revisions of "Advanced Topic 7"
(Created page with "==The Last Position File== When launched from the command line, the MiniSim creates a file ending with the string “.lastpos.txt” when it exits as follows: #The file is on...") |
(→The Last Position File) |
||
Line 5: | Line 5: | ||
#The restart will only work if the scenario is set up to stop the scenario when the vehicle either leaves the roadway or has a collision. Example Expression trigger content: | #The restart will only work if the scenario is set up to stop the scenario when the vehicle either leaves the roadway or has a collision. Example Expression trigger content: | ||
Expression Name: End Drive | Expression Name: End Drive | ||
+ | |||
Expression: ReadVar('MyTime') > 54000 this ends the scenario after 54,000 frames, or 15 minutes | Expression: ReadVar('MyTime') > 54000 this ends the scenario after 54,000 frames, or 15 minutes | ||
+ | |||
Actions: | Actions: | ||
+ | |||
Action 1, Type=Set Variable, Variable=VisualDisplaytext, Value=End of Drive, Please Come To a Stop, Delay=5s | Action 1, Type=Set Variable, Variable=VisualDisplaytext, Value=End of Drive, Please Come To a Stop, Delay=5s | ||
+ | |||
Action 2, Type=Terminate Simulation, Delay=0s | Action 2, Type=Terminate Simulation, Delay=0s | ||
+ | |||
Action 3, Type=Set Variable, Variable=FinishedDrive, Value=1, Delay=0s Action 4, Type=Log Data, Variable=Stream 2, Value=1 | Action 3, Type=Set Variable, Variable=FinishedDrive, Value=1, Delay=0s Action 4, Type=Log Data, Variable=Stream 2, Value=1 | ||
+ | |||
#The drive complete indicator is defined in scenario. | #The drive complete indicator is defined in scenario. | ||
#The restart file will be named the same as the daq filename that is passed into the MiniSim but with a “.lastpos.txt” so “my.daq” would produce a restart file of “my.daq.lastpos.txt”. An example of the contents of a .lastpos.txt file is as follows: | #The restart file will be named the same as the daq filename that is passed into the MiniSim but with a “.lastpos.txt” so “my.daq” would produce a restart file of “my.daq.lastpos.txt”. An example of the contents of a .lastpos.txt file is as follows: |
Revision as of 16:21, 18 October 2016
The Last Position File
When launched from the command line, the MiniSim creates a file ending with the string “.lastpos.txt” when it exits as follows:
- The file is only created when the MiniSim is launched from the command line
- The restart will only work if the scenario is set up to stop the scenario when the vehicle either leaves the roadway or has a collision. Example Expression trigger content:
Expression Name: End Drive
Expression: ReadVar('MyTime') > 54000 this ends the scenario after 54,000 frames, or 15 minutes
Actions:
Action 1, Type=Set Variable, Variable=VisualDisplaytext, Value=End of Drive, Please Come To a Stop, Delay=5s
Action 2, Type=Terminate Simulation, Delay=0s
Action 3, Type=Set Variable, Variable=FinishedDrive, Value=1, Delay=0s Action 4, Type=Log Data, Variable=Stream 2, Value=1
- The drive complete indicator is defined in scenario.
- The restart file will be named the same as the daq filename that is passed into the MiniSim but with a “.lastpos.txt” so “my.daq” would produce a restart file of “my.daq.lastpos.txt”. An example of the contents of a .lastpos.txt file is as follows: