예제 #1
0
 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
     });
 }
예제 #2
0
 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;
 }