Skip to content

Commit

Permalink
fix assert in parallel Cbc
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Oct 30, 2023
1 parent e47ab56 commit c08a3b1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/CbcThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1352,9 +1352,8 @@ int CbcModel::splitModel(int numberModels, CbcModel **model,
OsiBranchingObject *bobj = node->modifiableBranchingObject();
CbcBranchingObject *cbcobj = dynamic_cast< CbcBranchingObject * >(bobj);
//assert (cbcobj);
if (cbcobj) {
if (cbcobj && cbcobj->object()) {
CbcObject *object = cbcobj->object();
assert(object);
int position = object->position();
assert(position >= 0);
assert(object_[position] == object);
Expand Down Expand Up @@ -1720,9 +1719,8 @@ void CbcModel::moveToModel(CbcModel *baseModel, int mode)
// Make node join correctly
OsiBranchingObject *bobj = node->modifiableBranchingObject();
CbcBranchingObject *cbcobj = dynamic_cast< CbcBranchingObject * >(bobj);
if (cbcobj) {
if (cbcobj && cbcobj->object()) {
CbcObject *object = cbcobj->object();
assert(object);
int position = object->position();
assert(position >= 0);
assert(object_[position] == object);
Expand Down

0 comments on commit c08a3b1

Please sign in to comment.