// check whether the value is already recorded as a possible value of numberType. If so, reuse it
ObjectEntityInstance state = numberType.getInstanceByName(String.valueOf(value));
if (state == null) {
// this is a new value. Insert it
try {
state = numberType.addInstance(String.valueOf(value));
continuousResidentNode.getMFrag().getMultiEntityBayesianNetwork().getObjectEntityContainer().addEntityInstance(state);
} catch (TypeException e) {
throw new IllegalArgumentException("Cannnot use " + value + " as a possible value of " + continuousResidentNode,e);
} catch (EntityInstanceAlreadyExistsException e) {
e.printStackTrace();