@@ -0,0 +1,1443 @@
+/*%0A * JaamSim Discrete Event Simulation%0A * Copyright (C) 2013 Ausenco Engineering Canada Inc.%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A */%0Apackage com.sandwell.JavaSimulation;%0A%0Aimport com.jaamsim.units.Unit;%0A%0Apublic class TimeSeriesConstantDouble implements TimeSeriesProvider %7B%0A%09private final Class%3C? extends Unit%3E unitType;%0A%09private final double val;%0A%0A%09public TimeSeriesConstantDouble(Class%3C? extends Unit%3E unitType, double val) %7B%0A%09%09this.unitType = unitType;%0A%09%09this.val = val;%0A%09%7D%0A%0A%09public TimeSeriesConstantDouble(double val) %7B%0A%09%09this.unitType = Unit.class;%0A%09%09this.val = val;%0A%09%7D%0A%0A%09@Override%0A%09public Class%3C? extends Unit%3E getUnitType() %7B%0A%09%09return unitType;%0A%09%7D%0A%0A%09@Override%0A%09public double getValueForTime(double simTime) %7B%0A%09%09return val;%0A%09%7D%0A%0A%09@Override%0A%09public double getNextChangeTimeAfter( double simTime ) %7B%0A%09%09return Double.POSITIVE_INFINITY;%0A%09%7D%0A%0A%09@Override%0A%09public double getMaxValue() %7B%0A%09%09return val;%0A%09%7D%0A%0A%09@Override%0A%09public double getMaxTimeValueInHours() %7B%0A%09%09return 0.0;%0A%09%7D%0A%7D%0A

Add TimeSeriesConstantDouble class