Originally posted by: NicoGDFSUEZ
Thank you for your answer.
It was not exactly what I looked for because I wanted the value of the variable for a
particular tuple.
I finally find the answer :
var variable = model.GetElement( "x" ).AsNumMap();
var tupleSet = model.GetElement( "SetOfT" ).AsTupleSet();
var tuple = tupleSet.MakeTupleBuffer( 0 );
tuple.SetIntValue(0, 3);
tuple.SetIntValue(1, 3);
var tupleReal = tupleSet.Find( tuple );
var result = variable.Get( tupleReal );
With this code, I obtain the value of "x" for the tuple {a = 3, b = 3}.
However, I am not totally satisfied with the cplex/opl API : in my opinion, it would be very useful to be able to create a tuple from its schema obtained by model.GetElement( "T" ).AsTupleSchema() instead of using the tuple set "SetOfT"
If anyone of Ilog/IBM could see my post... ;)
#DecisionOptimization#OPLusingCPLEXOptimizer