run-tutorial3-in-docker.sh 1.3 KB

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. TOMORROW=$(date --date="next day" '+%Y-%m-%d')
  3. echo "[TUTORIAL-RUNNER] Setting up toy account with reporters..."
  4. docker exec -it flexmeasures-server-1 flexmeasures add toy-account --kind process
  5. echo "[TUTORIAL-RUNNER] Creating three process schedules ..."
  6. docker exec -it flexmeasures-server-1 flexmeasures add schedule for-process --sensor 4 --consumption-price-sensor 1\
  7. --start ${TOMORROW}T00:00:00+02:00 --duration PT24H --process-duration PT4H \
  8. --process-power 0.2MW --process-type INFLEXIBLE \
  9. --forbid "{\"start\" : \"${TOMORROW}T15:00:00+02:00\", \"duration\" : \"PT1H\"}"
  10. docker exec -it flexmeasures-server-1 flexmeasures add schedule for-process --sensor 5 --consumption-price-sensor 1\
  11. --start ${TOMORROW}T00:00:00+02:00 --duration PT24H --process-duration PT4H \
  12. --process-power 0.2MW --process-type BREAKABLE \
  13. --forbid "{\"start\" : \"${TOMORROW}T15:00:00+02:00\", \"duration\" : \"PT1H\"}"
  14. docker exec -it flexmeasures-server-1 flexmeasures add schedule for-process --sensor 6 --consumption-price-sensor 1\
  15. --start ${TOMORROW}T00:00:00+02:00 --duration PT24H --process-duration PT4H \
  16. --process-power 0.2MW --process-type SHIFTABLE \
  17. --forbid "{\"start\" : \"${TOMORROW}T15:00:00+02:00\", \"duration\" : \"PT1H\"}"
  18. echo "Now visit http://localhost:5000/assets/5/graphs to see all three schedules."