I have a list like:
list = [var_1, var_2, var_3]
Using Pulp library, I'm trying to define them as variables with a for loop doing:
LpVariable(list[i] for i in range(len(list)))
Then I'm trying to sum them all and asign it to the model:
model += LpVariable(list[i] for i in range(len(list)))
In both cases I'm getting an error that says expected string or bytes-like object
Can anyone help me?
Regards