If health_status = 0 (sick), immediate rejection. Parameter needed only if agent is allowed by Agent Based Model to emit booking request for an agent who is sick.
desired_slot is between 0 and 23 (or 1 and 24)
type=2 (cancelation):
ID is required
Slot is required
Duration is required in case of only partial cancelations.
Coordinates are required.
Outgoing interface:
BookingConfirmation return(code=0, slot=slot)
Code = 0 and slot = desired date-time slot or next available slot.
Code = -1 and slot = 0, rejected booking
Interfaces from/to Agent Based Model:
Incoming Interface: BookingRequest( type=1, agent_ID=agent_ID, children=0, health_status = 1, desired_slot = SystemTime + 1 hour, duration = 1, orig_lat = orig_lat, dest_lat= dest_lat, orig_long=orig_long, dest_long = dest_long)
type =1 (booking):
All fields are required. We will convert the distance from latitude and longitude to miles: https://gis.stackexchange.com/questions/142326/calculating-longitude-length-in-miles If distance is less than a mile, immediate approval.
If health_status = 0 (sick), immediate rejection. Parameter needed only if agent is allowed by Agent Based Model to emit booking request for an agent who is sick.
desired_slot is between 0 and 23 (or 1 and 24)
type=2 (cancelation):
ID is required Slot is required Duration is required in case of only partial cancelations. Coordinates are required.
Outgoing interface: BookingConfirmation return(code=0, slot=slot) Code = 0 and slot = desired date-time slot or next available slot. Code = -1 and slot = 0, rejected booking