メインコンテンツへスキップ

Help! Dynamic constraint definition for power system MIP optimization in Gurobi

ユーザーの入力を待っています。

コメント

1件のコメント

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Elliott,

    In your code that you would like to convert, it would be best to not misuse \(\texttt{t}\) as iterator and fixed value. I think that the following should also work for you

    for T in time_periods:
       UT = min(gen['time_up_minimum'],data['time_periods'])
       if T >= UT:
    m.uptime[g,t] = sum(m.vg[g,t] for t in range(T-UT+1, T+1)) <= m.ug[g,T]

    You can then convert the above to Gurobi code by looping over time_periods and adjusting \(\texttt{p}\) to \(\texttt{T}\) in the \(\texttt{range}\) function.

    Best regards, 
    Jaromił

    0

サインインしてコメントを残してください。