public void setOutputVariable(OutputVariable<?> variable) { /** * if the output variable is contained in sequenceOutputVariableFactories, * then it must be a DirectSequenceOutputVariableFactory, hence we set its * value so that it can be used to produce the next timeline variable. */ if (sequenceOutputVariableFactories.containsKey(variable.getName())) { if(variable.getValue() instanceof Integer) { DirectSequenceOutputVariableFactory<Integer> v = (DirectSequenceOutputVariableFactory<Integer>) sequenceOutputVariableFactories.get(variable.getName()); v.setValue((Integer) variable.getValue()); } else if(variable.getValue() instanceof Double) { DirectSequenceOutputVariableFactory<Double> v = (DirectSequenceOutputVariableFactory<Double>) sequenceOutputVariableFactories.get(variable.getName()); v.setValue((Double) variable.getValue()); } // v.setValue((Integer)variable.getValue()); } else outputVariables.put(variable.getName(), variable); }