ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 05-30-2012
Peppino Peppino is offline
Flexsim User
 
Join Date: May 2012
Location: Leverkusen, Germany
Posts: 27
Downloads: 1
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 98
Peppino is on a distinguished road
Default Release Item Problem in Rack

Hallo,

i will Model a randomly created customer demand on 9 different Itemtyps. The rack get's the items from a queue and send it to a prozessor and prozessor to sink.
I hold the the Items in the send to Port Picklist by do not release items. I realeas the Items when exit trigger from queue or entry trigger from sink is fire by sending a message. On message trigger from rack is fire, it is looking in global tabel "gt_prog" for customer demand an releas the item what is needed.

At the beginning everything is looking fine, but after a while it does not want to releas the Items. The Items are waiting for transport but no transporter will pick them.

I create new customer demand when no Item is available in Rack, then rack is sending a message o the sink and when a flowitem enter the sink.

I @ a sample Model!
Attached Files
File Type: fsm Rack.fsm (76.9 KB, 105 views)
  #2  
Old 05-30-2012
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Perhaps you could indicate a simulation time when there is a problem.

Also note that if you profile your code, you'll see that the entrytrigger and message trigger are taking up most of the simulation time - consider taking a different approach or recoding it.
  #3  
Old 05-31-2012
Peppino Peppino is offline
Flexsim User
 
Join Date: May 2012
Location: Leverkusen, Germany
Posts: 27
Downloads: 1
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 98
Peppino is on a distinguished road
Default

Quote:
Perhaps you could indicate a simulation time when there is a problem.
I think figured out when the Problem starts. I think there is a tasksequence Problem.
I've done a work around with an external customer-tact encoder by a source and sink, so that is more obviously. Every time when a flowitem leaves the source a new customer demand will create and send a message to the rack to releas an item.

Now you can see, when the down stream prozessor is NOT busy and a new transport request is seted on a flowitem then it will be executed. But when the down stream prozessor is busy and a second item is set to transport request, the second transportation order will be lost.

In that case the reason is no tasksequence will dispatched. What i can do?

What is wrong here?
I @ the new full model.
Attached Files
File Type: fsm Test.fsm (207.3 KB, 82 views)

Last edited by Peppino; 05-31-2012 at 05:25 AM. Reason: wrong description
  #4  
Old 05-31-2012
Peppino Peppino is offline
Flexsim User
 
Join Date: May 2012
Location: Leverkusen, Germany
Posts: 27
Downloads: 1
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 98
Peppino is on a distinguished road
Default ?solution getstatenum(outobject(current,1);?

I think i have a solution by checking the prozessor state befor releasing Items by the comand; int stat = getstatenum(outobject(current,1).

But what's the returning numbers of the states?

Code:
{ /*Gibt Nachfrage frei*/
		treenode item = parnode(1);
		treenode current = ownerobject(c);
		treenode empf = node("/si_Vertrieb",model());
		int port = parval(2);
		int stoper = 0;
		int auftraege = gettablerows("gt_prog");
		int stat =  getstatenum(outobject(current,1);
		if ( stat == ? )
		{
			for(int x = 0; x <= auftraege ; x++)  /* Zählt Auftäge durch */
			{
				if(gettablenum("gt_prog",x,2) == 0) /* Prüft Tabelle auf offene Bestellung */
				{
					for(int i = 1; i <= content(current); i++)  /* Zählt Regalinhalt durch */
					{
						treenode item = rank(current, i);
						int j = getitemtype(item);
						// Prüft ob Item bereits ausgelefiefert werden soll
						if((j == gettablenum("gt_prog", x, 1)) && (getitemstate(item) != FRSTATE_MOVEREQUESTED))
						{
							releaseitem(item, 1);
							settablenum("gt_prog",x,2,1);
							stoper = 1;
							break;
						}
					}
				}if(stoper) break;
			}
		}
	}
  #5  
Old 05-31-2012
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello,

Version 5.1.2
Users Manual
#Miscellaneous Concepts
#State List

Jörg
  #6  
Old 05-31-2012
Peppino Peppino is offline
Flexsim User
 
Join Date: May 2012
Location: Leverkusen, Germany
Posts: 27
Downloads: 1
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 98
Peppino is on a distinguished road
Default

Quote:
Originally Posted by Jörg Vogel View Post
Hello,

Version 5.1.2
Users Manual
#Miscellaneous Concepts
#State List

Jörg
THX, i found it!
  #7  
Old 05-31-2012
Peppino Peppino is offline
Flexsim User
 
Join Date: May 2012
Location: Leverkusen, Germany
Posts: 27
Downloads: 1
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 98
Peppino is on a distinguished road
Default Solution

That's the solution. I give the Rack on several triggers at different times a message to releas items. In that case i have first to check that the down stream FR is idle and Rack not Releasing. But the Rack is not recording stats so i have to set stats. When a releasing item is found, i set the rack stat to releasing and i set it back to collecting on the entry trigger on the down stream FR.

Code:
{ /*Gibt Nachfrage frei*/
		treenode item = parnode(1);
		treenode current = ownerobject(c);
		treenode empf = node("/si_Vertrieb",model());
		int port = parval(2);
		int stoper = 0;
		int auftraege = gettablerows("gt_prog");
		int stat1 =  getstatenum(outobject(current,1));
		int stat2 = getstatenum(current);
		if ( (stat1 == 1) && (stat2 != 8) ) /* Prüft ob Verpackung leer ist und Lager nicht bereits ein Item sendet */
		{
			for(int x = 0; x <= auftraege ; x++)  /* Zählt Auftäge durch */
			{
				if(gettablenum("gt_prog",x,2) == 0) /* Prüft Tabelle auf offene Bestellung */
				{
					for(int i = 1; i <= content(current); i++)  /* Zählt Regalinhalt durch */
					{
						treenode item = rank(current, i);
						int j = getitemtype(item);
						// Prüft ob Item bereits ausgelefiefert werden soll
						if((j == gettablenum("gt_prog", x, 1)) && (getitemstate(item) != FRSTATE_MOVEREQUESTED))
						{
							releaseitem(item, 1);
							settablenum("gt_prog",x,2,1);
							stoper = 1;
							setstate(current,8);
							break;
						}
					}
				}if(stoper) break;
			}
		}


Thread Thread Starter Forum Replies Last Post
About set the item name problem. Yu Xuan Huang Q&A 3 12-06-2011 05:52 AM
Item Placement on Rack hani2899 Q&A 1 11-29-2011 11:04 AM
how to chang the item location in rack? LINWEIXU Q&A 2 04-23-2010 09:19 PM
Placing item in respective cell of a rack David Chan Q&A 1 11-13-2008 09:32 AM
can "do not release item" commend be used in source? KelvinHo Q&A 2 03-10-2008 12:30 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.