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-21-2013
Mats-Hendrik Schulte Mats-Hendrik Schulte is offline
Flexsim User
 
Join Date: Apr 2013
Location: Germany (Leipzig)
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Mats-Hendrik Schulte is on a distinguished road
Smile Global variable (Two or more conveyors declared as a Treenode Array)

Hello,

I connected conveyors in a row to send objects from point A to B and back.
Then I put these conveyors together as a Global Variable ( Treenode Array).
Now I try to tell this Variable that the maximum content of items in this "area" can only be 1 or 0.
I'm looking forward for some helpful answers.

Thanks

Mats
  #2  
Old 06-22-2013
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

hi Mats,

You made a guess, now you wish that flexsim behaves as you think it should behave. Your guess is unfortunately wrong.
You can summarize the flowitems that are currently on your conveyors and close or open the input of a conveyor. The command content(obj.) tells you the number of the flowitems or other objects currently in obj.
Another Approach is to count the flowitems entering your defined area and reduce that value by one, if a flowitem leaves the area.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Mats-Hendrik Schulte (06-24-2013)
  #3  
Old 06-24-2013
Mats-Hendrik Schulte Mats-Hendrik Schulte is offline
Flexsim User
 
Join Date: Apr 2013
Location: Germany (Leipzig)
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Mats-Hendrik Schulte is on a distinguished road
Default

Hello Jörg,

thanks for your fast answer.
I can solve the problem for two conveyors with the close and open inputs Trigger option.
My problem is, that I have more than two conveyors in a global variable.
I tried to tell the global variable in FlexScript to close or open all it's inputs, but that is not possible isn't it?

Thanks for your answers...
Mats
  #4  
Old 06-24-2013
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

I´m quite sure it is possible. But you have to tell every object the command to open / close the port. So there would be needed a "for" loop for example, that sends the information to every involved object.

Maybe you could show more detailed, what you are trying to do. Or post a model, where we can have a look into your work.
__________________
Hemmi
The Following 2 Users Say Thank You to Sebastian Hemmann For This Useful Post:
Mats-Hendrik Schulte (06-26-2013)
  #5  
Old 06-26-2013
Mats-Hendrik Schulte Mats-Hendrik Schulte is offline
Flexsim User
 
Join Date: Apr 2013
Location: Germany (Leipzig)
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Mats-Hendrik Schulte is on a distinguished road
Default

Here is an example of my work.
It is simplified, but shows the main point very good.
I only want one item on the four conveyors at the same time.
When the item arrives at the queue the next item can go into the four conveyors.
Thanks for your help ...

Mats
Attached Files
File Type: fsm Example.fsm (31.0 KB, 80 views)
  #6  
Old 06-26-2013
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 Mats,

you will a face a runtime problem. You must probably controll the order of events in the area with the conveyors. It is done by changing the order of objects in the tree or you will force the events happen in a defined order.
I have attached a model in which a controller defines the input to a area by a message procedure. My model has only two entry points to the four conveyors.
The controller consumes no simulation time but he slows down the model run.

Jörg
Attached Files
File Type: fsm Runtime-Problem_distribution_area_JV-1.fsm (67.5 KB, 339 views)

Last edited by Jörg Vogel; 12-03-2014 at 03:30 AM.
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
Mats-Hendrik Schulte (06-26-2013)
  #7  
Old 06-26-2013
Mats-Hendrik Schulte Mats-Hendrik Schulte is offline
Flexsim User
 
Join Date: Apr 2013
Location: Germany (Leipzig)
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Mats-Hendrik Schulte is on a distinguished road
Default

Thanks a lot Jörg.
That was very helpful to me.
But I tried to put another conveyor inbetween one gate and entry.
The problem is, that the model stops after the half way.
What do I have to change in the controller to solve that problem?!
Thanks for your answer

Mats
  #8  
Old 06-26-2013
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

In situations like this I've often found that it is easier to prevent all items from proceeding, and then to chose exactly which item I want to move, rather than relying on port control and event queuing since FIFO is not always desired.

The attached model is similar to Jörg's concept with a central controller, but I use "Do Not Release" in the send to port of the queues and releaseitem() to allow an item to proceed.
Attached Files
File Type: fsm central management of area capacity.fsm (50.3 KB, 65 views)
The Following 2 Users Say Thank You to Kris Geisberger For This Useful Post:
Mats-Hendrik Schulte (06-27-2013)
  #9  
Old 06-26-2013
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 Mats,

the area contains with a further conveyor one object more. I have programmed a static amount of objects in the area with the controller. I check in the default case, if the area is empty by a condition
(contentunder(up(current)) < 6) then I open also the second input to the area.
The Container (VisualTool) contains 5 Objects without any flowitems. Now you have 6 Objects and the condition will never be true. Increase the value 6 by one for every object you add in the area. Or better change the condition to
(contentunder(up(current))<=content(up(current)))

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Mats-Hendrik Schulte (06-27-2013)
  #10  
Old 06-27-2013
Mats-Hendrik Schulte Mats-Hendrik Schulte is offline
Flexsim User
 
Join Date: Apr 2013
Location: Germany (Leipzig)
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 0 Times in 0 Posts
Rep Power: 0
Mats-Hendrik Schulte is on a distinguished road
Default

Thanks so much guys !
Thats the solution of my problem ....

Tags
area, capacity, central, control


Thread Thread Starter Forum Replies Last Post
Global Variable resetting Bill Lank Q&A 3 05-25-2012 10:47 AM
Global variable as experiment variable Matthias Hofmann Q&A 3 09-08-2009 09:42 AM
Can't get value from global array Joe Allen Q&A 7 10-30-2008 09:06 AM
Global arrays declared with no o f elements only RalfGruber Gripes and Goodies 2 09-12-2008 09:05 AM
Assign an array to a variable AlanZhang Q&A 6 04-24-2008 01:59 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.