Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How to implement some scenario

Pioneer
Pioneer

Dear Omar,

 

 

Thank you for your help.

 

I made some simple example.

 

In this example, I want Source to delivery parts to Drain1 with 57% & Drain with 43% on lane by Transporter shuttle.

 

In case of that, How can I implement it (i.e routing based on percentages 57% & 43%)

 

Would you plz check posted simple example spp file?

 

Thanks in advance.

 

 

BR,

Beagle.

 

 

Re: How to implement some scenario

Legend
Legend

Hello Beagle, 

 

I had a look on your model. 

You can find your model little bit modified I only added a buffer before the singleproc in order to switch the MUs according to the percentage. Be careful because the transporter is totally vacated on the first sensor. 

 

You have two choices, the first one is to modify the TransferStation codes (it would be complicated). 

The second one is to program your own transporter manually. 

So to do that you should implement your own method for the Sensors in the first one you will hold your transporter until you move n MUs on the SingleProc1. Then make the transporter move to the second sensor and move the rest of (p) MUs to SingleProc ( n + p = 6 , in the average n will represent 57% and p 47%). And finally let the Transporter going back to the Source. 

 

The first sensor method looks like this : 

is 

do
	local myTransporter : object := @ ;         
	local myBox : object ; 
	------- STOPPING THE TRANSPORTER --------
	myTransporter.Speed := 0 ; 
        
	local i : integer ;   
	for i := 1 to myTransporter.numMU loop 
		myBox := myTransporter.cont ; 
		if myBox.Next_Destion = "SingleProc" then -- You should create an attribute for your MUs to definie the destination according to your percentage
			waituntil SingleProc.empty prio 1 ; 
			myBox.move(SingleProc) ;
			i := i - 1 ;
		end;
	next;

	myTransporter.Speed := Transporter_Speed ;  		  
end;

 

I hope it helps ! 

BR 

O.C

Re: How to implement some scenario

Pioneer
Pioneer

Dear Omar,

 

 

Thank you for your kind explanation.

 

I will try it as your explanation.

 

Thanks a lot.

 

 

BR,

Beagle

Re: How to implement some scenario

Pioneer
Pioneer

Dear Omar.

 

Sorry for disturbing you again.

 

I have another question.

 

For Source1(to produce transporter), I want to imlement self.onExit as below.

 

@.home := .Models.Frame.Track
@.move

 

But, Console showed that Error im method as below.

 

Error in method '.Models.Frame.Source1.OnExit' in line 1: Unknown identifier home

 

in case of that, what is wrong with that ?

 

Plz, let me know it.

 

Thanks a lot.

 

 

BR,

Beagle.

 

 

Re: How to implement some scenario

Phenom
Phenom

Hello.

 

Personally I would instead work on figuring out where to send the transporter itself, assuming you are always loading it with parts for the same destiation.

 

In doing so, I would set up 2 different tracks at the end, one for every transfer station and then you can set the destination of the transporter to go to one of the 2 tracks and the transporter will do the rest for you.

 

To set the destination you can add a sensor to your project (at 100% along 'Track') with the following code and it will implement the values that you want for this example.

 

if z_uniform(1, 0, 99) < 57 	-- 57%
	@.Destination := Track1
else 	-- 43%
	@.Destination := Track2
end

Then just changes the names of Track1 and Track2 to match what you want to send the parts to, and then let the rest of the system take over when the transporter reaches that track. Just remember in this case, use only 1 transfer station per transporter.

 

JamesM

Re: How to implement some scenario

Legend
Legend
Error in method '.Models.Frame.Source1.OnExit' in line 1: Unknown identifier home

It means that there is no MU Attribute called "home" so you should create it. Your attribute "home" should be an "object" type. 

Try to add a line or a singleproc connected to your Source and attach a entrance method in order to affect the destination to every MU. 

 

Entrance_Method : 

is
do
	local myRand := z_uniform(1,0,100) ; 
	
	if myRand < 53 then
		@.Home := SinleProc ; 
	else
		@.Home := SingeProc1 ; 
	end;
end;

Attach this method in the entrance of your SingleProc or your line. 

 

 

 

Re: How to implement some scenario

Pioneer
Pioneer
Dear JamesM,

Thank you for your points exactly.

I will try it as your point soon.

Thanks a lot.


BR,
Beagle.

Re: How to implement some scenario

Pioneer
Pioneer
Dear Omar,

Thank you for your points again.

I will try it as your point soon.

Thanks a lot.


BR,
Beagle.