I am trying to reduce the number of binary variables created in the model, but I am still having issues.
This is a simplified version of my code.
CLIENTS_DEPOTS_COMB: array(Clients, Depots) of integer
initializations from 'table.dat'
vars: dynamic array(Clients, Depots) of mpvar
forall(c in Clients, d in Depots | exists(CLIENTS_DEPOTS_COMBS(c,d)) ) create(vars(c,d))
forall(c in Clients, d in Depots | exists(CLIENTS_DEPOTS_COMBS(c,d)) ) (vars(c,d)) is binary
I am getting 100000 vars. But in the table CLIENTS_DEPOTS_COMB there is only 3000 combinations, so I am expecting only 3000 vars.
The data table looks like this
CLIENTS_DEPOTS_COMB : [
What could be the reason I am not getting only 3000 vars?