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 03-09-2012
Ryan Haferbecker's Avatar
Ryan Haferbecker Ryan Haferbecker is offline
Flexsim User
 
Join Date: Mar 2009
Location: Elk River, Mn
Posts: 24
Downloads: 3
Uploads: 0
Thanks: 7
Thanked 9 Times in 4 Posts
Rep Power: 142
Ryan Haferbecker is on a distinguished road
Default Calculating Combinations for Experimenter

Please Help!

Trying to figure out how to generate a table representing all the possible combinations of the following for use in experimenter.

I have 6 different part types (1,2,3,4,5,6).
I then have 8 different machining centers (1,2,3,4,5,6,7,8).

The 8 machines will be allowed to run any combination of up to 4 of the 6 different part types.

Example 4 part mix:

Machines - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Parts - 2 | 2 | 1 | 3 | 3 | 5 | 5 | 5

Example 2 part mix:

Machines - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Parts - 2 | 2 | 2 | 6 | 6 | 6 | 6 | 6

Or stated

Number set (1,2,3,4,5,6)

Rules:

1). Return 8 number sets using 4 or less differing digits from above set within.
2). Rank 8 digits lowest to highest
3). Return all unique possible combinations (no duplicates, no randomness)
4). Seperate each 8 digit set to a unique row
5). Seperate each digit in 8 digit sets row to unique column

I'd really love to get data to a table as stated above so I can copy direct to experimenter.

Thanks for letting me borrow your brains

Ryan
  #2  
Old 03-09-2012
Ryan Haferbecker's Avatar
Ryan Haferbecker Ryan Haferbecker is offline
Flexsim User
 
Join Date: Mar 2009
Location: Elk River, Mn
Posts: 24
Downloads: 3
Uploads: 0
Thanks: 7
Thanked 9 Times in 4 Posts
Rep Power: 142
Ryan Haferbecker is on a distinguished road
Default

Okay with the help of a great website I have a solution!

Website:
http://www.mathsisfun.com/combinator...alculator.html

This site allows you to put in your desired number of values and how many selections you'd like sample from it. You are then allowed to choose yes/no if Order is important or if repitition is allowed. But the greatest part is that also with the # of combinations calculated it also returns a list if you enter your specific choices and then click on the list button and gives 4 different output formats. If you choose csv you will get rows where the values are seperated by commas. Then all you need to do is paste to excel and specify that comma values should act as column segregators. Hope this helps someone else too!

Would love to understand how to generate that list from code though if anyone should ever want to tackle responding with it!!

Update: Okay I got a little bit ahead of myself - this only got me so far. I will still need to take the list and filter it for the maximum of 4 differing integers in the 8 digit set and throw out the sets with > 4.

Last edited by Ryan Haferbecker; 03-09-2012 at 11:47 AM.
  #3  
Old 03-12-2012
Ryan Haferbecker's Avatar
Ryan Haferbecker Ryan Haferbecker is offline
Flexsim User
 
Join Date: Mar 2009
Location: Elk River, Mn
Posts: 24
Downloads: 3
Uploads: 0
Thanks: 7
Thanked 9 Times in 4 Posts
Rep Power: 142
Ryan Haferbecker is on a distinguished road
Default

In case anyone should want to use this - I have finally solved the problem of filtering my table of numbers to only return those with 4 or less unique digits within the 8 digit set. I've attached an example of the code I wrote to filter and write out the new table (Version 5.1.2). All of the code is in the "On Reset" model trigger. Essentially when Reset is pressed the code will analyze the values in table "Test" and write out only the valid ones to table "Writeout". All fails will populate the Output Console window (If Open) as an Array. I made this mostly dynamic so that if anyone should like to they may use more or less columns of values and change the amount of unique digits they'd like to filter for. Just read the notes at the top of the On Reset code.


Cheers,
Ryan
Attached Files
File Type: fsm Experimenter_Array_Filtering.fsm (36.3 KB, 76 views)


Thread Thread Starter Forum Replies Last Post
How to use Experimenter for flowitems? vasiliki grigorakaki Q&A 0 03-05-2012 01:32 AM
Experimenter Export Susan Pevovar Q&A 6 06-02-2011 05:20 PM
What is the calculating formula of Working % and Net Moves Per Hour in CT? syseo Container Terminal (CT) Library 2 02-11-2011 07:08 PM
Using the Experimenter dabombchibz Q&A 2 04-02-2009 07:48 AM
Using different combinations of operators for Transport Brandon Peterson Tips and Tricks 0 06-20-2008 09:08 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.