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 07-12-2013
Gaurav Majumdar Gaurav Majumdar is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Gaurav Majumdar is on a distinguished road
Thumbs up Using Global Variable for Processing Time Variation - plz help!

Hello!

We are making a basic assembly line model (please refer attached model) with 20 processors.

Each of the processors has a processing time (P) which is triangularly varying over a range.

Now, we need to build a logic USING A GLOBAL VARIABLE where :-

1) when P is < or = 80 secs, then the item (box) moves into the next processor at 80 secs.

2) when P > 80 secs, then the item (box) moves into the next processor at 160 secs.

However, I can't much way ahead into this as I am not accustomed to using Flexscript commands.

With regard to our simple model, any advice as to how to approach to build this logic into the model is seriously appreciated!

Thank you very much...
Attached Files
File Type: fsm third original model -C80.fsm (229.0 KB, 69 views)
  #2  
Old 07-15-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

hmmm....

maybe you upload a very simple model, too. And maybe you look at another thread more carefully. To give you a hint for the process time:
declare a double variable, which is initiated with your statistical distribution;
compare this local variable with the global variable in a if-statement;
if the result is true return the global variable;
else return the double global variable;
or return vice versa.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Gaurav Majumdar (07-15-2013)
  #3  
Old 07-15-2013
Gaurav Majumdar Gaurav Majumdar is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Gaurav Majumdar is on a distinguished road
Smile

Thank you very much Mr. Vogel...I would be frank with you to accept that I am not at all accustomed to Flexsim's FlexScript coding and hence I am not sure how to build the above-mentioned logic into my model. I am more accustomed with the drop-down GUI-s and hence I am trying to find a way out of this just using the Triggers Tab mainly and concepts of Global Table.

Also, we are thinking of a different approach in this respect where we are trying to make the robots between processors only pickup boxes from the processors every 80 seconds only. In that way, I feel we might be able to find a way out of this. But again, I am trying my best with different permutations of the Robot properties but till now, no luck!

I have NOW attached a very simple model of a plant flow line here which might make it a bit easier for you to understand my intentions.

Thank you for your help again!
Attached Files
File Type: fsm simple line robotic.fsm (39.4 KB, 72 views)
  #4  
Old 07-16-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

hmmmm...

without any knowledge of writing a source code the problem seems without any solution. But perhaps mathematics will help you:
The function "ceil" rounds up to the next integer.
Then is the Return Value in the Process Time:
Quote:
ceil( "random value of a triangular distribution" divided by the global variable) multiplied with the global variable
Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Gaurav Majumdar (07-16-2013)
  #5  
Old 07-16-2013
Gaurav Majumdar Gaurav Majumdar is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Gaurav Majumdar is on a distinguished road
Exclamation

Sorry to request you again Mr. Vogel...another approach comes to my mind...is it possible to open and close the input and output ports every 80 secs?

I have also attached a simple model with 2 processors. The processing time for each processor varies over a triangular distribution.

As I said earlier, I intend to use SendMessage option if possible here but not sure how.

Thanks!
Attached Files
File Type: fsm Test Model for Assembly Line.fsm (51.8 KB, 66 views)
  #6  
Old 07-16-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
Smile

Very good,

messages are good to create your own discrete events. Flexsim is a program that works with events. Even if you don't want to write your own source code, the approach might work. It would be much simplier, if you add a source code in the OnMessage-Trigger by calling this trigger with a delayedmessage message again. But you can sendmessage alos from other event-triggers. It works.
Try your concepts first in very simple and small models.

Jörg
  #7  
Old 07-17-2013
mearjun mearjun is offline
Flexsim User
 
Join Date: Feb 2012
Posts: 123
Downloads: 5
Uploads: 0
Thanks: 27
Thanked 19 Times in 11 Posts
Rep Power: 119
mearjun will become famous soon enough
Default

Quote:
Originally Posted by Gaurav Majumdar View Post
Thank you very much Mr. Vogel...I would be frank with you to accept that I am not at all accustomed to Flexsim's FlexScript coding and hence I am not sure how to build the above-mentioned logic into my model. I am more accustomed with the drop-down GUI-s and hence I am trying to find a way out of this just using the Triggers Tab mainly and concepts of Global Table.

Also, we are thinking of a different approach in this respect where we are trying to make the robots between processors only pickup boxes from the processors every 80 seconds only. In that way, I feel we might be able to find a way out of this. But again, I am trying my best with different permutations of the Robot properties but till now, no luck!

I have NOW attached a very simple model of a plant flow line here which might make it a bit easier for you to understand my intentions.

Thank you for your help again!
I can understand where you are coming from. When I began using Flexsim I had similar issues with flexscript. But its rather simple. You can write a pretty decent code with if else and for statements. I would suggest you to go through Flexsim's user manual specially the section called flexsim coding. Its a gr8 place to start with for someone new to flexscript.
The Following 2 Users Say Thank You to mearjun For This Useful Post:
Steven Hamoen (07-17-2013)

Tags
assembly, cycle time, global variable, logic, processing time


Thread Thread Starter Forum Replies Last Post
Global Table for Stochastic Processing Time aryka putra Q&A 2 11-01-2013 01:39 AM
global variable in DLL (UserFuncs.h) Esther Bennett Q&A 7 09-12-2012 07:02 PM
Global variable as experiment variable Matthias Hofmann Q&A 3 09-08-2009 09:42 AM
Using a Variable number of Operators for Processing Brandon Peterson Tips and Tricks 4 07-16-2008 09:16 AM
Display Global Variable Sung Kim Q&A 4 02-24-2008 11:24 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.