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

Easy way to determine constraints and/or variables leading to failed solving? #2185

Closed
lfreese opened this issue Feb 28, 2020 · 2 comments
Closed

Comments

@lfreese
Copy link

lfreese commented Feb 28, 2020

Hi,

I'm solving an optimization over time (1 year by hour, so 8759 runs of the model) by submitting it to a slurm, and during a given number of my timesteps (5001-6000), I get:
Parallel mode: deterministic, using up to 32 threads for concurrent optimization. Row 'c1' infeasible, all entries at implied bounds. Presolve time = 11.16 sec. (3193.35 ticks) ERROR: LoadError: The model was not solved correctly.

I'm wondering if there is a simple way within JuMP to figure out what constraints or variables is causing the inability to solve the model (eg: what timestep, which of my 4 constraints)?

I've looked at the documentation and haven't found something that would specifically work in the context of slurm submissions, but might be mistaken.

@odow
Copy link
Member

odow commented Feb 28, 2020

In general:

At present, there is limited support for the accessing the Irreducible Infeasible Subset (IIS) in some solvers: #1035

We also have a GSOC project for this: https://github.com/jump-dev/GSOC2020/blob/master/ideas-list.md#feasibility-and-optimality-checker

For your specific case:

what timestep

Is each hour a different model? Impossible to say without your code.

which of my 4 constraints

From Row 'c1' infeasible, all entries at implied bounds, it looks like the first constraint.

If you want detailed advice, it might be better to post on https://discourse.julialang.org/c/domain/opt/13. Make sure to read the first post of https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757 and provide a minimal working example.

For Gurobi, you can use

using JuMP
using Gurobi
using Test

model = direct_model(Gurobi.Optimizer())
@variable(model, x >= 1)
@constraint(model, c, x <= 0)
optimize!(model)
@test termination_status(model) == MOI.INFEASIBLE
Gurobi.compute_conflict(backend(model))
MOI.get(model, Gurobi.ConstraintConflictStatus(), c)
MOI.get(model, Gurobi.ConstraintConflictStatus(), LowerBoundRef(x))

@lfreese
Copy link
Author

lfreese commented Mar 5, 2020

Thanks! I'll post on the site there. It does seem to be the first constraint based on the c1, so that makes it clearer.

@lfreese lfreese closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants