Cancel
Showing results for 
Search instead for 
Did you mean: 

createing production schedule

Pioneer
Pioneer

Hello everyone,

 

I want to create a prodction schedule for two singleprocs but i am not sure how to do this. 

 

I have three diferent parts (A,B,C) arriving throughout the day (24 hours a day). These parts are stored into different buffers. A buffer can only contain one part type. At 6:00 the production starts. I created this with a shiftcalander. Now my problems starts. My method starts processing the first buffer until it is empty, then it takes the second etc. It does this without considering which parts have to be processed. I want that the two singleprocs start with part A at 6:00 and processes 200 parts (or less if there aren't 200 parts avaiable at the time the first one is processed.) then part B should be processed for about 2 hours and after every 2 hours part C should be processed. So 2h B, 30min C, 2h B, 30min C until the last part of A has arrived, the production of A should start again untill all parts A are processed. After that the processing of 2 hour part B, 30 min part C should continue. The two singleprocs should always process the same parts at the same time, so both B or both C, the singleprocs have their own buffers.

 

Can someone give me some tips or point out an example on how to do this?

 

Thanks in advance,

 

Steven Blom

11 REPLIES

Re: createing production schedule

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Steven5,

 

Your schedule can be modelled by a Tablefile with columns of datatype object for the active buffer B or C and a column of datatype time for the duration.

The active buffer has ExitLocked = false and the other buffer has ExitLocked = true.

The attributes ExitLocked are set by a Method, which is called via ref(Method).methcall(duration).

 

The start of the production A can controlled by the attribute EntanceLocked of the buffer Buffer_A for A.

You can use an waituntil instruction like

 

Buffer_A. EntanceLocked := false; -- start the production

waituntil Buffer_A.numMU >= 200 prio 1.

Buffer_A. EntanceLocked := true;-- stop the production

 

Regards,

Peter

Re: createing production schedule

Pioneer
Pioneer

Hi Peter,

 

Thanks for your reply. I don't think it is as simple as that, but maybe i don't get it.

 

I don't know on forehand which buffers are filled with which product. When a buffer is empty, any product type can be placed in that buffer. So i cannot make a predifined tablefile for when to open which buffer. Which buffer should be opened depends on which product type is in the buffer and what time it is. 

 

In my current program i only look at the products that spend the most time in the buffer and then process the parts form this buffer until it is empty. When it is empty i look for the next buffer with the longest time spend in the buffer and empty this buffer. this is the program: 

 

is
	i, j, AllLocked :integer;
	RestTime, RestTimeRow: time;
do
	-- data registration
	LairageReg1; 
	-- initialize which buffer to take
	if to_stun1 =  0 then
		to_stun1 := 1;
	end;
	-- if the buffer is not empty then keep it open so the products can flow to stunner1
	if NOT Stunner1.pred(To_Stun1).empty then 
		Stunner1.pred(To_Stun1).ExitLocked := false;
	-- if the buffer is empty, look for the buffer where the first product in the buffer spent the most time in the buffer.
	else 
		Stunner1.pred(To_Stun1).ExitLocked := True;
		j := To_Stun1;
		RestTime := 0;
		-- look if the entrances of all the buffers are closed
		for i := 1 to 11 loop
			if Buffer.succ(i).EntranceLocked then
				AllLocked := AllLocked + 1;
			end;
		next;
		-- look for full buffers and calculate the time spent in the buffer.
		for i := 1 to 6 loop
			if Stunner1.pred(i).full then
				RestTimeRow := EventController.SimTime - Stunner1.pred(i).MU(1).CreationTime;
				if RestTimeRow > RestTime then
					RestTime := RestTimeRow;
					j := i;
				end;
			end;
		next;
		--if all the buffers are closed open the buffer that just became empty
		if AllLocked = 11 then
			Stunner1.pred(To_stun1).EntranceLocked := False;
			waituntil Buffer.occupied prio 1;
			if Buffer.MU(1).Name = "Star"  then
				FSToLairage := To_stun1;
				FS1 := To_stun1;
				FSLairage := 1;
			else
				WGToLairage := To_stun1;
				WG1 := To_stun1;
				WGLairage := 1;
			end;
		end;
		if j /= To_Stun1 then 
			To_Stun1 := j;
			Stunner1.pred(To_Stun1).ExitLocked := false;
		--if there are no buffers full. look for a buffer that is not empty and calculate the time spent in the buffer. open the buffer with the longest time spent in the buffer. 
		elseif j = To_Stun1 then
			for i := 1 to 6 loop
				if NOT Stunner1.pred(i).empty then
					RestTimeRow := EventController.SimTime - Stunner1.pred(i).MU(1).CreationTime;
					if RestTimeRow > RestTime then
						RestTime := RestTimeRow;
						i := j;
					end;
				end;
			next;
			Stunner1.pred(To_Stun1).ExitLocked := false;
			To_Stun1 := j;
		else
			Stunner1.pred(1).ExitLocked := false;
		end;
		
	end;		 
end;

I call this method as an entrance control of stunner1 (the processor after the buffers). 

 

Now i need conditions to include a schedule like i explained in my first post. 

 

I also have a question about the waituntil function. If I use it as an entrance control, the method will be called every time a product enters right? But if i use a waituntil function in this method, will that be called every time a product enters the machine?  That means that the waituntil is useless in this case. for examle if i write the following code in stead of what i have now:

if NOT Stunner1.pred(To_Stun1).empty then 
	Stunner1.pred(To_Stun1).ExitLocked := false;
waituntil stunner1.pred(to_stun1).empty; -- waituntil added
else
..
end;

This method is called at the entrance of a product. So then the wait unitll will be called a lot of times and it has no use at all?

 

I was thinking about this because you advise sort of the same thing. Use a method for the entrance control with a waituntil. but then this method is called 200 times and the waituntil is also called 200 times. Or doesn't it work that way?

 

 

Re: createing production schedule

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Steven,

 

If the 2 SingleProcs do exactly the same, why not use a ParallelProc? Just a thought...

 

Judging from your description, you are not really working on a schedule, but rather on a release mechanism that uses actual state information (schedules are projections of the future). Personally I would create a table that contains the relevant state information for your decision making process, like numMU, empty, EntranceLocked, ExitLocked. And you can add columns for yourself to make some calculations. You can trigger your release method as an observer, or exit/entrance control. Then you can go through the table and evaluate if you need to change something, and if so, what to change.

 

So, see if you can make such a table and how you would handle it yourself. Decision flowcharts and state diagrams are often helpful in this stage.

 

If you want to stay with waituntil statements, you can use the command deleteMethcall to remove any existing method suspensions (e.g. wake-up events from a waituntil statement). Normally you would put such a command in the beginning of your method that contains the waituntil command in question.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: createing production schedule

Pioneer
Pioneer

Hello Gert,

 

I don't use a parallelproc because the two single procs have different buffers that are linked to it. Buffer 1 to 6 to singleproc 1 and buffer 7 to 11 to singleproc 2. 

 

Let's suggest that i use a table that contains the relevant state info and trigger the release method as an entrance control. Then, in my realease method i look for the values i need. For example if the buffer is empty or not. Then i will use this info to overwrite the data and look for the next buffer that has to be opend according to some conditions. If i do it like this, isn't it sort of the same as i already did only now i write the data in a table file? Or am i not getting this right?

 

Thanks in advance,

 

Steven Blom

Re: createing production schedule

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I think it is always preferrable to use a table, your model becomes more transparent and versatile. Is it totally different? Don't think so!

 

In the table you can use formulas to get the values of the relevant attributes. With the command calculateList, you update it. So then you don't need to do all of this in a method, it saves a lot of work!

 

Since you evaluate the overall state on every MU entrany, you do not need waituntil statements anymore.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: createing production schedule

Pioneer
Pioneer

Ok thanks! I did not know about the calculateList command. So if for example in the row of buffer 1 I have a colum with Buffer1.empty and then i can calculate buffer1.empty with the calculateList command? but how do i write a formula in the table? what datatype do i need?

Re: createing production schedule

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

If you select an object (e.g. Buffer) and press F8 or RMB, you get the methods and attributes. The column Signature tells you the data type. The data type of empty is boolean.

 

Check the Help-pages:

Step-by-Step Help > Importing Data for the Simulation > Working with Lists and Tables > Make Calculations with a Formula


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: createing production schedule

Pioneer
Pioneer

I know that empty is a boolean and i know how where i can find the methods and attributes of an object but i did not now how to insert a formula in a table. But now i know! thanks!

 

I will try and solve the problem by working with a table file.

Re: createing production schedule

Pioneer
Pioneer

Hello Gert, 

 

I want to look for the buffer where the first product has the longest waiting time and the buffer has to be full. In my table i calculated the waiting time so i can use Table.max function to look for the max value. The first problem is that i don't know what to fill in in the Table.max range.  The helpfunction says MyTableFile.max({3,3}..{3,*}). but what does {3,3} and {3,*} stand for. what do i need to fill in here? 

 

When the Max funcion is working I know which buffer has the products with the longest waiting time. But another condition to open this buffer is that it has to be full. So how do i combine the find function for a full buffer and the max function for the longest waiting time?