0

I am trying to set initial values for the below created decision variable, but when I try to do am getting an error?


dec_var = LpVariable.matrix("dec_var",(range(10),range(10)),0,1,cat = 'Binary')

for i in range(10):
    for j in range(10):
        dec_var[i][j].setInitialValue(temp_matrix[i][j])

1 Answers1

0

Issue found to be using the older version of pulp, after upgrading the library to latest version. I didn't face any issue with this.