Skip to content

Commit b1d3f91

Browse files
committed
updating state through process
Updating the state through a process now only modifies the compartments of the context's it needs to run
1 parent 1904ac9 commit b1d3f91

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ngcsimlib/compilers/process.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ def get_required_state(self):
5959
compound_state.update(context.get_current_state())
6060
return compound_state
6161

62-
@classmethod
63-
def updated_modified_state(cls, modified_state):
64-
Set_Compartment_Batch(modified_state)
62+
def updated_modified_state(self, state):
63+
Set_Compartment_Batch({key: value for key, value in state.items() if key in self.get_required_state()})
6564

6665

6766
def transition(output_compartments):

0 commit comments

Comments
 (0)