Skip to content

Commit

Permalink
Backend: only pass suffixes when available
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Feb 21, 2024
1 parent 99337d4 commit 88f992d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions include/mp/backend-mip.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ class MIPBackend : public BaseBackend
if (lazy_user_cuts())
InputLazyUserCuts();
InputStartValues();
if (priorities())
VarPriorities( ReadSuffix(suf_varpriority) );
if (priorities()) {
if (auto pri_array = ReadSuffix(suf_varpriority))
VarPriorities( pri_array );
}
}

virtual void InputLazyUserCuts() {
Expand Down
12 changes: 8 additions & 4 deletions include/mp/backend-std.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,14 @@ class StdBackend :
/// Standard extras
virtual void InputStdExtras() {
if (multiobj()) {
ObjPriorities( ReadSuffix(suf_objpriority) );
ObjWeights( ReadSuffix(suf_objweight) );
ObjAbsTol( ReadSuffix(suf_objabstol) );
ObjRelTol( ReadSuffix(suf_objreltol) );
if (auto suf = ReadSuffix(suf_objpriority))
ObjPriorities( suf );
if (auto suf = ReadSuffix(suf_objweight))
ObjWeights( suf );
if (auto suf = ReadSuffix(suf_objabstol))
ObjAbsTol( suf );
if (auto suf = ReadSuffix(suf_objreltol))
ObjRelTol( suf );
}
if (feasrelax())
InputFeasrelaxData();
Expand Down

0 comments on commit 88f992d

Please sign in to comment.