StructJuMP / StructJuMP.jl

A block-structured optimization framework for JuMP
Other
54 stars 19 forks source link

support for lazy constraint modeling #40

Closed kaarthiksundar closed 4 years ago

kaarthiksundar commented 7 years ago

Does StructJuMP support modeling lazy or user cuts for the parent problem?

blegat commented 7 years ago

Could you be more specific ?

kaarthiksundar commented 7 years ago

More specifically, can we do this using StructJuMP?

using StructJuMP

numScen = 2
m = StructuredModel(num_scenarios=numScen)
@variable(m, x[1:2])
@constraint(m, x[1] + x[2] <= 100)
@objective(m, Min, x[1] + x[2])
addcutcallback(m, usercutgenerator)
addlazycallback(m, lazycutgenerator)

for i in 1:numScen
    bl = StructuredModel(parent=m, id=i)
    @variable(bl, y[1:2])
    @constraint(bl, x[1] + y[1] + y[2] ≥  0)
    @constraint(bl, x[2] + y[1] + y[2] ≤ 50)
    @objective(bl, Min, y[1] + y[2] + y[1])
end
kibaekkim commented 7 years ago

@kaarthiksundar I believe you could use those functions in StructJuMP model. But, the question would be whether there is a solver to handle the callback functions. Please mind that StructJuMP is a modeling package, not a solver. This is same in JuMP, where you can use the callback functions. But, only a few solvers can address the functions.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days