Skip to main content

Indicator day of week

Ongoing

Comments

2 comments

  • Riley Clement
    Gurobi Staff 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
    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

Please sign in to leave a comment.