Skip to content

Feature request: Hard constraints for IIS extraction #201

Description

@OrestisLomis

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.

Activity

  1. DominikKamp commented on May 20, 2026

    @DominikKamp
    Contributor

    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?

  2. Joao-Dionisio commented on May 20, 2026

    @Joao-Dionisio
    Member

    PySCIPOpt#1221 wraps SCIPcaptureCons() and SCIPreleaseCons().

  3. DominikKamp commented on May 21, 2026

    @DominikKamp
    Contributor

    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.

  4. OrestisLomis commented on May 21, 2026

    @OrestisLomis
    Author

    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.

  5. DominikKamp commented on May 21, 2026

    @DominikKamp
    Contributor

    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?

  6. pmeinhold commented on May 21, 2026

    @pmeinhold
    Contributor

    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.

  7. DominikKamp commented on May 21, 2026

    @DominikKamp
    Contributor

    Yes, indeed the captures are ignored by the component extension, though it should be possible to respect them.

  8. pmeinhold commented on May 27, 2026

    @pmeinhold
    Contributor

    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?

  9. OrestisLomis commented on May 27, 2026

    @OrestisLomis
    Author

    Hmmm, I just checked again and it seems my judgement was too quick. Apologies, but indeed just capturing does not suffice.

  10. OrestisLomis commented on Sep 11, 2026

    @OrestisLomis
    Author

    Hi @DominikKamp

    Any updates on this?

    Best
    Orestis

  11. DominikKamp commented on Sep 12, 2026

    @DominikKamp
    Contributor

    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?

  12. pmeinhold commented on Sep 23, 2026

    @pmeinhold
    Contributor

    Yes, it is on my list! Cannot make any scheduling guarantees however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions