Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create transfer framework #891

Closed
58 tasks done
benn02 opened this issue Apr 19, 2023 · 0 comments · Fixed by #911
Closed
58 tasks done

Create transfer framework #891

benn02 opened this issue Apr 19, 2023 · 0 comments · Fixed by #911
Assignees
Labels
enhancement New feature or request frontend Issues mainly related to the frontend shared Issues mainly related to shared simulation Issues related to the simulation logic

Comments

@benn02
Copy link
Contributor

benn02 commented Apr 19, 2023

It should be possible to transfer patients and vehicles.

Acceptance criteria

  • There is a TransferPatientsInSpecificVehicleRequestEvent
    • It contains one or more patient UUID(s)
    • It contains a vehicle UUID
    • It contains a transfer destination that may be a transfer point or a hospital
  • There is a TransferSpecificVehicleRequestEvent
    • It contains a vehicle UUID
    • It contains a transfer destination that may be a transfer point or a hospital
  • There is a TransferVehiclesRequestEvent
    • It contains a VehicleResourceDescription
    • It contains a transfer destination that may be a transfer point or hospital
    • It contains an optional key that identifies the request
  • There is a TransferPatientsRequestEvent
    • It contains a VehilceType string
    • It contains a transfer destination that may be a transfer point or hospital
  • There is a RequestReceivedEvent
    • It contains a VehicleResourceDescription specifying what part of the request can be satisfied
    • It contains a key that identifies the request
  • There is a StartTransferEvent
    • It contains a vehicle UUID
    • It contains a transfer destination that may be a transfer point or a hospital
    • It contains an optional key identifying the request that caused this event
  • There is a LoadVehicleActivity
    • It receives zero or more patient UUID(s), a vehicle UUID, a delay and a destination
    • Additionally, it receives a time span (how long loading should take)
    • It optionally receives a key identifying the request that caused this activity
    • It sends patient, personnel, material and removed events for the affected elements
    • It loads the patient(s) and all the vehicles personnel/material into the vehicle and then waits for the specified time (so that personnel and material are already blocked during the loading time)
    • After waiting, it puts the vehicle in transfer by sending a StartTransferEvent (including vehicle UUID, destination and key (optional)) and changing the vehicles occupation to a intermediate occupation, that will last for one tick.
  • The existing TransferVehicleActivity is deleted
    • The AnswerRequestBehavior and AutomaticDistributionBehavior send TransferVehicleTypesRequestEvent instead
  • There is a new TransferVehicleActivity
    • It receives all values that are part of a StartTransferEvent
    • If the destination can't be reached, it...
      • ...sends a missing transfer connection radiogram
      • ...sends a TransferConnectionMissingEvent with the request key if a key was specified
      • ...terminates
    • If the vehicle is not completely loaded (personnel and material, patients do not matter), it terminates
    • It starts the transfer of the specified vehicle to the specified destination
    • It sends a TransferSuccessfulEvent with the request key if a key was specified
  • There is a LoadOccupation that does not include any further properties
  • There is a WaitForTransferOccupation that does not include any further properties
  • There is a TransferBehavior
    • It can be configured with the loading time per patient, loading time for personnel and delay between sending vehicles
    • It handles TransferPatientsRequestEvents, TransferPatientsInSpecificVehicleRequestEvent, and TransferSpecificVehicleRequestEvents
      • If the requested vehicle is not occupied, it creates a corresponding LoadVehicleActivity
      • The delay for the activity is computed as max(num_patients × delay_per_patient, delay_for_personnel_and_material)
      • If the requested vehicle is already occupied, it ignores the event
    • It handles TransferVehiclesRequestEvents
      • It creates LoadVehicleActivities as long as there are enough vehicles that are not occupied
      • It sends a RequestReceivedEvent with the same key specifying the amount of available vehicles
      • It sends a VehiclesSentEvent trough a DelayEventActivity to inform the destination about the number of granted vehicles
    • When creating a LoadVehicleActivity, it sets the vehicles occupation to a LoadOccupation
    • It handles StartTransferEvent and adds them to a list of buffered actions. Vehicles get the WaitForTransferOccupation assigned
    • It handles TickEvents and starts a TransferVehicleActivity for the next action from the buffer if the delay between sending is exceeded
    • It shows a list of currently running load vehicle activities
    • It shows a list of currently waiting/buffered transfers
    • It has a user interface that allows the creation of new TransferPatientsInSpecificVehicleRequestEvents
    • It has a user interface that allows the creation of new TransferSpecificVehicleRequestEvents

Depends on

@benn02 benn02 added this to the E: Trainees' orders milestone Apr 19, 2023
@benn02 benn02 added enhancement New feature or request frontend Issues mainly related to the frontend shared Issues mainly related to shared simulation Issues related to the simulation logic labels Apr 19, 2023
@benn02 benn02 self-assigned this Apr 24, 2023
@benn02 benn02 linked a pull request Apr 24, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Issues mainly related to the frontend shared Issues mainly related to shared simulation Issues related to the simulation logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant