Cancel
Showing results for 
Search instead for 
Did you mean: 

Performant way to assign set-up time dependent on MU attribute

Creator
Creator

Hi,

 

I am modeling a large production environment and create a huge number of entities. The source names them according to their main part and also adds some attributes via the mechanisms of delivery tables.

 

Along the production line there are three scenarios at every station:

  • Between entities which have the same name and also share a specific attribute value, there shall be no change-over time.
  • Between entities which have the same name but differ in their attribute value there shall be x seconds of change-over time.
  • Between entities which already differ in their name there shall be y seconds of change-over time.

 

I tried this code as entrance control to the different stations:

(vProductionArea is a variable inherent to every station (which are all subframes))

 

var tTableA, tTableB : table
tTableA := ~.ImportMethods.tLeadTimes_raw[1,1][2,1]
tTableB := ~.ImportMethods.tLeadTimes_raw[1,1][1,1]

if pos("TL", vProductionArea)>0 and vLastHandledEntityName /= ""
	switch vProductionArea
	case "A Testing1"
		if @.name = vLastHandledEntityName 
			if @.InjectorType = vLastHandledInjectorType
			--same main part and same attribute
				?.SetupTime := 0
			else
			--same main part but different attribute
				?.SetupTime := str_to_time(tTableA[4,1][1,1])
			end
		else
			--main part type is different
			?.SetupTime := str_to_time(tTableA[4,1][2,1])
		end
	
	case "A Testing2"
		..same logic..	
			
	case "A Testing3"
		..same logic..		
		
	case "B Testing1"
		..same logic..
		
	case "B Testing2"
		..same logic..	
	
	case "B Testing3"
		..same logic..
		
	else
		print "mSetupTime: Thats strange. Found in the table and part of testing line but no C/O time available? " + current.name
		EventController.stop(false)
	end	
end

vLastHandledEntityName := @.name
vLastHandledInjectorType := @.InjectorType



However, it turned out to be extremely unperformant. I already brought down the routine from >85% according to the Profiler, but it still makes up for >30% of the simulation time. Converting the table columns into time-format to avoid conversion during actual simulation seems logic but I doubt that it brings enough benefit. 30 days simulation time produce ~3.6 million calls.

 

Moreover, since activating this method every now and then I receive an "Access violation error" which shuts down Plant Simulation(14.0).

 

Do you have any recommendations how this task can be accomplished in a more efficient way? Smiley Happy

 

Thanks a lot in advance!

 

 

Edit: Sorry for the repost, but somehow my previously created thread disappeared.

3 REPLIES

Re: Performant way to assign set-up time dependent on MU attribute

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

There are several suggestions to simplify your model. My first suggestion involves two parts:

  1. You combine the Name and your attribute (e.g. "MyAttribute") into a single attribute.
  2. Select Matrix(Type) for the Set-up time distribution, with the combined attribute in the row and column index, and the corresponding times in the cells.

I think this would be the fastest and most robust approach, provided that you are able to combine the attributes.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Performant way to assign set-up time dependent on MU attribute

Creator
Creator

Hi Gert,

 

thanks for your suggestion.

I haven't thought this through in every detail, but if I manage to combine the attributes it would lead to a matrix which at least had the size 200x200. As I don't know how Plant Simulation handles this internally, do you think it would lead to improvements which are worth the effort?

 

Best regards!

Re: Performant way to assign set-up time dependent on MU attribute

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Plant Simulation can easily handle this 200x200 matrix and you only have to create it once.

 

But there is another thing: you have 2 parameters that determine the set-up time. If you can put this in a formula, you can also determine the set-up times during the simulation in an efficient way.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com