Branch and Price Constraint Handler
Hi guys, I had a quick question on implementing branch and price using pySCIPOpt. The issue https://github.com/scipopt/PySCIPOpt/issues/395 was very helpful in explaining how to implement branch and price in pySCIPOpt.
My pricer and branch rule both seem to work properly. My only issue is with the constraint handler. From what I understand, after the branching is done (i.e. create child constraint nodes), the model should enter one of the child nodes and go to the "consactive" method of the constraint handler. However, this does not happen for me. After my branching, the model goes back to the pricer. If I check "self.model.data['branchingCons']", I notice that the branching constraints are added but none of the constraints are active (I check this using the .isActive() method).
How can I ensure that the model goes to the constraint handler after the branching is done?
-Thanks!
Did you add the constraint created by self.model.createCons() in the constraint handler to the node by calling self.model.addConsNode(child1, cons)? I forgot this at first and non of the methods of the constraint handler were called. After adding it worked.
Additionally, you have to make sure to add the ConstraintHandler to the model: model.includeConshdlr()
I'm closing this issue due to inactivity @thksid, but if it's still relevant feel free to reopen it!