Cancel
Showing results for 
Search instead for 
Did you mean: 

How to produce parts for 10 days using interval adjustable at source?

Pioneer
Pioneer

Hello,

If i want to use interval adjustable in sourcewhere the parts start producing at 10am and stop at 5pm for 20 days how can i do that??

3 REPLIES 3

Betreff: How to produce parts for 10 days using interval adjustable at source?

Gears Phenom Gears Phenom
Gears Phenom

Hi Piyush,

 

you can assign a ShiftCalendar to the Source, with 1 shift from 10am to 5pm, so the source can only generate parts (at the given interval) during that time:

Screenshot - 16_05.png

 

For the 20 days,I think you already saw the Start/Stop-options for the source (saw them in another post by you).

 

Hope this helps! Regards,

Alex

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Betreff: How to produce parts for 10 days using interval adjustable at source?

Pioneer
Pioneer

Hi Alex,

 

I am using the below mentioned code in enterance control of source but the if condition is nt getting executed.

	is
do
If eventController.simTime >= 36000 + (86400*Days) AND eventController.simTime < 39600 + (86400*Days) then
		EntryGate.Interval := 120;
	Elseif eventController.simTime >= 39600 + (86400*Days) AND eventController.simTime < 43200 + (86400*Days) then
		EntryGate.Interval := 60;
	Elseif eventController.simTime >= 43200 + (86400*Days) AND eventController.simTime < 46800 + (86400*Days) then
		EntryGate.Interval := 75;
	Elseif eventController.simTime >= 46800 + (86400*Days) AND eventController.simTime < 50400 + (86400*Days) then
		EntryGate.Interval := 3600;
	Elseif eventController.simTime >= 50400 + (86400*Days) AND eventController.simTime < 54000 + (86400*Days) then
		EntryGate.Interval := 90;
	Elseif eventController.simTime >= 54000 + (86400*Days) AND eventController.simTime < 57600 + (86400*Days) then
		EntryGate.Interval := 75;
	Elseif eventController.simTime >= 57600 + (86400*Days) AND eventController.simTime < 61200 + (86400*Days) then
		EntryGate.Interval := 60;
	end; 
end;

Please help

Betreff: How to produce parts for 10 days using interval adjustable at source?

Gears Phenom Gears Phenom
Gears Phenom

Hi Piyush,

 

what do you mean "not executed"? Is the entrance-control not called by new MU's? Can you maybe upload the model with the problem?

 

Also a tip (I'm assuming that EntryGate is the name of your source, so I replaced it with ?) for more compact code:

is
	tNow		: time;
do
	-- get time of day in seconds
	tNow := timeofDay(eventController.absSimTime);
	
	-- set interval depending on time of day
	If tNow >= 36000 AND tNow < 39600 then
		?.Interval := 120;
	Elseif tNow >= 39600 AND tNow < 43200 then
		?.Interval := 60;
	Elseif tNow >= 43200 AND tNow < 46800 then
		?.Interval := 75;
	Elseif tNow >= 46800 AND tNow < 50400 then
		?.Interval := 3600;
	Elseif tNow >= 50400 AND tNow < 54000 then
		?.Interval := 90;
	Elseif tNow >= 54000 AND tNow < 57600 then
		?.Interval := 75;
	Elseif tNow >= 57600 AND tNow < 61200 then
		?.Interval := 60;
	end; 
end;

 

Regards,
Alex

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!