public void AddVariable(string name, double lowerBound, double upperBound, DecisionVariableType type = DecisionVariableType.Real) { // Binary type should be betwenn 0, 1 Variables.Add(name, new DecisionVariables { LowerBound = lowerBound, UpperBound = upperBound, Type = type }); }
public DecisionVariables(double lowerBound = 0, double upperBound = 1, DecisionVariableType type = DecisionVariableType.Real) { LowerBound = Math.Min(lowerBound, upperBound); UpperBound = Math.Max(lowerBound, upperBound); // Upper bound must be greater then lower bound. Type = type; }