Skip to content

Linear problems duals #343

Closed
Closed
@Tambup

Description

@Tambup

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions