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
|
|||
|
|||
Order generation
Hi guys,
Would like some help in thinking of ways to code the following logic into Flexsim: First of all, I have a table "No. of SKU" in the model depicting the number of line items that an order from No. 1 to No. 400 has. This value changes every row. I would like to be able to generate a table that updates the component list of the combiner so that the location ID and the number of items to pick is accurate as per the "No. of SKU" table. Is there any command to randomly generate a new global table by specifying the number of rows and columns? Thank you, Vin Low |
#2
|
|||
|
|||
You can set the number of items to pick with the following code, which you should put in the OnEntry-trigger:
treenode pickqty= node(">variables/componentlist/From Input Port 2/Target Quantity", current); setnodenum(pickqty, 12345); With 12345 being your pick-quantity. You could change that value for the label value -> getlabelnum(current,"blabla") About the rest, I'm sorry, but I did not really understand what you would like to do. |
#3
|
|||
|
|||
You can try the settablesize() command. It takes a reference to the table (name or rank in global table list), the number of rows, and the number of columns for parameters. You would have to create a global table before calling this command, and the only thing that comes to mind would be to create a node under the global table node if you want to use code.
|
#4
|
|||
|
|||
Thanks!
I have tried your recommendation using settablesize(); and it worked. Thanks!
Sorry for this silly question, however, I am having difficulty understanding the use of the node command over normal java coding. Could you explain it to me in further detail? And also, I have another question, how do I make a probability table in Flexsim so that for the stated probability they will return either one of the values below? For example, for 34.19%, they will return either one of the 9 values stated. Thank you, Vin Low |
#5
|
||||
|
||||
please, look in the command help.
you find many examples with the startnode model(). you can choose other startnodes as well. variables(obj), labels(obj) If you use the alternative numbers instead of strings, show the rank numbers in the modeltree: view > show node ranks If you don't know, how to build a the path string, highlight a node in the model tree. Set it as selected object: Edit > Designate This Node (so) You can see the path in the output console with the command pt(nodetopath(so(),0)); // with rank numbers starting node is main() pt(nodetopath(so(),1)); // as a string pt(nodetomodelpath(so(),1));// the starting node is model() Jörg |
Thread | Thread Starter | Forum | Replies | Last Post |
Problems about Input order and picking order | Fernando Fan | Q&A | 8 | 06-10-2011 03:55 AM |
What Hardware to Order | Sebastian Hemmann | Installation | 15 | 05-10-2011 07:55 AM |
problem with automatic generation of objects by using a user library and c++ | Martin Saler | Q&A | 17 | 06-05-2009 09:56 AM |
Order Pulling model | Roger Antillon | Q&A | 11 | 11-18-2008 09:18 AM |
Dynamic script generation: Good Example with a User Command | Naresh Yamani | Tips and Tricks | 2 | 05-16-2008 06:54 PM |