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

Challenges in conditional constraints in a VRP variant

回答済み

コメント

2件のコメント

  • Ryuta Tamura
    Gurobi Staff Gurobi Staff

    Hi Noah,

    This article might be useful. This means that adding the constraint for the case of the binary variable is 0. For example:

    model.addGenConstrIndicator(CL_time_bin[i, (t_start, t_end)], True, s[i] <= t_end)
    model.addGenConstrIndicator(CL_time_bin[i, (t_start, t_end)], False, s[i] >= t_end + eps)

    Here, eps is a suitably small constant. Note that too small values (ex. <1e-6) may be ignored for Gurobi's tolerance. For your problem, the unit of time to be handled (1s, 1m, 1h, etc.),  may be sufficient.

    Thanks,
    Ryuta

    0
  • Noah Miller
    First Question
    First Comment

    Hi Ryuta,

    I appreciate the insight. I wasn't properly understanding the meaning of that article and how it can apply to the general indicator constraints. 

    Thanks,

    Noah

    0

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