Unable to save GDX file

Hi all,

I’m trying to save my GDX output file. It worked prior to making some big changes to the model formulation, but I’m unsure how that would have made any difference to the saving the GDX file:

# Model definition
b1 = Model(
    container=m,
    name="b1",
    equations=m.getEquations(),
    problem="LP",
    sense=Sense.MIN,
    objective=Z,
)

# Solve the model
gdx_path = m.gdxOutputPath()
print(gdx_path)
b1.solve(
    output=sys.stdout,
    options=Options(report_solution=1),
    solver_options={
        "reslim": "100",
         "solnpoolmerge": "mysol2.gdx",
    }
)

Normally, a GDX file with my solutions are formed in the same folder as the python folder. For some reason, it isn’t saving at all anymore.

solnpoolmerge generates and stores multiple solutions to a MIP problem. But your problem seems to be an LP. See https://www.gams.com/48/docs/S_CPLEX.html#CPLEXsolnpool for more details.

1 Like