Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove constraints [wip] #46

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Nov 13, 2023

this is a start on a removeConstraint method.

  • It's currently implemented for the SCIP backend, but not gurobi.
  • it works, however, if I add an unsatisfiable constraint and try to solve before removing the incompatible constraint, it leaves the solver unable to recover, even if I later make it satisfiable again.

(these lines are shown during the failed solve)

[scip_prob.c:2883] ERROR: invalid SCIP stage <10>
[ScipBackend.cpp:315] ERROR: Error <-8> in function call
[scip_prob.c:2883] ERROR: invalid SCIP stage <10>
[ScipBackend.cpp:315] ERROR: Error <-8> in function call
[scip_cons.c:1148] ERROR: cannot release last use of original constraint while an associated transformed constraint exists
[ScipBackend.cpp:317] ERROR: Error <-8> in function call
[scip_prob.c:2883] ERROR: invalid SCIP stage <10>
[ScipBackend.cpp:315] ERROR: Error <-8> in function call

@@ -6,10 +6,10 @@
#include "Solution.h"
#include "VariableType.h"

class SolverBackend {
class SolverBackend
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about the auto-formatting, will remove and reduce the diff

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #46 (599ac42) into main (7fac186) will increase coverage by 16.58%.
The diff coverage is 87.50%.

@@             Coverage Diff             @@
##             main      #46       +/-   ##
===========================================
+ Coverage   75.72%   92.30%   +16.58%     
===========================================
  Files          17        4       -13     
  Lines         828      390      -438     
  Branches      154        0      -154     
===========================================
- Hits          627      360      -267     
+ Misses        136       30      -106     
+ Partials       65        0       -65     
Files Coverage Δ
ilpy/wrapper.pyx 87.24% <87.50%> (-0.78%) ⬇️

... and 13 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant