You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Hard constraints for IIS extraction #201
Currently when computing an IIS all constraints are considered 'soft' constraints, i.e. all of them may be removed to construct an IIS. However it would be interesting if we could actually indicate certain constraints as 'hard' constraints. A hard constraint in the context of IIS, would be a constraint that is always considered part of the IIS. I'm using the python API for SCIP, so apologies if this is not the right place to post this.
If a constraint is captured in the IIS subscip before running the finder, it will not be removed, but I am not sure whether this can be achieved through the API yet.
@Joao-Dionisio How can constraints be captured through the Python API?
@pmeinhold Can the IIS subscip be accessed before running an IIS finder in the C API?
Good, so the remaining task is to provide access to the IIS subscip before generation, unless the original captures are shipped to the subscip automatically, which can be unexpected.
Hi thanks for the quick help! I just checked out the branch which exposes SCIPcaptureCons() (and SCIPreleaseCons()) and it already seems to work as I would expect it to. Not sure what would still be missing.
Looking a little bit into this, I'm really not sure how the captures are copied. SCIPcopyOrig(set->scip, iis->subscip, ...) is used, which, according to documentation, does not capture the variables.
Also, the subscip is currently not accessible before running IIS finders, since it is created just before running these. @DominikKamp
I'm puzzled, how capturing constraints in the original problem apparently "saves" them from deletion during IIS finding. And new features (like component detection) are not built to respect an increased usage counter anyways.
Unless I missed something big here, it needs more work to implement the requested feature correctly.
Hi thanks for the quick help! I just checked out the branch which exposes SCIPcaptureCons() (and SCIPreleaseCons()) and it already seems to work as I would expect it to. Not sure what would still be missing.
I tried to reproduce this by capturing constraints in the original problem before generating an IIS.
But it does not affect the IIS at all. Are you sure this worked for you?
No update beyond that this is better modelled with separate IIS specific flags. Internally this could still be implemented by captures on the IIS subscip instance, but it is not really intuitive to control this with captures on the main SCIP instance since they would still need to be transferred explicitly.
@pmeinhold Could you take care of this when you find the time?
Activity
DominikKamp commentedon May 20, 2026
If a constraint is captured in the IIS subscip before running the finder, it will not be removed, but I am not sure whether this can be achieved through the API yet.
@Joao-Dionisio How can constraints be captured through the Python API?
@pmeinhold Can the IIS subscip be accessed before running an IIS finder in the C API?
Joao-Dionisio commentedon May 20, 2026
PySCIPOpt#1221 wraps
SCIPcaptureCons()andSCIPreleaseCons().DominikKamp commentedon May 21, 2026
Good, so the remaining task is to provide access to the IIS subscip before generation, unless the original captures are shipped to the subscip automatically, which can be unexpected.
OrestisLomis commentedon May 21, 2026
Hi thanks for the quick help! I just checked out the branch which exposes
SCIPcaptureCons()(andSCIPreleaseCons()) and it already seems to work as I would expect it to. Not sure what would still be missing.DominikKamp commentedon May 21, 2026
Okay, then the captures are probably already copied and scipopt/PySCIPOpt#1221 would be enough.
@pmeinhold When you find the time, could you ensure that this feature is sufficiently covered in the IIS documentation?
pmeinhold commentedon May 21, 2026
Looking a little bit into this, I'm really not sure how the captures are copied.
SCIPcopyOrig(set->scip, iis->subscip, ...)is used, which, according to documentation, does not capture the variables.Also, the subscip is currently not accessible before running IIS finders, since it is created just before running these. @DominikKamp
I'm puzzled, how capturing constraints in the original problem apparently "saves" them from deletion during IIS finding. And new features (like component detection) are not built to respect an increased usage counter anyways.
Unless I missed something big here, it needs more work to implement the requested feature correctly.
DominikKamp commentedon May 21, 2026
Yes, indeed the captures are ignored by the component extension, though it should be possible to respect them.
pmeinhold commentedon May 27, 2026
I tried to reproduce this by capturing constraints in the original problem before generating an IIS.
But it does not affect the IIS at all. Are you sure this worked for you?
OrestisLomis commentedon May 27, 2026
Hmmm, I just checked again and it seems my judgement was too quick. Apologies, but indeed just capturing does not suffice.
Drop SCIP IIS captureCons grouping and add native MIP MUS tests.
OrestisLomis commentedon Sep 11, 2026
Hi @DominikKamp
Any updates on this?
Best
Orestis
DominikKamp commentedon Sep 12, 2026
No update beyond that this is better modelled with separate IIS specific flags. Internally this could still be implemented by captures on the IIS subscip instance, but it is not really intuitive to control this with captures on the main SCIP instance since they would still need to be transferred explicitly.
@pmeinhold Could you take care of this when you find the time?
pmeinhold commentedon Sep 23, 2026
Yes, it is on my list! Cannot make any scheduling guarantees however.