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 06-20-2008
Matthias Hofmann Matthias Hofmann is offline
Flexsim User
 
Join Date: Jun 2008
Posts: 15
Downloads: 1
Uploads: 0
Thanks: 11
Thanked 0 Times in 0 Posts
Rep Power: 146
Matthias Hofmann is on a distinguished road
Default Automated creation of connections between ports

Hello,

I try to build a model where 400 different products are stored in a rack. These products are than placed on pallets with the help of a combiner satisfying different orders. Every product is send through an individual port to the combiner to assure that the combiner can identify them correctly.

Is there some way that I don't have to create the 400 connections from the rack to the combiner manually? I tried to find out how to create nodes for connections in the object tree, but didn't come so long.

Or maybe you even have better idea how to model the allocation of the products to pallets/orders,

thanks in advance,
Matthias
  #2  
Old 06-20-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Matthias,

The tree is a good place to make connections when you have to make connections from one to many or duplicate one objects connections on many other objects.

For what you are doing I would use the script window. The following code will do what you want:

treenode fromobj = THE RACK YOU WANT
treenode toobj = THE COMBINER
int index;
for(index = 1; index <= 400; index++)
contextdragconnection(fromobj, toobj, "A");

Good Luck,
Brandon
__________________
thats not normal.
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post:
Matthias Hofmann (06-23-2008)
  #3  
Old 06-20-2008
Lolke Koopmans's Avatar
Lolke Koopmans Lolke Koopmans is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 42
Downloads: 21
Uploads: 0
Thanks: 24
Thanked 14 Times in 10 Posts
Rep Power: 163
Lolke Koopmans is on a distinguished road
Default

Hello Matthias,

There is a function to connect objects dynamically / automatic: contextdragconnection. But I think there will be an easier way to model your situation. I cannot see exactly what you want to do, but have you thought about using labels instead of the port reference?
Anyway your code to connect 1 object to the other 400 times would look something like this (assuming your rack is set as so() and there is already 1 connection):

for ( int x = 1; x < 400; x++ )
{
contextdragconnection ( so(), outobject ( so(), 1 ), "A" );
}


regards,
Lolke
The Following User Says Thank You to Lolke Koopmans For This Useful Post:
Matthias Hofmann (06-23-2008)
  #4  
Old 06-25-2008
Matthias Hofmann Matthias Hofmann is offline
Flexsim User
 
Join Date: Jun 2008
Posts: 15
Downloads: 1
Uploads: 0
Thanks: 11
Thanked 0 Times in 0 Posts
Rep Power: 146
Matthias Hofmann is on a distinguished road
Default

Hello Lolke,

thanks for the answer.
To answer your question, why I model it this way:
I try to use as much Flexsim functionality as possible. The combiner uses the input ports for the component list to identify the different products and therefore I need 400 different input ports for the 400 different products. All the products have a label with an unique product number and this is now used to send the products to the correct ports.


regards,
Matthias


Thread Thread Starter Forum Replies Last Post
improve Connections method qin tian Gripes and Goodies 7 03-26-2008 09:42 AM
Automated runs / Exporting mdb file.. Nico Zahn Q&A 14 12-17-2007 11:26 AM
Flickering yellow line during drag connections in Vista Dr. Eamonn Lavery Q&A 0 11-09-2007 10:48 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.