-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Here is the docker-compose file:
version: '3.1'
services:
eplus1:
build: './eplus'
working_dir: /home/developer/fmu
command: python web.py config jmodelica1
ports:
- "127.0.0.1:5501:5500"
jmodelica1:
build: '.'
working_dir: /home/developer
command: python web.py config
ports:
- "127.0.0.1:5001:5000Commands to launch emulator:
docker-compose -p instance1 build
docker-compose -p instance1 up --detachPython code to run simulation:
import requests
import json
start_day = 33
run_period = 86400
url_eplus = f'http://127.0.0.1:5501'
url_modelica = f'http://127.0.0.1:5001'
# Set the step
requests.put(f'{url_eplus}/step', data={'step': 60})
# Set the simulation start and end times in units of seconds
start_sec = start_day*86400
end_sec_run = start_sec + run_period # end time of the run
end_day = (end_sec_run // 86400) + 1 # need the end time to be an integer day for eplus to be happy
end_sec = end_day*86400
requests.put(f'{url_eplus}/reset', data={'start_time':start_sec, 'end_time':end_sec})After calling reset the eplus container shuts itself down despite returning a 200 response.
Metadata
Metadata
Assignees
Labels
No labels