0

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

Una
  • 13

1 Answers1

1

The typical way to do this is to assign a value that cannot be a flight number, say $-1$, when there is no predecessor and $p(f)$ would be empty. Does that meet your needs?

Ross Millikan
  • 374,822
  • Ross, thank you for your reply. I was also thinking to assign -1 to a non-existing flight. However, I would like to know how to express the same statement as defined above, without defing p(f) as a set. – Una Dec 24 '13 at 18:34
  • You could use the expression you have, just taking the braces off. Then it will have an integer value. You need a bit of a clause for the $-1$ case – Ross Millikan Dec 24 '13 at 19:08