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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default Labels in order to control

Hi everyone,
Using the model built by Tom David (for some reason I am not able to post in my previous post) I tried to do something little different - the content of the queue dictates whether the following processor works or not.
But I can't make the setup work properly. The idea is for every start of the processor to have setup time (but just for the first part, not the second or third one).
I enclosed the model (once again, Thank you Tom ).
If someone can take a look what's wrong with it I will definitely appreciate it.
Thanks in advance to everyone.

Mike
Attached Files
File Type: zip Sample.zip (33.0 KB, 183 views)
Reply With Quote
  #2  
Old 03-18-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 514
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Mike,

Here the issue is similar to the issue in the other thread.

In my eyes your model already works fine, because there is not a Setup every item. If you let the model run a bit longer, you can see, that the Setup is only at certain items.

In the beginning of the simulation run, every item gets setup, because the condition the OnExit of the Queue (if(content(current) <= getlabelnum(current,"Low"))) is true. You can adjust this a bit, if you change the condition (if(getinput(current) > 1)).
If the Queue fills up to the High mark there will be a setup. Then no Setup as long the level falls not under Low mark.

First I thought I need to mark (using a label on the item) the last item in the Queue to know that this is the last item. But in the moment this is not necessary, because there is not Setup for all items.

So again, more information needed to solve the task. When exactly will there be a Setup? Low and High level seems not to be enough information.

One other comment: Please, give your little models proper names. Sample is not a good name in my eyes.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
  #3  
Old 03-18-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default

Thanks for the quick reply, Tom.
I need to do Setup every time when the first part is being processed on the processor that is after the queue.
It's the same as the previous thread, but now the queue controls the processor that follows the queue (in the previous thread I needed the queue to control the processor that was before the queue).
In my code there is something wrong - seems like the Setup is done on the last part from the sequence, not the first one. I am not sure where I did it wrong.
As for the name - you are right. But I couldn't think about something simpler
Reply With Quote
  #4  
Old 03-18-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 514
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Mike,

I understood that now the queue after the Processor needs to be controlled. What I did not understood was what is meant by first item.

I thought a bit about it and hopefully understand now, what you are trying to do.
I understand it in the follwing way, but maybe I am wrong.
There is a queue which should control a Processor. The Queue has a low level and a high level.
Items enter the queue and if the high level is reached, the Processor starts processing until the Queue reaches the low level. If the first item arrives a setup is done. If the low level is reached, the Processor stops working, until the high level is reached again.

I build a small model to solve the task.
I close in input of the Processor OnReset, because high level is not reached.
Now the Queue starts collecting items. If the high level is reached the input of the Processor opens and the setup flag is set. The first item gets setup and other items get processed (item turns blue). Because new items arrive in the Queue the Processor will not only process the same amount of items (high level minus low level). It depends on the arrival times how many items will be processed. If the arrival time is not short compared with the process time the Queue will reach low level. Now the input of the Processor closes and the Queue collect items until high mark. The control of the Processor is in OnEntry of the Queue (here is by the way a difference between the models if you control the Processor before or after the Queue).

Anyway, have a look into the model and hopefully it does what you are looking for.
Attached Files
File Type: zip Support_QueueControlsProduction02_TD.zip (34.4 KB, 174 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
The Following 2 Users Say Thank You to Tom David For This Useful Post:
Lars-Olof Leven (03-19-2010), m matias (03-19-2010)
  #5  
Old 03-19-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default

Thanks a lot, Tom.
This is exactly what I needed.
I have another question. In the attached model I am using labels in order to give subsequent numbers to the parts as they exit the Source. I need to visualize these parts numbers using Recorder when these parts exit both Processors. I can do it with one Processor at a time but I don't know how to do it with both Processors simultaneously.
Any ideas are (as usually) greatly appreciated.
Thanks.

Mike
Attached Files
File Type: zip Using_Recorder.zip (34.0 KB, 162 views)

Last edited by m matias; 03-19-2010 at 09:46 PM.
Reply With Quote
  #6  
Old 03-19-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 514
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Mike,

I am not sure, if I understand what you are looking for. Maybe this is based on the fact, that I am not a native English speaker.

You said you can do what you want to do for one Processor. I guess for understanding what you are trying to do, it would have been a good idea to put this into your little model.

Anyway, I had a look into your model and will share some of my thoughts.

You give a subsequent number to the items in the Source using a label. That’s one solution and it works. Another solution could be to do this without the label by using the getoutput() of the Source.
Just keep in mind, that this variables updates after the item left the object. So in the OnExit trigger the variable is not updated.
The code would be like:
setlabelnum(item,"PartLabel2",getoutput(current)+1);

In your model, because you first set the label and then increment it, your first part has 0 as PartLabel. Maybe this is what you wanted, I thought I just mentioned it. So if you want zero for the first part, forget the ‘+1’ in my code.

Okay, back (hopefully) to your question.
If you want to collect the information which PartLabel left the Processors, you could make a Global Table to store this information (OnExit or OnProcessFinish, depending on the point in time you like to use). Having this table, you could use a Recorder (Table Data) to show the information of this Global Table.

Again, I am not sure, if I understood what you are trying to do. But I am pretty sure, you will ask again, if I did not give you the right hints.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
The Following User Says Thank You to Tom David For This Useful Post:
m matias (03-21-2010)
  #7  
Old 03-20-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default

Thanks again for the quick reply, Tom.
May be I didn't explain very well what exactly I need.
I need to visualize on the Recorder the parts numbers when they exit both Processors.
I attached the revised model.I should have done it at the beginning. When you start the model you will see that it visualizes the label only for Processor1 (label "Processor1_label"). The same can be done for Processor2 also only. Or in other words - if you double-click of Recorder you will see the Properties window. On Recorder tab / Nodes to Capture there are two areas - Object Name and Node to Record. There I can put only one object (in my case Processor1 or Processor2) and only one node to record (in my case label Processor1_label or Processor2_label).
Is there way in these two areas to put two object to be displayed on the Recorder (in my case I want to display two labels - Processor1_label and Processor2_label)?
I don't need to use specifically labels but this is the only way that I know in order to display something on Recorder. If you know any other trick - I will be glad if you share it with me
Thanks again, Tom.

Mike
Attached Files
File Type: zip Using_Recorder_1.zip (34.9 KB, 160 views)
Reply With Quote
  #8  
Old 03-20-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 514
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Mike,

I guess you need to fill a Global Table with the information and show it with one Recorder.
As far as I know a Recorder can only show one information. In this sense the Recorder is limited and it is on the development list to get a better Recorder object. I fear that it will not be in v5, but I am sure we will get one in a future release. I normally collect data in a GlobalTable and export them to Excel to do the data analysis and graphs in Excel.
What I normally do, if I like to show e.g. two graphs (two lines in one graph) directly in Flexsim, I just use two Recorders and put them onto each other.
But in your task now, you want to show one information, even if this information comes from two objects. The information is the subsequent number of the parts over the time.

So I guess you need to use the solution in my last post and use a Global Table.
See the attached model. I collect the time and subsequent number in a Global Table and show it with one Recorder. A User Command does the table filling, because I do not wanted to have nearly the same code on two places. In OnProcessFinish the Processors call the User Command and write to the Global Table. There is also a UserEvent to init the Global Table.
Attached Files
File Type: zip Support_RecorderShowsLabelOfTwoProcessors_TD.zip (37.7 KB, 172 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
The Following 2 Users Say Thank You to Tom David For This Useful Post:
Lars-Olof Leven (03-21-2010), m matias (03-21-2010)
  #9  
Old 03-21-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default

Thanks very much, Tom.
I have one question - I saw that the code to write the PartLabel to the Global Table is OnProcessFinish of Processor1 and Processor2. But where is the code that writes the Time to the Global Table?
Thanks again, Tom. I appreciate it.

Mike
Reply With Quote
  #10  
Old 03-22-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 514
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default


The code is also in OnProcessFinish / User Command. The User Command uc_FillGlobalTable is called from the OnProcessFinsih.
Write the time and the label into the Global Table are:
settablenum(GlobalTable,nrows(GlobalTable),1,time());
settablenum(GlobalTable,nrows(GlobalTable),2,iPartLabel);
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
The Following User Says Thank You to Tom David For This Useful Post:
m matias (03-23-2010)
  #11  
Old 03-23-2010
m matias m matias is offline
Flexsim User
 
Join Date: Feb 2010
Location: USA
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 0 Times in 0 Posts
Rep Power: 119
m matias is on a distinguished road
Default

Thank you very much for your help, Tom.
I do appreciate it.

Mike
Reply With Quote
Reply

Tags
control object, global table, recorder

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Labels Model Control GUI Phil BoBo Tips and Tricks 1 10-21-2011 12:30 PM
Setup/processing order problems Derrick Serbonich Q&A 2 07-09-2009 01:27 AM
Order Pulling model Roger Antillon Q&A 11 11-18-2008 09:18 AM
help! order picking process with global tables Charmaine Ng Q&A 3 11-06-2008 11:24 AM
Object order in the summary report AlanZhang Q&A 4 10-16-2007 05:50 PM


All times are GMT -6. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.