GCG save the chosen Dantzig Wolfe decomposition structure

Hi, I am solving an MILP model using GCG. Initially I let the solver try various decomposition structures on a small instance until the best structure is obtained.
This process takes sometime. The output prints: Chosen structure has 2 blocks and 34 linking constraints

My question is, how can I print/store the chosen structure and read it to solve larger size instances.

I am using amplpy. I tried setting these options but the .sol file is not printed.

ampl.option[“wantsol”] = 1
ampl.option[“outlev”] = 1
ampl.option[‘solstub’] = ‘solutionstub’

1 Like

Hi @L_Essam,

We have just released a new version of GCG that allows outputting a file with the final decomposition. You can generate a dec file with the decomposition using writeprob=model.dec. You also need to set gcg_auxfiles to pass variable and constraint names.

ampl.option["solver"] = "gcg"
ampl.option["gcg_auxfiles"] = "rc"
ampl.option["gcg_options"] = "outlev=1 writeprob=model.dec"
ampl.solve()