pantelis / cs634-summer-2020-capstone

The CS634-summer-2020 capstone project.
Apache License 2.0
2 stars 6 forks source link

Group Mobility Controller #2

Open KirstenSchulz opened 4 years ago

KirstenSchulz commented 4 years ago

Design of Structures: 4D Array Structure of controller d1 = some mapped conversion from min-max NYC latitude rounded to the 10th, 40.6 to 41.7, multiplied by 10 and round to n rows, for example 406 to 417, will be 12 rows. d2 = some mapped conversion from min-max NYC longitude rounded to the 10th, -74.3 to -72.9, multiplied by 10 and round to m columns. d3 = 24 hours d4 = IDs (inflexible in arrays given that each spot has different thresholds)

Other possible structure d4 may not be needed if the only thing that matters is that the agent do not ask consecutive requests in the whole system. In that case an independent structure can be maintained for IDs like a Queue and in d3 we just put the number of accumulated individuals.

2D Array Structure of thresholds threshold 0=”do nothing”, threshold n=hot spots-threshold Once threshold has been calculated, they should be saved. Threshold could be simulated or produce using the NYC taxi data, adding the drop off per coordinates, and taking only a percentage of it

Other important values to be checked at the beginning are complete lockdown (zero booking), health state of agents , etc. Epidemologic model is based on a daily movement; so we use 24 hours 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