Cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict MU's?

Pioneer
Pioneer

Hello,

 

In my model i want not more then 14 MU's can accumulate between OP10 to OP90. so how can i do it.

Please help

9 REPLIES

Re: How to restrict MU's?

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Piyush,
define an entrance control of OP_10 and a rear triggered exit control of OP_90.

A variable object of datatype integer (with init value = 0) counts the number of MUs between the mentioned stations.
If the variable is greater than 14 the entrance of OP_10 is locked: 

 if ? = OP_10 then
Variable := Variable + 1
else
Variable := Variable - 1
end;

OP_10.EntranceLocked := Variable > 14;

Please do not forget a reset method, which opens the entrance of OP_10.
Regards,
Peter

Re: How to restrict MU's?

Pioneer
Pioneer
Thank you so much Peter. Actually i am beginner at this, i got the logic you wrote but unable to get the reset method. So please help me on that.

Re: How to restrict MU's?

Siemens Phenom Siemens Phenom
Siemens Phenom

The program of the reset method is

is
do
OP_10.EntranceLocked := false;
end;

The reason is that a second simulation will not run if the entrance of the first station OP_10 is locked. 

Re: How to restrict MU's?

Pioneer
Pioneer

Thanks a lot Peter

Re: How to restrict MU's?

Pioneer
Pioneer
Hello Peter,

I am beginner at plant sim. I am trying to built a model in plant sim.

I am bulding a bank model in which customer enters the bank in different number in different time.

eg.

10am -11am -5

11am-12pm - 9

12pm -1 pm - 15

1pm - 2 pm -break

2pm - 3pm -12

3pm - 4pm -15

4pm - 5pm- 10

so how can i get it through source.

Please help

Re: How to restrict MU's?

Phenom
Phenom

have look at the attached model

 

Re: How to restrict MU's?

Pioneer
Pioneer
Thank you so much

I need one more help.

if i want to run it for a month
how would i do

Re: How to restrict MU's?

Phenom
Phenom

one way is to wrap it up in another loop (for 30 days s.b.)

 

is
	L,T :object;
	i,j,m :integer;
	s,e,r :real;
	c:integer;
	Ti :time;
do
	L:=tab1;	
	T:=tab2;
	
	L.delete;
	
	for m:=1 to 30 loop  -- month loop
		for i:=1 to T.ydim loop -- day loop
			s:= 86400*m+3600*T["start",i];
			e:= 86400*m+3600*T["end",i];
			c:=T["count",i];
			for j:=1 to c loop -- hour loop
				TI:=round(z_gleich(1,s,e),0);
				print time_to_str(ti,true);
				L[1,l.ydim+1]:=TI;	
				L[2,l.ydim]:=.BEs.Fördergut;
				L[3,l.ydim]:=1;
			next;	
		next;
	next;
	
	L.sort(1,"up");
	
end;

Re: How to restrict MU's?

Pioneer
Pioneer
for i:=1 to T.ydim loop -- day loop
s:= 86400*m+3600*T["start",i];
e:= 86400*m+3600*T["end",i];
c:=T["count",i];
for j:=1 to c loop -- hour loop
TI:=round(z_gleich(1,s,e),0);
print time_to_str(ti,true);
L[1,l.ydim+1]:=TI;
L[2,l.ydim]:=.BEs.Fördergut;
L[3,l.ydim]:=1;
next;
next;
next;

L.sort(1,"up");

Can you please explain me the code...
As i am new to it