diff --git a/include/PSLP/PSLP_API.h b/include/PSLP/PSLP_API.h index 7bc2e47e..060793c5 100644 --- a/include/PSLP/PSLP_API.h +++ b/include/PSLP/PSLP_API.h @@ -70,6 +70,12 @@ extern "C" // variable bounds lbs <= x <= ubs double *lbs; double *ubs; + + /* offset to be added to the objective value. (When the presolver fixes + variables, it adds an offset to the objective. This offset should + possibly be taken into account when evaluating the relative optimality gap + of the reduced problem.) */ + double obj_offset; } PresolvedProblem; /* struct corresponding to the presolver: diff --git a/src/core/Presolver.c b/src/core/Presolver.c index f9a9052f..5342034d 100644 --- a/src/core/Presolver.c +++ b/src/core/Presolver.c @@ -536,6 +536,7 @@ void populate_presolved_problem(Presolver *presolver) ps_prob->rhs = constraints->rhs; ps_prob->lhs = constraints->lhs; ps_prob->c = presolver->prob->obj->c; + ps_prob->obj_offset = presolver->prob->obj->offset; // create bounds arrays ps_prob->lbs = (double *) malloc(A->n * sizeof(double));