Cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Creator
Creator

Dear All,

 

my problem is, that I define material flow, setup time and processing time based on each entity's user-defined attribute. Here, I use the attribute PositionInWorkPlan to move the entity from one object to the next. Processing time and setup time of each station as well as the production sequence are defined based on the attribute EntityType. Both attributes are assigned at the source's MU selection/in the table MySequenceTable.

 

Besides the entities which enter the line at the source I use the Init Method and BufferBegin table to fill buffers before the begin of production. If I do so, these entities are lacking the necesarry user-defined attributes to be further processed. Hence, I would greatly appreciate any help on how to initally define the EntityType and set the PositionInWorkPlan to the correct value.

 

Thank your very much!

5 REPLIES

Betreff: Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Gears Phenom Gears Phenom
Gears Phenom

Hi Gecko,

try adjusting your INIT-method like this:

is
	i:integer;
	k:integer;
	o:object;
do
	for i:=1 to BufferBegin.yDim loop
		for k:=1 to BufferBegin[2,i] loop
			o := .MUs.Entity.create(BufferBegin[3,i]);
			o.createAttribute("EntityType", "string");
			o.createAttribute("PositionInWorkPlan", "integer");
			o.EntityType			:= "A";	-- or something else
			o.PositionInWorkPlan	:= 0;	-- or something else
		next;
	next;
end;

I hope this helps, happy Easter,
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: Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Gears Phenom Gears Phenom
Gears Phenom
You could also pre-define your user-attributes in the MU-class ".MUs.Entity", then all MU-instances of that class will have these attributes (and you can also set a default/init value in the MU-class, if you like --> then you don't need to change the INIT-method).
____________________________________________________________
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: Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Creator
Creator

Dear Alex,

 

first of all thank you very much for your support and happy easter to you too.

 

I chose the first solution you proposed and it is working almost perfectly, but is it possible to define the attribute PositionInWorkPlan in the Init method in such a way, that the entity searches for its position in the sub table of my workplan based on which buffer it has been asigned to?

 

Kind Regards

Philipp

Betreff: Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Gears Phenom Gears Phenom
Gears Phenom

Hi Gecko,

note that your buffer-capacities are too small for the settings in BufferBegin (capacity 8, create 10 parts). I've added a debug into the method for this case. Here's the new code:

is
	i:integer;
	k:integer;
	o:object;
do
	for i:=1 to BufferBegin.yDim loop
		for k:=1 to BufferBegin[2,i] loop
			-- create MU on target buffer
			o := .MUs.Entity.create(BufferBegin[3,i]);
			
			-- check result of MU-creation
			if (o = void) then
				debug; --> MU could not be created; buffer full?
				
			else
				-- MU was created, proceed:
			
				-- create user-attributes for MU
				o.createAttribute("EntityType", "string");
				o.createAttribute("PositionInWorkPlan", "integer");
				
				-- set entity type (here example: alternate between A and B)
				if (k \\ 2 = 0) then
					o.EntityType		:= "ProductA";	
				else
					o.EntityType		:= "ProductB";	
				end;
	
				-- get row-number in workplan for this entity-type and initial buffer-object
				o.PositionInWorkPlan	:= root.MyWorkPlan["Operations", o.EntityType].getRowNo(BufferBegin[3,i]);	
				
			end;
		next;
	next;
end;

Best 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: Assigning User-defined Attributes to Initial Buffer Inventory to enable Production Control

Creator
Creator

Awesome, thank you for getting back to me so quickly and your help!