Gurobi/Python crashes with "A heap has been corrupted" error message

0

I am running an optimization in Gurobi which crashes whenever I add a quadratic constraint to the problem that I generate thru the following lines of code:

expression = gurobipy.QuadExpr()
for course_key in hostings:
    for kitchen_key in hostings[course_key]:
        if not hostings[course_key][kitchen_key].large_gathering:

expression.add(x[kitchen_key,course_key,team_key1]*x[kitchen_key,course_key,team_key2])

mod.addQConstr(expression,gurobipy.GRB.LESS_EQUAL,1,"1MeetingPerPair_"+team_key1+"_"+team_key2)

The optimization always crashes after three iterations:

cmd output

with the following error message:

Unhandled exception at 0x00007FFC596CE6FC (ntdll.dll) in python.exe:
0xC0000374: A heap has been corrupted (parameters: 0x00007FF8FF82C6E0).

Does anyone have any clue as to how this problem could be solved? I am rather clueless as to what the error message even wants to tell me. I tried constructing the constraint in different ways (e. g. using .add instead of .addTerms) but that didn't change anything. Appreciate any help!

python
python-3.x
gurobi
asked on Stack Overflow Jun 6, 2018 by MaxMike

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0