AnsweredAssumed Answered

[Solved]XPress Mosel with C# : how to access solution withou usint Bind() ???

Question asked by Nicolas Derhy on Oct 19, 2009
Latest reply on Oct 20, 2009 by Nicolas Derhy

Hello,

 

I have in my .mos :

declarations

   P : set of string

   T : set of string

   transit : array(P,T) of mpvar

end-declarations

 

The optimization succeed and then, I  want to obtain the values of transit.

How can I do this without using Bind method because I do not want to create useless class.

 

In the doc, we have something like :

((XPRMReference) myModel.Identifiers["num_small"]).Value.AsMPVar().Solution

 

but there is an exception when I try ( (XPRMReference)model.Identifiers["transit"] ) saying that it is impossible to cast an object of type 'Mosel.XPRMArrayIdentifier' to 'Mosel.XPRMReference'.

 

 

Message Edited by tiopai on 10-20-2009 04:41 AM

Outcomes