instance.defn_Cut.add(iterCuts, (0, sum(instance.alpha_a1[iterCuts,x]*instance.z1[x,y]*instance.alpha_a1[iterCuts,y] + \
instance.alpha_a1[iterCuts,x]*instance.z2[x,y]*instance.alpha_a2[iterCuts,y] + \
instance.alpha_a2[iterCuts,x]*instance.z3[x,y]*instance.alpha_a1[iterCuts,y] + \
instance.alpha_a2[iterCuts,x]*instance.z4[x,y]*instance.alpha_a2[iterCuts,y] for x in instance.X for y in instance.Y), None))
instance.preprocess()
This is similar to the Benders example where additional cuts are added to the master problem. For iterCuts=1 and for [x,y] where X = Y = {0, 1, 2, . . . 13}, the time is 11.374 seconds for the "add"-line and 4.875 for the "preprocess"-line. This is for a relatively small test problem.
The instance.alpha_a1[iterCuts,y] and instance.alpha_a2[iterCuts,y] are parameters, which are set uniquely for each additional cut. The z's are variables.
The long run time is making it difficult to even test the simplest of problems. Any suggestions to improve the performance?
Many Thanks, Anya
preprocess_constraint(instance, instance.Plin_cons)
for the constraint you just modified.