-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore function 'PNE_EcrireJeuDeDonneesMPS_avecNom' #5
Conversation
Nothing to say on the code. From a design point of view, how to put the objoffset into the MPS ? |
Sources : |
@klorel Merged the objective offset feature, included it in the MPS write. |
@@ -478,7 +480,7 @@ int SRSgetobjval(SRS_PROBLEM * problem_srs, double * objVal) { | |||
if (problem_srs->maximize) | |||
(*objVal) *= -1.; | |||
|
|||
*objVal += problem_srs->objective_offset; | |||
*objVal += problem_mps->objective_offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be before line 480 to take into account the min/max
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, not really
argmax {a.x + b} = argmax {a.x} + b = -argmin {-a.x} + b
@@ -734,13 +736,13 @@ int SRSchgrangeval(SRS_PROBLEM * problem_srs, size_t nbRowIndexes, const int * r | |||
|
|||
int SRSsetobjoffset(SRS_PROBLEM* problem_srs, double value) | |||
{ | |||
problem_srs->objective_offset = value; | |||
problem_srs->problem_mps->objective_offset = value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should take into account the maximize attribute value
// see https://www.ibm.com/docs/en/icos/20.1.0?topic=standard-records-in-mps-format | ||
// NOTE: By convention, we write here the negative objective value | ||
if (objective_offset != 0.0) { | ||
fprintf(Flot," RHSVAL OBJECTIF %f\n", -objective_offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take into account the maximize attribute value
* Restore function 'PNE_EcrireJeuDeDonneesMPS_avecNom' * Remove useless printf notice * Move objective_offset to PROBLEME_MPS, write to MPS * Fix typo, include SRSsetobjoffset in TEST_API
No description provided.