Skip to content

Commit

Permalink
updated test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophGehbauer committed Apr 4, 2024
1 parent 2ad3a6b commit 1a9793f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/example_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
AFC example1 test module.
"""

import io
import os
import sys
import time
Expand Down Expand Up @@ -58,8 +59,7 @@ def example1():
# 'opt_duration','outputs_duration','duration']))
#print('Optimization:')
#pprint.pprint(ctrl.get_output(keys=['opt_objective','opt_duration','opt_termination','duration']))
df = pd.DataFrame(ctrl.get_output(keys=['output-data'])['output-data'])
df.index = pd.to_datetime(pd.to_numeric(df.index), unit='ms')
df = pd.read_json(io.StringIO(ctrl.get_output(keys=['output-data'])['output-data']))
print('Facade actuation during the day (when DNI > 0).')
print('Facade 0 = bottom zone, Facade 1 = middle zone, Facade 2 = top zone')
print('State 0.0 = fully tinted, State 1.0 and 2.0 = intermediate tint, state 3.0 = clear (double low-e)\n')
Expand Down
4 changes: 2 additions & 2 deletions test/test_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
AFC example1 test module.
"""

import io
import os
import sys
import time
Expand Down Expand Up @@ -46,8 +47,7 @@ def test1():

# Query controller
ctrl.do_step(inputs=inputs)
df = pd.DataFrame(ctrl.get_output(keys=['output-data'])['output-data'])
df.index = pd.to_datetime(df.index, unit='ms')
df = pd.read_json(io.StringIO(ctrl.get_output(keys=['output-data'])['output-data']))

# check
res = ctrl.get_output(keys=['opt-stats', 'duration'])
Expand Down

0 comments on commit 1a9793f

Please sign in to comment.