Closed smoothdeveloper closed 3 years ago
I agree that the hard coding seems wrong. It was purposeful decision at the time due to the use case. The needs have evolved and the decision no longer makes sense. We want to fix this.
This feature has actually been marked as Deprecated and the new way is to use the Objective.evaluate
function to get this value.
currently the Solution object is hardcoded to the first objective in the
Model
object, which seems wrong (model.Objectives.[0]
):https://github.com/matthewcrews/flips/blob/7951951714ae86f4a11397cf7af7eb3fa5fa7bd9/Flips/Solve.fs#L169-L173
If #106 gets merged, the
objective
value will be available to replace that expression and there won't be need to fix that hardcoded lookup.