Originally posted by: Mahesh Bakshi
I wrote LP model using java cplex, I have a problem using IloCplex.getValue.
IloCplex.getValue(z[0][0]) only returns first value of the solution.
For example, in one instance, I have z[0][0] present three times in optimal LP solution. But I am only interested in z[0][0] with label "BS" (i.e 0.5) but it always return first available z[0][0] (i.e 0).
Following is the output of iloCplex.writeSolution:
<variable name="z-0-0" index="2112" status="LL" value="0" reducedCost="1"/>
<variable name="z-0-0" index="2113" status="LL" value="0" reducedCost="1"/>
<variable name="z-0-0" index="2114" status="BS" value="0.5" reducedCost="0"/>
Is there any way to fetch IloCplex.getValue(z[0][0]) with label "BS" (i.e 0.5) ? (other than parsing complete writeSolution).
Thank you for your help in advance.
#DecisionOptimization#MathematicalProgramming-General