private void initialise(YVariable variable, boolean isInputOutput, String decompositionID) { startValues = new Values(); startValues.name = variable.getName(); startValues.dataType = variable.getDataTypeName(); startValues.index = variable.getOrdering(); startValues.attributes = variable.getAttributes(); startValues.logPredicate = variable.getLogPredicate(); startValues.value = null; if (isInputOutput) { startValues.scope = YDataHandler.INPUT_OUTPUT; } else if (variable instanceof YParameter) { if (((YParameter) variable).getParamType() == YParameter._INPUT_PARAM_TYPE) { startValues.scope = YDataHandler.INPUT; } else { startValues.scope = YDataHandler.OUTPUT; startValues.value = variable.getDefaultValue(); } } else { startValues.scope = YDataHandler.LOCAL; startValues.value = variable.getInitialValue(); } endValues = startValues.copy(); setDecompositionID(decompositionID); initialiseValidity(); }
public void updatesApplied() { startValues = endValues.copy(); }