Greetings...
I need to write an objective like the following:
sum {t in period, b in SetB} ( ParA[t, b]*VarA[t,b] / (sum{c in SetC} ParB[t, b, c]) ).
It needs to do a summation within another summation.
I have written the pulp code like the follows:
model += pulp.lpSum([
ParA[t, b]*VarA[t,b] / (pulp.lpSum([ParB[t, b, c] for c in SetC)) for
t in period, b in SetB ] )
but it did not work. Could anyone help me correct the code? Appreciate your help.
Regards,
Tao