Skip to content

Commit

Permalink
Use floats for output_state
Browse files Browse the repository at this point in the history
  • Loading branch information
schmoelder committed Mar 2, 2024
1 parent 3037d18 commit b422b32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CADETProcess/processModel/flowSheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ def set_output_state(self, unit, state):
if state >= state_length:
raise CADETProcessError('Index exceeds destinations')

output_state = [0] * state_length
output_state[state] = 1
output_state = [0.0] * state_length
output_state[state] = 1.0

elif isinstance(state, dict):
output_state = [0] * state_length
output_state = [0.0] * state_length
for dest, value in state.items():
try:
assert self.connection_exists(unit, dest)
Expand Down

0 comments on commit b422b32

Please sign in to comment.