Skip to main content

objective function with nested sum

Awaiting user input


1 comment

  • Maliheh Aramon
    Gurobi Staff Gurobi Staff

    Hi Maryam, 

    It is hard to know what has gone wrong. Could you please clarify the following in the mathematical expression?

    1. The argument of the \(\mbox{min}\) function is \(r_i(t)\), but there is no variable named \(r_i(t)\) in the expression.
    2. The first sum goes over \(s\) but there is no variable in the expression that depends on \(s\). I assume that \(s\) represents what you are referring to as \(\texttt{months}\), but what \(a\) is then?
    3. The first term starts from \(s=0\) and the second term starts from \(s=1\), but in the code, both terms apparently are summed over the same set of \(s\) values (months).

    Best regards,



Please sign in to leave a comment.