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

Constraint on variable overwritten #583

Closed
laradicp opened this issue Aug 10, 2021 · 1 comment
Closed

Constraint on variable overwritten #583

laradicp opened this issue Aug 10, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@laradicp
Copy link
Contributor

Describe the bug
When adding a new constraint on variable, it may overwrite previous constraints of the same type.

To Reproduce

# x >= 1
c1 = MOI.add_constraint(
    model,
    MOI.SingleVariable(x),
    MOI.GreaterThan(1),
)
# x >= 2
c2 = MOI.add_constraint(
    model,
    MOI.SingleVariable(x),
    MOI.GreaterThan(2),
)

Impossible to delete c2 without losing c1 because Coluna._constraint_on_variable! called by MOI.add_constraint changes the perennial bounds of the variables.

Additional context
Maybe related to the incomplete dual solution (missing MOI.ConstraintDual for SingleVariable constraints) and to #531.

@laradicp laradicp added the bug Something isn't working label Aug 10, 2021
@guimarqu guimarqu added this to the v0.4 milestone Aug 31, 2021
@guimarqu guimarqu modified the milestones: v0.4, 2022T2 Dec 16, 2021
@guimarqu
Copy link
Contributor

guimarqu commented Mar 18, 2022

Coluna will now throw an error MOI.LowerBoundAlreadySet. (see #628)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants