Re: [ojAlgo-user] Connect variable names in MPS file with Optimisation.Result values
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2013-02-27 20:54:20
|
I asume you call maximise() or minimise() directly on the MathProgSysModel... and, yes that wont work well. The solution is not written back to the columns. MathProgSysModel tmpMPSM = MathProgSysModel.makeFromFile(...); ExpressionsBasedModel tmpEBM = ExpressionsBasedModel.make(tmpMPSM); State tmpState = tmpEBM.minimise().getState(); List<Variable> tmpVariables = tmpEBM.getVariables(); The variables have names and the solution values are written back to them. Suppose there should be code that writes those solution values to the columns of the MathProgSysModel. Until someone writes that code you have to do as described above. /Anders On 27 feb 2013, at 19:00, "Steffen Borgwardt" <bor...@ma...> wrote: > Hello! > > I'm solving a linear program using ojalgo. To do so, i write an MPS file > and call 'MathProgSysModel.makeFromFile'. The solving process works just > fine, but in the 'Optimisation.Result' i cannot tell which value is > associated to which variable. Their order is not preserved, so i cannot > simply iterate over the 'or.doubleValues'. > > How do i connect variable names with the solution? > > Thanks for a reply! > > Best > Steffen > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |