|
1 | | -''' |
| 1 | + |
2 | 2 | # install pystorms from the current directory (this should be commented out in final version once pystorms source code isn't changing all the time) |
3 | 3 | import subprocess |
4 | 4 | import sys |
5 | 5 | subprocess.check_call([sys.executable, '-m', 'pip', 'uninstall', '-y', 'pystorms']) |
6 | 6 | subprocess.check_call([sys.executable, '-m', 'pip', 'cache', 'purge']) |
7 | 7 | subprocess.check_call([sys.executable, '-m', 'pip', 'install', '.']) |
8 | | -''' |
| 8 | + |
9 | 9 | import pystorms # this will be the first line of the program when dev is done |
10 | 10 |
|
11 | 11 | import pyswmm |
|
23 | 23 | evaluating = 'equal-filling' |
24 | 24 | verbose = True |
25 | 25 | version = "2" # options are "1" and "2" |
26 | | -level = "1" # options are "1" , "2", and "3" |
| 26 | +level = "3" # options are "1" , "2", and "3" |
27 | 27 | plot = True # plot True significantly increases the memory usage. |
28 | 28 | # set the working directory to the directory of this script |
29 | 29 | os.chdir(os.path.dirname(os.path.abspath(__file__))) |
|
159 | 159 | if verbose and env.env.sim.current_time.minute == 0 and env.env.sim.current_time.hour % 2 == 0: |
160 | 160 | u_print = u_open_pct.flatten() |
161 | 161 | y_measured = env.state(level=level).reshape(-1,1) |
162 | | - print(" y_measured, u") |
163 | | - print(np.c_[np.array(env.config['states'][:11]),np.round(y_measured[:11],2) , np.round(u_print.reshape(-1,1),3)]) |
| 162 | + y_actual = env.state(level="1").reshape(-1,1) |
| 163 | + print(" y_actual, y_measured, u") |
| 164 | + print(np.c_[np.array(env.config['states'][:11]),np.round(y_actual[:11],2),np.round(y_measured[:11],2) , np.round(u_print.reshape(-1,1),3)]) |
164 | 165 | print("current time, end time") |
165 | 166 | print(env.env.sim.current_time, env.env.sim.end_time) |
166 | 167 | print("\n") |
|
0 commit comments