Missing (sometimes) of "states list" for "discretised variables"

Issue #287 closed
Kelvin Ng created an issue

For unknown reasons, states list information is sometimes not added / disappeared for discretised variable, such that the file could not be reloaded and instead an error message "Network could not be loaded: States list not found in finite states variable A (at line 7, column 59)" is shown.

Bug version (around 50% of the time):

  <Variable name="A" type="discretized" role="chance">
    <Coordinates x="516" y="189" />
    <Unit />
    <Precision>0.01</Precision>
    <Thresholds>
      <Threshold value="0.0" belongsTo="left" />
      <Threshold value="0.5" belongsTo="right" />
      <Threshold value="1.0" belongsTo="right" />
    </Thresholds>
  </Variable>

Correct version (around 50% of the time):

  <Variable name="A" type="discretized" role="chance">
    <Coordinates x="516" y="189" />
    <Unit />
    <Precision>0.01</Precision>
    <States>
      <State name="absent" />
      <State name="present" />
    </States>
    <Thresholds>
      <Threshold value="0.0" belongsTo="left" />
      <Threshold value="0.5" belongsTo="right" />
      <Threshold value="1.0" belongsTo="right" />
    </Thresholds>
  </Variable>

This, of course, could be remedied by manually re-entering the states list one by one by opening the file in a code editor.

Comments (1)

  1. Log in to comment