Assess stability of hypothetical correct assemblies
[DESCRIPTION WIP]
This is a modification to correctstategraph.py
. For each state in CorrectStateTransitionGraph
, output its stability by calling assemblystats.isStable
.
Issue: isStable()
requires a block assembly object input.
But the current data structure used to represent each node is not a block assembly object.
Solution: since every possible correct state we would like to calculate stability for is a subset of source_node
(end state), which is indeed a block assembly object. We could create BA object for each node by eliminating blocks (nodes) and connections (edges) that are not in this state from the source_node. Define new method: node_to_blockassembly(self, node)
.
Note: when extracting for subset states, remember to remove edges between nodes if needed.
Methods need to be modified:
- edit
traverse(self, edgeComputation=None, levelComputation=None)
- compute
stateComputation(node)
for each node insidefor
loop
- compute
- create
computeStateStability(self)
andupdateStability(self, stability_dict, state_index)
- similar structure as
computeStateMarginals(self)
- similar structure as