rte-france / sirius-solver

Apache License 2.0
5 stars 4 forks source link

Restore function 'PNE_EcrireJeuDeDonneesMPS_avecNom' #5

Closed flomnes closed 2 years ago

klorel commented 2 years ago

Nothing to say on the code. From a design point of view, how to put the objoffset into the MPS ?

flomnes commented 2 years ago

If a row is not mentioned anywhere in the RHS section, that row takes a right-hand side value of 0. You may define an objective offset by setting the negative offset as right-hand side of the objective row. For example, if the linear objective row in the problem is called COST and you want to add an offset of 1000 to your objective function, you can add the following to the RHS section :

RHS
RHS1      COST      -1000

Sources : https://www.ibm.com/docs/en/icos/20.1.0?topic=standard-records-in-mps-format https://www.gurobi.com/documentation/9.5/refman/mps_format.html

flomnes commented 2 years ago

@klorel Merged the objective offset feature, included it in the MPS write. Please note that SPX_EcrireProblemeSpxAuFormatMPS, SPX_EcrireProblemeAuFormatMPS and SPX_EcrireJeuDeDonneesLineaireAuFormatMPS are not called in the SRS_PROBLEM API.