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

Defining a constraint on time when time is an index to other variables

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

コメント

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

    But so far I was not able to find a way to write this, because time steps are indices to the variables I have defined. 

    The post use a decision variable as an index discusses one possibility of defining such variables.

    I also cannot define a new variable for the time, e.g., Continuous variable s(n_cars, n_nodes) is the arrival time of a car at a node, or something similar.
    This is because I do not know in advance how many times a vehicle might want to pass through or wait at a particular node. 

    I am not sure I understand the issue here. You could define a continuous variable s(n_cars, n_nodes) with some fixed upper and lower bounds defining the min/max waiting time and then let the solver decide what the optimal solution value is. Could you elaborate a bit more on this?

    Best regards, 
    Jaromił

    0

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