Skip to main content

Indicator day of week

Ongoing

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Riley Clement
    • Gurobi Staff

    Hi Vida,

    I think there is probably a better way of achieving what you want.

    sum(mu0[beta, v] * day_indicator for v in range(a) if Phi(t) == days_of_week[v])

    Where has t come from here?  It is not defined in your code snippet.

    - Riley

    0
  • Vida Yousefinezhad
    • Gurobi-versary
    • Curious
    • Conversationalist

    Hi Riley,

    t refers to each period (each day) in the planning horizon, p=20, and beta refers to the product in b=4. 

    -Vida

     

    0

Post is closed for comments.