Is there a way to set a decision variable to take values from a set?
Example:
decision variable $x \in \{0,50,100\}$
So this variable can only take one of these three values and not more.
I have found a documentation online which unfortunately does not state such a thing:
For this example, I could probably set two different decision variables, with lower bound 0 and 50 or 100, respectively. I am not satisfied with this method, though.
This is how it would probably look like in Java:
//GRBVar addVar(double lb, double ub, double obj, char type, String name)
GRBVar x = model.addVar(50.0,50.0,null,GRB.SEMIINT,"x");
GRBVar y = model.addVar(100.0,100.0,null,GRB.SEMIINT,"y");
Note:
A semi-continous variable has the property that it takes a value of 0, or a value between the specified lower and upper bounds. A semi-integer variable adds the additional restriction that the variable also take an integral value (GRB.SEMIINT).