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
|
|||
|
|||
Looping command in Flexsim
In my model i have a global table having 3 rows and 1 columns. when i use a "for" loop as given below, the model gives the output for only first row of table, but what is need is the loop has to continue for all three rows and produce the output. provide some light on this..
int row; for(row = 1;row <= gettablerows("sample"); row++) { int x=(gettablenum("sample",row,1)); return x; } |
#4
|
|||
|
|||
Hi,
Everything depends what you want to do with the value from the loop. If you want to print the value to e console use pf or pd. Try to explain what you try to do, it will be easier to guide you. Lars-Olof |
#5
|
|||
|
|||
Hi Lars,
Consider flow items are placed on the racks with certain label value. In order to retrieve them from racks based on the label value i used the global table. Each row in global table will have label of flow items to be retrieved. Hence i need flow items to reach down the rack for every row increment. |
#9
|
|||
|
|||
Hi,
If I remember right pull will only work for one item, it can not pull many items at the same time. Back to what are you trying to do? Explain what you try to do and if you can include a small demo model also. It will be much easier to guide you if you explain what you try to do. Lars-Olof |
#11
|
||||
|
||||
Hello Manoj,
not necessary: in the rack activate under send to reevaluate sendto on Downstream Availability. As Lars-Olof has mentioned the return command stops the loop. Therefore write an if-statement in the pull requirement of your queue Code:
if( x && Y) return 1; Last edited by Jörg Vogel; 02-20-2012 at 07:37 AM. Reason: Sendto On Downstream Availibilty not necessary |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Manoj Kumar (02-20-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
family command? | zhang xin | Q&A | 0 | 01-14-2010 06:33 PM |
Problems with the command dbsqlquery | Matthias Hofmann | Q&A | 4 | 11-21-2008 01:02 PM |
Command getnextnetnodeoutport | Martijn van Oostenbrugge | Q&A | 0 | 02-22-2008 05:42 AM |
releaseitem command | AlanZhang | Q&A | 3 | 10-04-2007 10:11 AM |