-
Notifications
You must be signed in to change notification settings - Fork 24
Linear problems duals #343
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
Comments
Hi!
Yes it is able to solve linear programs but it will not provide a dual
solution, they are not exposed from the internal LP solved by SCIP to the
SCIP outer API
…On Mon, May 26, 2025, 14:53 Alberto Tamburini ***@***.***> wrote:
*Tambup* created an issue (scipopt/SCIP.jl#343)
<#343>
Hello!
Is this binding able to solve linear problems? Mainly asking because I get
an error when I try to get a dual for a problem.
The error is:
ERROR: MathOptInterface.GetAttributeNotAllowed{MathOptInterface.ConstraintDual}:
## Cause
Getting attribute MathOptInterface.ConstraintDual(1) cannot be performed because:
SCIP.Optimizer does not support getting the attribute MathOptInterface.ConstraintDual(1).
## Fixing this error
An `MOI.NotAllowedError` error occurs when you have tried to do something that
is not implemented by the solver.
The most common way to fix this error is to wrap the optimizer in a
`MOI.Utilities.CachingOptimizer`.
For example, if you are using `JuMP.Model` or `JuMP.set_optimizer`, do:
```julia
model = JuMP.Model(optimizer; with_cache_type = Float64)
model = JuMP.GenericModel{T}(optimizer; with_cache_type = T)
JuMP.set_optimizer(model, optimizer; with_cache_type = Float64)
Similarly, if you are using MOI.instantiate, do:
model = MOI.instantiate(optimizer; with_cache_type = Float64)
My understanding is that my problem is not solved as a linear problem, but
as a MILP. But then, how can I retrieve the dual variables?
My idea was to use SCIP as the master problem in a column generation
algorithm, but without the dual variables I'm a bit stuck. If something can
be done similarly to the SCIP tutorial in C++ I'm happy to follow that way.
Thank you!
—
Reply to this email directly, view it on GitHub
<#343>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2FDMXT2NWHZPGR47VNZJD3AMFEZAVCNFSM6AAAAAB55SHTB6VHI2DSMVQWIX3LMV43ASLTON2WKOZTGA4TCMJSGU2DKNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thank you! Then, I guess there is no way to use SCIP through JuMP for column generation, right? |
Not directly but a column generation example should be adaptable to the
SCIP.jl wrapper, using SCIP-specific functions.
For a start, maybe check the Python examples in
https://github.com/mmghannam/scipdex
Mathieu Besançon
…On Mon, May 26, 2025, 15:08 Alberto Tamburini ***@***.***> wrote:
*Tambup* left a comment (scipopt/SCIP.jl#343)
<#343 (comment)>
Thank you!
Then, I guess there is no way to use SCIP through JuMP for column
generation, right?
—
Reply to this email directly, view it on GitHub
<#343 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2FDMX7VDOUELVDDBPIGFL3AMG5TAVCNFSM6AAAAAB55SHTB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBZG4YDANZWGY>
.
You are receiving this because you commented.Message ID: <scipopt/SCIP.
***@***.***>
|
Perfect, thank you and I'm closing the issue! |
Just a comment @Tambup: when using JuMP you must always check the return of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Is this binding able to solve linear problems? Mainly asking because I get an error when I try to get a dual for a problem.
The error is:
Similarly, if you are using
MOI.instantiate
, do:My understanding is that my problem is not solved as a linear problem, but as a MILP. But then, how can I retrieve the dual variables?
My idea was to use SCIP as the master problem in a column generation algorithm, but without the dual variables I'm a bit stuck. If something can be done similarly to the SCIP tutorial in C++ I'm happy to follow that way.
Thank you!
The text was updated successfully, but these errors were encountered: