Showing results for 
Search instead for 
Do you mean 
Reply

FlowControl Method

In this project I need to program the Flow control's exit strategy the following way: 

If line11 is full the MU go to sucessor 1 (Line 21) , If not the MU's go to sucessor 2 (line2).

 

I don't know to program the method for this situation. Can anybody help me?

 

Thanks.

 

Regards,

 

João

4 REPLIES

Re: FlowControl Method

Select as exit-strategy Method and assign a mehod. Plant Simulation formats the method. The method need to return the successor-number:

It may look like this:

 

: integer
is
do
	-- @ is the movable unit
        if line11.full then
	  return 1;
        else
          return 2;
        end;
end;

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: FlowControl Method

Hi Steffen,

 

I am also attempting to do this in SimTalk 2.0. I was wondering if there is any difference need to be done. I have the exact code that you replied to, however, I am getting a syntax error at line one with the : integer. Any thoughts?

 

-Craig

Re: FlowControl Method

[ Edited ]

Hi Craig,

 

the syntax has slightly changed; set -> infront of the return parameter type, delete the old method body and erase the semicolon:

-> integer
if line11.full then
    return 1
else
  return 2
end

 


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net


Re: FlowControl Method

Excellent! Worked like a charm. I had a feeling there was something different with the SimTalk.

 

Thanks!