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 07-29-2012
Vin Low Vin Low is offline
Flexsim User
 
Join Date: Jun 2012
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 96
Vin Low is on a distinguished road
Default 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
Attached Files
File Type: fsm Placement of Inventory.fsm (54.2 KB, 104 views)
  #2  
Old 07-30-2012
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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  
Old 07-30-2012
Logan Gold Logan Gold is offline
Administrator
 
Join Date: Nov 2011
Posts: 6
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 15 Times in 5 Posts
Rep Power: 0
Logan Gold will become famous soon enough
Default

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  
Old 07-30-2012
Vin Low Vin Low is offline
Flexsim User
 
Join Date: Jun 2012
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 96
Vin Low is on a distinguished road
Default 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
Attached Thumbnails
Click image for larger version
Name:	31-7-2012 12-56-15 PM.png
Views:	126
Size:	10.2 KB
ID:	1878  
  #5  
Old 07-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

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


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.