Cancel
Showing results for 
Search instead for 
Did you mean: 

Source Exit Strategy

Experimenter
Experimenter

Hi, I'm complete newbie at Plant Simulation. Dealing with a problem with exit strategy of Source. I do have several sources heading to Buffer with selected capacity. I need to set the exit strategy that will say when the buffer is full (completely occupied) move the MU to Drain. I do have very simple method but it is not working.

8 REPLIES

Re: Source Exit Strategy

Legend
Legend

Hello,

You can handle it thanks too "Edit Observers" in your Buffer. (Choose numMU as a watched parameter).
Attach a method to your Buffer Observers. You method would be look like this :

 

ps : Don't create a connector between the Buffer and the Drain. 

 

I hope it helps

 

is
do
         if Buffer.numMU = Buffer.capacity then  -- it means that your buffer is full
               local myMU : object := Buffer.cont ; 
               
               myMU.move(Drain); 
         end;

end;

Re: Source Exit Strategy

Experimenter
Experimenter

thank you so much for such a fast response. But to be honest, I've tried it, but still not working. I'm adding the simple example. I do have 4 sources that are sending MUs to Buffer which moves them to ParallelProc (then Drain). I want to move MUs directly from sources to Drain1 when the buffer is completely full (not to let them wait until the buffer is empty). Right now the capacity is only 1 to test , if the it is working (intervals and other times will be completely different at the end). Maybe I'am doing something wrong.

Re: Source Exit Strategy

Legend
Legend
Sadly, I'm not able to open your model. There is a licence problem doesn't let open non-commercial models.
Anyway if you want to describe in the scheme your problem in details in order to understand clearly what you're looking for. Or wait for somebody else answer someone who can open your model.

BR

Re: Source Exit Strategy

Siemens Phenom Siemens Phenom
Siemens Phenom

I would not use an observer for this. But if you do so, I would observe the attribute 'full' instead of 'numMU'. You need to declare 2 formal parameters in the observer Method. The first parameter will be set to the name of the observed attribute and must therefore be of data type string. The second parameter will be set to the old value of the attribute and must be boolean for the attribute 'full'.

 

As I said, I would not use an observer. Instead I suggest you use the same exit control in all your Sources. The source code of this exit control should look like this:

is
do
    if Buffer.full then
        @.move(Drain);
    else
        @.move;
    end;
end;

I actually have no idea what you are trying to to, but if you just you want to skip the buffer when it cannot take an MU for any reason (because the Buffer is full, or failed, or the entrance is locked, ...), you could use the exit strategy "Start at successor 1" in "non-blocking" mode in all the Sources and insert a second Connector for each Source that leads to the Drain.

_________________________________________________________________
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Source Exit Strategy

Pioneer
Pioneer

Hi,ocsim56

 

I am able to open his model. The model can be seen as follows:QQ截图20160608192736.jpg

 

Re: Source Exit Strategy

Legend
Legend
Thank you ElegantCoin ! I see clearer what the model looks like and what he was looking for !
I think MichaelJoos's gave an appropriate solution. Write the method and attach it in the exit control of the sources.


Re: Source Exit Strategy

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Well, the easiest solution is thus NOT to use an exit-control, but to draw 4 additional connectors to Drain1 and set the appropriate exit strategy (Start at successor 1).

 

As a rule: if one of the built-in exit strategies fits the job, use it!


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Source Exit Strategy

Experimenter
Experimenter

Thank you all for greate help! All the solutions were usefull the the best was the easiest one! I will save the others for further work. Quite sure I will use them.