I'm trying to write a simple mathematical formulated which expresses the following:
Let F={f1,f2,...,fn} be an ordered set of flights, each f being associated with a begin time begin(f) and an end time end(f). Moreover, each flight is assigned to some gate g \in G. A boolean variable x_{f,g} takes the value 1 if f is allocated to g, and 0 otherwise.
I would like to find a way to define the value p(f), which is the immediate previous flight of a flight f at gate g \in G. I was thinking to express p(f) as follows:
p(f) = {f' ∈ F : ∃g ∈ G, x_f,g = 1 and x_f' ,g = 1, max(end(f')) and end(f') ≤ begin(f)}
This means that p(f) is a set which can either be empty or have one value (flight ID). However, it is more natural for me to represent p(f) as a single value and not a set, but I do not now how to formulate it in that case. I'm grateful for any comments.
Thanks, Una