Here's the standard workaround used in practice in most languages where variable resource capacity is not possible. It sounds like it should work here because of the resource capacity changing based upon seizing and releasing:
1) Initialize the resource capacity to be a number much higher than anything you will ever need in your model.
2) Create a new source that spawns dummy entities with the highest priority so they always jump to the front of the queue.
3) At time 0, produce a bunch of resource-grabbing entities that seize the surplus resource capacity.
4) Your TimeSeries is exogenous, so schedule a new resource-grabbing entity to be created whenever the resource capacity decreases, and give it a delay time attribute that corresponds to a later time when the resource capacity increases again - that way it releases at just the right time.
In my mind, you have the following setup:
Normal_Source --> Seize_Resource-->Branch_on_Normal_vs_ResourceGrabbing_Type--->Regular_Delay--->Release_Resource-->Sink
/ \ /
ResourceGrabbingSource \--->ResourceGrabbingDelay
In case that ASCII art graphic doesn't display properly, the trajectory for each entity is as follows:
Normal_Entity:
Normal_Source -> Seize_Resource -> Branch_on_Normal_vs_ResourceGrabbing_Type -> Regular_Delay -> Release_Resource -> Sink
ResourceGrabbingEntity:
ResourceGrabbingSource -> Seize_Resource -> Branch_on_Normal_vs_ResourceGrabbing_Type -> ResourceGrabbingDelay -> Release_Resource -> Sink
This will also work for the endogenous TimeSeries case, it just needs 2 changes:
1) Creation of entities is handled dynamically by a signal (not sure if JaamSim currently supports this, but it would be nice to have).
2) ResourceGrabbing entities wait at an entity gate rather than a Delay object, thus allowing them to be released on-demand by a signal to
increase the resource capacity.
Oh, and it's probably worth explicitly stating:
- Exogenous = "from outside the system" which in our case means "Known/Calculable in advance".
- Endogenous = "from inside the system" which in our case means "Not known/calculable in advance" or "generated on-demand".
--
You received this message because you are subscribed to a topic in the Google Groups "Jaamsim Users Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jaamsim-users/BRT4BDAJc5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jaamsim-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/jaamsim-users.
To view this discussion on the web, visit https://groups.google.com/d/msgid/jaamsim-users/94c50152-49b6-42cd-b186-bcd61f45ee96%40googlegroups.com.