fslaborg / flips

Fsharp LInear Programming System
https://flipslibrary.com/#/
MIT License
253 stars 32 forks source link

LP and MPS export files don't have the objective function in them #105

Closed smoothdeveloper closed 3 years ago

smoothdeveloper commented 3 years ago

This seems related to the fact that the objective is set at the same time as solving, which happens after the calls to write the files happen:

https://github.com/matthewcrews/flips/blob/7951951714ae86f4a11397cf7af7eb3fa5fa7bd9/Flips/Solve.fs#L165-L169

Going to make a PR with a fix.

smoothdeveloper commented 3 years ago

Mmmh there is an actual API snag there, it seems a model can be defined with several objectives, and they'll be tried until one is solved with a feasible solution.

Not sure how to tackle this, right now the lp/mps file exports aren't useful without the objective function.