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 > Flexsim Student Forum
Downloads

Flexsim Student Forum Forum for discussion for Flexsim Students using the Flexsim Textbook.

  #1  
Old 02-14-2014
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default 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?
Attached Files
File Type: zip model.zip (29.0 KB, 93 views)
  #2  
Old 02-15-2014
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

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  
Old 02-15-2014
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

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);
Jörg
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
Tom David (02-17-2014)
  #4  
Old 02-28-2014
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Sorry for lately uploading the solution
Attached Files
File Type: fsm Model.fsm (99.7 KB, 363 views)

Last edited by sagar bolisetti; 12-15-2014 at 04:54 AM. Reason: Reuploaded attachment


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


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.