Skip to content
Snippets Groups Projects
Commit 8719ac33 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

in feature_base, only adding constraint if its status = ACTIVE

parent d8bbbc3f
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,10 @@ ConstraintBasePtr FeatureBase::addConstraint(ConstraintBasePtr _co_ptr) ...@@ -59,7 +59,10 @@ ConstraintBasePtr FeatureBase::addConstraint(ConstraintBasePtr _co_ptr)
_co_ptr->setProblem(getProblem()); _co_ptr->setProblem(getProblem());
// add constraint to be added in solver // add constraint to be added in solver
if (getProblem() != nullptr) if (getProblem() != nullptr)
getProblem()->addConstraintPtr(_co_ptr); {
if (_co_ptr->getStatus() == CTR_ACTIVE)
getProblem()->addConstraintPtr(_co_ptr);
}
else else
WOLF_TRACE("WARNING: ADDING CONSTRAINT ", _co_ptr->id(), " TO FEATURE ", this->id(), " NOT CONNECTED WITH PROBLEM."); WOLF_TRACE("WARNING: ADDING CONSTRAINT ", _co_ptr->id(), " TO FEATURE ", this->id(), " NOT CONNECTED WITH PROBLEM.");
return _co_ptr; return _co_ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment