Help with constraint formulation
回答済みHi there! I am trying to model a problem about scheduling shows for a musical tour.
As input, i have a set of dates D and a set of places P, each place having a capacity Ci, ticket price Ti and rent Ri.
I have the variables Xij, that denotes if the band plays at the place i on date j.
The objective function is to maximize profit from tickets sales considering place capacity and rent cost.
But for the constraints, i'm having trouble trying to think of how to model the following constraint: the band can only play multiple dates in a single place if theses dates are consecutive.
Like, the band can play at place P on dates D and D+1, but it can not play there on dates D and D+3
Can someone help me on this? Even if with just an idea i can follow. I would very much appreciate this so thank you so much if you're willing to help!!
0
-
Hi,
I think you would like to enforce if the band plays on day \(j\) at place \(i\), i.e., \(x_{ij} = 1\) and it plays on day \(k > j\) at place \(i\), i.e., \(x_{ik} = 1\), then \(x_{il} = 1, ~~ j+1 \leq l \leq k-1\). You can model this constraint as:
\[x_{il} \geq x_{ij} + x_{ik} - 1, ~~ i \in P, j \in D, k \in D, k > j, j+1 \leq l \leq k-1\]
Best regards,
Maliheh
0
サインインしてコメントを残してください。
コメント
1件のコメント