AnsweredAssumed Answered

Reducing execution time for codes with many binary variable.

Question asked by on Apr 13, 2016
Latest reply on Apr 14, 2016 by

I have written a mosel code to solve a problem using the BIG M linearisation approach.

My code contains over 7,000  binary variables and is taking too long to compute (47 minutes).

Without using binary variables, it computes in 1.6 seconds but the binary variables are essential to get the perfect result(integer).

How can I reformulate the binary variables such that the model will have a faster execution time?

Which other way can I use to code the BIG M linearisation approach?


Portions of the code are written below.



I: set of integer

T:set of integer

B: set of integer

g: array (I,T,B) of mpvar

mewmin: array (I,T,B) of mpvar

w1: array (I,T,B) of mpvar




forall (i in I, t in T, b in B)do

w1(i,t,b) is_binary

mewmin(i,t,b)>=0; g(i,t,b)>=0