ATTENTIONThis 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 |
#1
|
|||
|
|||
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! |
#2
|
|||
|
|||
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
|
|||
|
|||
Quote:
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. Last edited by Peppino; 05-31-2012 at 05:25 AM. Reason: wrong description |
#4
|
|||
|
|||
?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; } } } |
#7
|
|||
|
|||
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 |