main.py 600 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/python3
  2. # This file was automatically generated from drawio2cbd with the command:
  3. # /home/red/git/DrawioConvert/__main__.py AGV.drawio -Safrgv -e AGV -F CBD -E delta=0.1 -t 100
  4. from AGV import *
  5. from CBD.simulator import Simulator
  6. DELTA_T = 0.1
  7. TIME = 100.0
  8. cbd = AGV("AGV")
  9. # Run the Simulation
  10. sim = Simulator(cbd)
  11. sim.setDeltaT(DELTA_T)
  12. # sim.setProgressBar()
  13. sim.setRealTime()
  14. sim.run(TIME)
  15. while sim.is_running(): pass
  16. log = sim.getDurationLog()
  17. with open('delays.log', 'w') as file:
  18. file.write("{}\n{}\n".format(TIME, DELTA_T))
  19. file.write("\n".join([str(x) for x in log]))