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 |
|
Downloads |
Flexsim Student Forum Forum for discussion for Flexsim Students using the Flexsim Textbook. |
#1
|
||||
|
||||
sending items with different contexts
Hi all
i want to send item types to different ports with different percentages. For example i have a rack with 4 itemtypes.The rack is connected to 4 queues. Each itemtypes goes to queues with percentages like this. itemtype 1 25 30 20 25 itemtype 2 20 20 30 30 itemtype 3 40 20 15 15 itemtype 4 15 25 25 35 How can i realize this? |
#2
|
||||
|
||||
Hello Sagar,
the function is dempirical(table[object node/string/number], random stream). The function gives a value you set in the second column of the empirical table. It is the port to send to. You choose in the Send To-function from the pick list "cases by value". Instead of the static port you set your descret empirical distribution. The Random stream is unique to the itemtype and the flexsim object and the Send To function. You use this random stream only once in your model. The random stream is doing its job, because it is randomly to this single decision point. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Tom David (02-17-2014) |
#3
|
||||
|
||||
Hello,
another approch with the same result, if some condition applies. These are that the table names contain numbers in ascending order and these numbers can be computed directly from the itemtype values. Code:
/**dempirical port different by itemtype*/ int index = getitemtype(item); string s_index = numtostring(index); // num itemtype as a string int stream = 11 + index;// unique random stream between 0..99 in the model string s_stream = numtostring(stream);// num stream as a string string s_table = concat("GlobalTable",s_index);// Name of the global table: GlobalTable2 string distribution = concat("dempirical(",strquote(s_table),",",s_stream,")");// combine the strings to a command: dempirical("GlobalTable1",12) pr(); pt(distribution);// write command string to output console, just a test return executestring(distribution); |
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Tom David (02-17-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
sending flowitem according to excel | Chieng Kai Seng | Q&A | 25 | 08-12-2011 06:17 AM |
Sending GUI number to Global Table | Albert Munoz | Q&A | 2 | 10-18-2010 10:59 AM |
Sending messages to Flexsim | cedric molthoff | Q&A | 2 | 03-10-2010 09:48 AM |
Question on sending to different ports | Jamie Santa Ana | Container Terminal (CT) Library | 2 | 09-09-2009 02:54 PM |
Operator not unloading items before picking up priority items | Howe Chiat Cheng | Q&A | 2 | 05-28-2008 02:05 AM |