workflowfm / proter

A discrete event simulator for asynchronous prioritized processes
http://docs.workflowfm.com/proter
Apache License 2.0
1 stars 0 forks source link

Resource Reservation #4

Open PetrosPapapa opened 4 years ago

PetrosPapapa commented 4 years ago

The Coordinator should allow the reservation of a resource even if a task does not start immediately. Some processes may need to do some preparation before the task (e.g. physically moving an asset to the resource) or to run multiple tasks back to back without interruption. In such cases, they don't want their resource to be hijacked in the meantime.

PetrosPapapa commented 4 years ago

This was implemented externally in the Aurora simulation, but there are some issues with it. In particular, the order of queuing and releasing is uncontrollable, so a process may decide to queue even if the resource was meant to be released at the same time (and would be available).

See 79474a68ef5d6fa1bfd85aae3e73c9165a471b5c for an explanation of how this is dealt with by the Coordinator. This is not possible to do externally though as we resolve all finished tasks simultaneously.

PetrosPapapa commented 4 years ago

This got solved here: https://github.com/PetrosPapapa/WorkflowFM-Aurora/commit/20d16a7d05d21c6010adce6d38a89aa0641e42b6 This means resource reservation can be fully implemented externally.

PetrosPapapa commented 4 years ago

Reopening because, on second thought, it would be nice to import some of this code in a more generic form for "out-of-the-box" use in projects.