Open DouBiBaNi opened 2 months ago
Can reproduce. Here is a smaller MRE
def create_master_problem():
master = Model()
x = master.addVar()
return master, x
def create_sub_problem():
sub = Model()
return sub
def benders_decomposition():
master, x = create_master_problem()
sub = create_sub_problem()
master.initBendersDefault(sub)
master_initial_sol = master.createSol()
master.setSolVal(master_initial_sol, x, 1)
master.addSol(master_initial_sol)
master.optimize()
benders_decomposition()
Of course the code crashes when optimizing, but before doing so it says that the solution is not feasible. I disabled presolving, but it remains infeasible then.
Another separate problem is that optimizing just crashes without error message when using trySol
instead.
Thank you for your reply and look forward to a quick resolution. T_T
Dear support team,
I want to know how to set the initial solution when using benders decomposition.
I want to solve the problem with benders decomposition
This is my demo code.
When I don't set
master.initBendersDefault(sub)
, scip hintsI can get answer:
But I set
master.initBendersDefault(sub)
, scip hintsI get answer
Why is there infeasible when I set
initBendersDefault
? And I'm really confused about how to set the initial solution for the Benders decomposition.