We 've got an operation Bus_Arrives that accepts the following
A LINE, a BUS_ID and a BUSROAD
- A bus of a given line arrives at the station and is assigned an empty
bus-road, if one is available. Otherwise it enters a queue.
--------New_Bus_Arrives-----------------------------------------------------------------------------------------------
| Δ Bus_Station
| busline?: LINE
| bus?: BUS_ID
| br?: BUSROAD
==============================================
| preconditions go here(the case of adding that to the queue is implemented, but I am not adding it since its not related with the question.) below is how the system changes after this operation get completed.
| free' = free \ {br?}
| routing' = routing
| departure' = departure U {br? |--> bus?}
| visits' = visits U {br? |--> routing(|line?|) }
My question is: if the visits is represented correctly is Z, for example, when the routing(line?) relation is called it returns a set of station elements {station1,station2,station3}. However, when I am mapping this to the visits relation to update it I am doing this: br? maps to {station1,station2,station3}. Is this possible or i have to say that br? maps to every single element of the set separately. Also if this is the case how is it represented in Z?
Extra information about what is described:
routing: For every correspondence bus-line, what are the stations the bus passes through to arrive there(i.e - Line 8 travels to L.A, N.Y and Miami).
routing: LINE <--> STATION (relation)
free: Which bus-roads are available.
free: Π BUSROAD (power-set)
departure: For every bus what bus-line it departs from (example from A departs bus AY123).
departure: LINE --> BUS_ID (function)
visits: For every bus-road that currently has a bus assigned, what stations it will visit. A bus-road can either have one and only one bus on it or be available.
visits: BUS_ROAD <--> STATION (relation)