diff --git a/CHANGELOG b/CHANGELOG index 52886c14a6..7144c24783 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -95,6 +95,8 @@ Fixed bugs Miscellaneous ------------- +- add objective offset instead of objective offset variable in cip reader + Known bugs ---------- diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 6de8242362..1d4019b059 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -349,7 +349,7 @@ set(instances_PB "instances/PseudoBoolean/normalized-90_rounds_0_errors.opb\;0" "instances/PseudoBoolean/normalized-t2001.13queen13.1111218308.opb\;+infinity" "instances/PseudoBoolean/normalized-t2001.13queen13.1110976730--soft-33-100-0.wbo\;4" - "instances/PseudoBoolean/wheel010.lap.opb.pre.cip\;25" + "instances/PseudoBoolean/wheel010.lap.opb.pre.cip\;16" ) # @@ -417,7 +417,7 @@ set(instances_Symmetry_A set(instances_Symmetry_B "instances/MIP/stein27_inf.lp\;+infinity" - "instances/PseudoBoolean/wheel010.lap.opb.pre.cip\;25" + "instances/PseudoBoolean/wheel010.lap.opb.pre.cip\;16" ) # @@ -808,7 +808,7 @@ foreach(instance ${instances_MIP_write}) endforeach(instance) # -# test writing and reading from and to different file extensions for MIP +# test writing and reading from and to different file extensions for MIP (only without original objective offset) # foreach(instance ${instances_MIP}) split_instance(instance) @@ -841,7 +841,7 @@ foreach(instance ${instances_MIP}) endforeach(instance) # -# test writing and reading from and to different file extensions for PB +# test writing and reading from and to different file extensions for PB (only without original objective offset) # foreach(instance ${instances_PB}) split_instance(instance) diff --git a/check/instances/PseudoBoolean/wheel010.lap.opb.pre.cip b/check/instances/PseudoBoolean/wheel010.lap.opb.pre.cip index 0a8f76207c..4b90471eb5 100644 --- a/check/instances/PseudoBoolean/wheel010.lap.opb.pre.cip +++ b/check/instances/PseudoBoolean/wheel010.lap.opb.pre.cip @@ -4,7 +4,6 @@ STATISTICS Constraints : 273 initial, 273 maximal OBJECTIVE Sense : minimize - Offset : +9 VARIABLES [binary] : obj=0, global bounds=[-0,1], local bounds=[-0,1] [binary] : obj=1, global bounds=[-0,1], local bounds=[-0,1] diff --git a/check/testset/short.solu b/check/testset/short.solu index 56c6c692bd..7cff4df5ba 100644 --- a/check/testset/short.solu +++ b/check/testset/short.solu @@ -35,7 +35,7 @@ =opt= normalized-mds_50_25_5 3 =opt= normalized-t2001.13queen13.1110976730--soft-33-100-0 4 =inf= normalized-t2001.13queen13.1111218308 -=opt= wheel010.lap.opb.pre 25 +=opt= wheel010.lap.opb.pre 16 =opt= bart10.shuffled 0 =opt= linking 2 =opt= j301_2 47 diff --git a/src/scip/reader_cip.c b/src/scip/reader_cip.c index f9721a3590..4b29348065 100644 --- a/src/scip/reader_cip.c +++ b/src/scip/reader_cip.c @@ -866,14 +866,7 @@ SCIP_DECL_READERREAD(readerReadCip) if( !SCIPisZero(scip, objoffset) && !cipinput.haserror ) { - SCIP_VAR* objoffsetvar; - - objoffset *= objscale; - SCIP_CALL( SCIPcreateVar(scip, &objoffsetvar, "objoffset", objoffset, objoffset, 1.0, SCIP_VARTYPE_CONTINUOUS, - TRUE, TRUE, NULL, NULL, NULL, NULL, NULL) ); - SCIP_CALL( SCIPaddVar(scip, objoffsetvar) ); - SCIP_CALL( SCIPreleaseVar(scip, &objoffsetvar) ); - SCIPdebugMsg(scip, "added variables for objective offset of <%g>\n", objoffset); + SCIP_CALL( SCIPaddOrigObjoffset(scip, objscale * objoffset) ); } if( cipinput.section != CIP_END && !cipinput.haserror )