Javier PL avatar image
Javier PL asked Javier PL edited

Priorities among PF and events at time 0


I'm currently developing a model for scheduling strategy optimisation, so that at every time a manufacturing order is issued, it can select the most appropriate available part to process and the best workstation attending to some factors/priorities previously defined.

So, in this model I have a bunch of BasicFRs (working as some kind of processors) whose attached PF "initializes" them with a "Receive Item" code and by pushing its respective associated BasicFR to a "Resource" List, in order to pull them in other part of the model (in other words, I prefer to use general lists to manage resources instead of Resources PF activities due to its limited functioning). I also consider the possibility of an initial offset time (timeToAvailability) in every workstation, due to which I added a delay activity in the block of activities and, in turn, I can not add the processors to the list as initial content. Here's the PF block:

Along with this, I create tokens at different times in a general PF which act as manufacturing orders, so that they need to pull one of this processors from the list in case of availability. Otherwise, they are sent to a sink and the respective order gets lost.

So far, so good. The issue is that, while the Push (processor) Events are taking place at time "0", there's also 2 manufacturing orders at time 0 (in a General PF) which are trying to pull one of this processors (BasicFRs) in order to complete the issuance of the order. However, the first pull (processor) event happens to occur just after the push event of the first processor, so the 2nd order gets lost and the algorithm does not work properly since it does not consider all available workstations (otherwise stated, regardless of the priorities, it always select the same 1st workstation).

As yet, I have tried different options to fix this, such as substituting the delay activity with a Decide (which could affect the event time execution) and, besides, I know I could add a min offset time (like 0.0001) in the Creation Activity of tokens in charge of manufacturing orders but I guess this is not the right way to get this fixed. I'm not considering advancing in time so that the orders start off one week later. I guess this would be also like killing a flea with a sledgehammer.

I wonder if there is any possibility of controlling the priorities between events/process flows (apart from a Wait for Event Activity) in a manner that is independent of user setting up every time info or parameters are updated (like, i.e. updating Lists Initial Content if timeToAvailability > 0 which I guess could be also done via script). But, overall, I would like to know which is the most proper way (if there's one) to solve this kind of time-0-conflicts regarding FlexSim's internal functioning.

Hoping I made myself clear enough, thanks in advance,


FlexSim 19.0.0
process flowlistslists and resourcesprioritiestime 0
lxb4a.png (12.9 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joerg Vogel avatar image
Joerg Vogel answered Javier PL edited

There is always an order of events.This order depends partly on the rank in the model tree of the objects. After you hit the reset button the FlexSim engine creates a list of events. Additionally you can log the events in your model.

There are some commands to manipulate the events in the list. I wouldn't recommend this because there are some events that must occur before others.

Sometimes you can fix problems in Process Flow activities to let the logic breathe. That is a delay activity with a delay time of zero.

And maybe you can think about a warmup time for the statistic in your model. If you set this time interval, the model runs for some time (seconds, minutes, hours,...). Then the warm up time ends and the statistical values are reset.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Yes, a breathe (0 time delay) activity will force a token to be the last time 0 event.

1 Like 1 ·
Javier PL avatar image Javier PL commented ·

First I thank you for your rapid response. I was actually very interested in knowing the info you provide in your 2 first paragraphs. I have also worked with Unity3D, much more about raw programming sometimes, but it lets you manage different time-0 events through different inherited methods, so it turns out to be easier when coping with several initializations.

Therefore, I guess letting the logic breathe becomes the best approach this time.



0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.