Originally posted by: SystemAdmin
>
>
> According to cplex manual, getRay (vals, vars) const puts the nonzero values of the
> unbounded direction into the array vals, and puts the corresponding variables of the extracted
> model into the array vars.
>
> In my model, I have total 25 decision variables and when I call getRay function, I got 11 nonzero values in vals array.
>
> However, I want to know which variables have nonzero values and which variables have zero values.
Let's say that your variables are x[0],...,x
24 and that getRay returns (1.3, 2.7, ..., 4.5) in vals and (x[5], x[2], ..., x[0]) in vars. Then 1.3 is the component of the ray in the x[5] direction, 2.7 is the coefficient of the ray in the x[2] direction, etc. If x[9] is one of the 14 variables that do not appear in vars, then the component of the ray in the x[9] direction is 0.
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
#CPLEXOptimizers#DecisionOptimization