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

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

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

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • 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

投稿コメントは受け付けていません。