scipopt / PySCIPOpt

Python interface for the SCIP Optimization Suite
https://pyscipopt.readthedocs.io/en/latest/
MIT License
808 stars 252 forks source link

Missing method addConsNode #260

Closed lukasstevens closed 5 years ago

lukasstevens commented 5 years ago

I'm trying to implement a branch-and-price procedure to solve VRPTW using a set partitioning formulation where each variable represents one valid tour through the graph. I want to branch on the edges of the corresponding graph. Therefore, I save a graph view on each node of the branching tree which only sees the edges which have not been deleted by branching. To make this branching scheme work, variables whose tours have deleted edges in them have to be set to zero in the corresponding subtree of the branching tree. The C interface of SCIP provides the function SCIPaddConsNode for that; however, I didn't find such a function in PySCIPOpt. What can I do?

mattmilten commented 5 years ago

Well, I guess we need to add this method to the interface then. If you dare, you can try for yourself and send us a pull request with the changes.

lukasstevens commented 5 years ago

Thank you for the quick answer. I had a look at the python implementation of addCons in scip.pyx which can probably be reused in parts. Unfortunately, I'm not familiar with cython and very new to SCIP so I don't know what I have to pay attention to when refactoring.

mattmilten commented 5 years ago

Please test the new methods with your code.