-
Notifications
You must be signed in to change notification settings - Fork 42
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
user-friendly modeling of multiple subproblems #38
Comments
It is good for me. The only thing is the meaning of "key[1]" in csp_decomp_func. I do not understand what does this mean. |
|
following the model in my email the code would look like function model_scsp(d::DataCsp)
params = Coluna.Params(use_restricted_master_heur = true)
csp = Model(with_optimizer(Coluna.ColunaModelOptimizer, params = params),
bridge_constraints = false)
max_nb_patterns = sum(d.orders[o].demand for o in 1:d.nborders)
O = index_set(csp, d.nborders) # K denotes the set of stock sheet type index
K = index_set(csp, 1) # K denotes the set of stock sheet type index
P = sub_index_set(csp, K, max_nb_patterns) # P denotes the set of cutting pattern index for a given stock sheet type, in this case indentical for each k in K
Coluna.set_dantzig_wolfe_decomposition(csp, K) # defines a pricing subproblem per index k in K
for k in K
Coluna.set_dantzig_wolfe_subdecomposition(csp, k, P) # defines a pricing subsubproblem per index k in K
end
@variable(csp, 0 <= x[k in K, p in P, o in O] <= d.orders[o].demand, Int)
@variable(csp, 0 <= z[k in K, p in P] <= max_nb_patterns, Int)
@constraint(csp, cov[o in 1:d.nborders],
sum(x[k, p, o] * z[k] for k in K, p in P) >= d.orders[o].demand)
@constraint(csp, knp[k in K, p in P],
sum(x[k, p, o] * d.orders[o].width[k] for o in O)
<= d.stocksheetswidth[k] )
@objective(csp, Min, sum(z[k, p] for k in K, p in P))
# setting Dantzig Wolfe decomposition function: (NOT NEEDED ANYMORE)
# setting pricing cardinality bounds (NOT NEEDED ANYMORE)
return (csp, x, z)
end Then we can access the solution using: for (k,p) in (K,P)
@show value(z[k, p])
for o in 0
@show value(x[k, p, o])
end
end |
François, this model is for cutting stock with several stock sheet types? This is too complicated for me. |
Here are the several models discussed in the meeting with different modeling "style". for now model 2 is almost available for all considered applications. |
Issam,
Is there any documentation for @axis? Is it the standard JuMP thing or a new one?
Ruslan
… On 4 Feb 2019, at 16:28, Issam Tahiri ***@***.***> wrote:
Here are the several models discussed in the meeting. with different modeling "style" for now model 2 is almost available for all considered applications.
https://github.com/atoptima/Coluna.jl/wiki
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
---------------------------------------------------------------
Ruslan Sadykov
Research Fellow ( CR1 )
Project-team RealOpt
INRIA Bordeaux - Sud-Ouest
351 cours de la Libération, 33405 Talence, France
+33 5 40 00 60 52
http://www.math.u-bordeaux.fr/~sadykov/
|
I tried to write down the suggestion of François.
Instead of this: https://github.com/atoptima/Coluna.jl/blob/master/examples/CuttingStock_SubprobMultiplicity/model_csp.jl
we could have this:
Then we can access the solution using:
Advantages :
Drawbacks :
The text was updated successfully, but these errors were encountered: