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

  #81  
Old 10-01-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Simon,

Would a processor be good for your purpose? Simply put a processor between two conveyors and connect them. Assign the proper processing time. It will simulate the delay of the transfer.
__________________
Best,
Alan
The Following User Says Thank You to AlanZhang For This Useful Post:
Simon Riopel (10-02-2008)
  #82  
Old 10-01-2008
Jeff Nordgren's Avatar
Jeff Nordgren Jeff Nordgren is offline
Technical Support Manager
 
Join Date: Jul 2007
Location: Orem, UT
Posts: 65
Downloads: 79
Uploads: 0
Thanks: 40
Thanked 21 Times in 17 Posts
Rep Power: 233
Jeff Nordgren is just really niceJeff Nordgren is just really niceJeff Nordgren is just really niceJeff Nordgren is just really nice
Default

Quote:
Originally Posted by Simon Riopel View Post
Hi,
I have some problems with the command delayeventsofobject, what are the situations where this command is working and where it does'nt ?
Any command that has the description "For developer use." (see below) is dangerous to use as a modeler. These commands should not be used by the modeler. They are placed in the documentation for documentations sake. This is because the internal workings of an object will probably over rule what you think you are accomplishing by using one of these commands. You may get lucky a few times and then there will be the times you get burnt. And you're not guaranteed forward compatibility. There is always another way to accomplish what you are trying to do. So if you use them, you are on your own. Don't call tech support if they don't work. They are not intended for your use.

Description: For developer use. Delay events of object. The timed events of object are incremented by value, and the eventlist re-sorted. Value may be positive or negative.
__________________
Jeff
Flexsim Support
The Following User Says Thank You to Jeff Nordgren For This Useful Post:
Simon Riopel (10-02-2008)
  #83  
Old 10-02-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Quote:
Originally Posted by Simon Riopel View Post
Maybe you have some other ideas to create the delay of tranfer ?

Simon
In the situations where you want something to happen over a certain amount of time, always use the "senddelayedmessage" command.

In this case you could close the output of your conveyor on the OnConveyorEnd trigger and send a delayed message to itself and on the OnMessage trigger just open the output again.

Or use Alan's idea of the processor in between.

Steven
The Following User Says Thank You to Steven Hamoen For This Useful Post:
Simon Riopel (10-02-2008)
  #84  
Old 10-03-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Is there any command available to end the warm-up period under a certain condition, like the command endreplication()?
__________________
Best,
Alan
  #85  
Old 10-03-2008
Joe Allen Joe Allen is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 80
Downloads: 2
Uploads: 0
Thanks: 34
Thanked 5 Times in 3 Posts
Rep Power: 151
Joe Allen is on a distinguished road
Default Retrieve Cycle Time of Processor in Code

What is the Flexscript to retrieve the current cycle time of a processor?
  #86  
Old 10-03-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Joe,
do you mean the processing time of the processor, or the cycle time including the time spent for waiting for operators, etc.?
I am not aware of such a flexscript command to retrieve the cycle time but you can set time labels on the item, in OnEntry and OnProcessFinish triggers of the processor. From there, you can calculate the cycle time. That's what I've done in my model.
Hope this helps.
  #87  
Old 10-03-2008
Joe Allen Joe Allen is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 80
Downloads: 2
Uploads: 0
Thanks: 34
Thanked 5 Times in 3 Posts
Rep Power: 151
Joe Allen is on a distinguished road
Default

Yasemin - oops, I meant to say processing time. Is there a command for processing time?
  #88  
Old 10-04-2008
Yasemin Vatandas's Avatar
Yasemin Vatandas Yasemin Vatandas is offline
Flexsim User
 
Join Date: Jul 2008
Location: Hamburg, Germany
Posts: 36
Downloads: 9
Uploads: 0
Thanks: 29
Thanked 3 Times in 3 Posts
Rep Power: 146
Yasemin Vatandas is on a distinguished road
Default

Joe,
as far as I know there is not a flexscript command to retrieve the processing time directly. But you can try to retrieve it, for example, by using getnodenum() command. I haven't tried it myself, but I think it could work. You can find the explanation of the command in the commands documentation.
  #89  
Old 10-05-2008
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: 520
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


Place a Visual Tool in your model and make a centerport connection to the Processor.

Choose as Visual Display “Text”, select Display Object Statistics, make a double click on “content” and select “Currrent Process Time”.
In the code you can also examine how it is done. This is not a variable on the Processor but on the item, because there can be more than one item in a Processor.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following 2 Users Say Thank You to Tom David For This Useful Post:
Phil BoBo (10-13-2008)
  #90  
Old 10-06-2008
Joe Allen Joe Allen is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 80
Downloads: 2
Uploads: 0
Thanks: 34
Thanked 5 Times in 3 Posts
Rep Power: 151
Joe Allen is on a distinguished road
Default Model Time Question

Is there a way to force model time to continue within a block of code?

The following bit of code will get stuck in an endless loop since it appears that model time doesn't progress during execution of a block of code:

double dTime = time();
pf(dTime);pr();
while(time()<dTime+10)
{
//Wait
}
pf(dTime);pr();

Essentially I want to be able to delay the execution of code from one line to the next for a preset amount of model time. Can this kind of thing be done without using senddelayedmessage()? I have noticed that the model continues to run (although without updates to video) between when a msg() command gets executed and when the user clicks OK or Cancel. This leads me to believe that it isn't impossible for model time to progress even when a code block has not yet finished.
  #91  
Old 10-13-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

Joe,

No, it is not possible. What you are asking to do is to sleep or pause block of code inside of an event. If you do that then the next event can not be processed because it is waiting for the prior event to finish first. What you are seeing with the message that you described in your post is not what you thought it was. The events do not continue to process but wait until after you respond to the message. To test this you could set a model to run for a time period that would take more than 1 minute at full speed with no graphics on. Cause an event at the start of the model to use the msg command and wait a minute to respond. When you respond to the message the model will still have to run. Why? Because what is happening is that Flexsim keeps track of the computer time and the sim time and trys to match those two up according to the run speed of the model. When the model pauses during the msg command Flexsim will try and execute as many events as is possible to try and catch up to where it should be if it had not had to pause during the message. This makes it look like it continued to process events but infact the exact opposite is true.

Hope this helps,
Brandon
__________________
thats not normal.
  #92  
Old 10-14-2008
Duncan Pascoe Duncan Pascoe is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 141
Duncan Pascoe is on a distinguished road
Default One way traffic...

Is there any way to send a continuous message from an operator to a number of nodes keeping them closed until the operator has completed a specified route?

I require one-way and one-operator traffic through a specific route in my model and have done so using the OnEntry, OnContinue and OnMessage trriggers at the nodes in the route. It also has to allow for an operator (or a number of operators) to follow a leading operator at a specified distance if it/they arrives before the operator waiting to move in the opposite direction.

The problem I am having is that once any operator leaves the route it opens all of the node edges that are blocking movement on to the route allowing any operators waiting at the nodes onto the route, eventhough there may still be a operators on the route (which were a followers).

I hope this is clear.
  #93  
Old 10-15-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Duncan,

Have you checked out the TrafficControl? From a distance it looks that the untimed traffic modes might be something you could use. But to be honest I have a hard time understanding exactly how it works myself so I am not sure!.

to come back to your real question, I'm not sure I completely understand but can you put a label on the last operator and only close all nodes if this last one has passed?

Or can you use a sendmessage task in your tasksequence and send that message to a controller object (any object where you have written some code on) and then in that code check if there are still operators on that route. So everytime an operators leaves that route it checks if that operators is the last.

Steven
  #94  
Old 10-15-2008
mark.gormley mark.gormley is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 58
Downloads: 12
Uploads: 0
Thanks: 32
Thanked 63 Times in 29 Posts
Rep Power: 181
mark.gormley has a spectacular aura aboutmark.gormley has a spectacular aura about
Default Hide the forks on a transporter

Hi,

Is there any way to turn off / hide the forks that are shown on the front of the transporter? I have changed the transporter for my own graphic and now the forks are not needed,

Thanks,

Mark Gormley
  #95  
Old 10-15-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Mark,

2 ways come to mind:

1 on the ondraw trigger (at the visual page of the properties) add the statement: "return 1;" With that statement you overwrite the ondraw of the object with your own ondraw trigger. (which in your case means draw nothing)

2 take an operator instead of a transporter. They are the same objects except for the forks and the up movement.

Steven
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post:
Michael Hartlieb (12-13-2008)
  #96  
Old 10-15-2008
mark.gormley mark.gormley is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 58
Downloads: 12
Uploads: 0
Thanks: 32
Thanked 63 Times in 29 Posts
Rep Power: 181
mark.gormley has a spectacular aura aboutmark.gormley has a spectacular aura about
Default

Thanks very much!
  #97  
Old 10-15-2008
Duncan Pascoe Duncan Pascoe is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 141
Duncan Pascoe is on a distinguished road
Default

Hi Steven,

Thanks for that! In my experience traffic controllers do exactly the oposite of what you want them to so they have not been very helpful!

With regards to your suggestion how would I set the controller object to check if there are still operators on the route? My apologies if my requests are a little simplistic but as I'm sure you can tell I am fairly new to all of this!

Regards,

Duncan
  #98  
Old 10-15-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Hi Duncan,


you could use a global table or a global variable and increase the value in there every time an operator enters a route that you want to control (on the trigger of a node) and then decrease that number when an operator leaves. Now you only have to check if the number is 0 then you can close all nodes.

Steven
  #99  
Old 10-15-2008
Duncan Pascoe Duncan Pascoe is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 141
Duncan Pascoe is on a distinguished road
Default

Hi Steven,

Thanks the global table will provide the perfect solution. The problem I seem to be having now is that the if statement that I am using (to open the entry node once the route is empty) always returns the true condition, even if it is not. Here is the piece of code:

if(gettablenum("GlobalTable1",1,1) == 0);
{

opennodeedge(thenode,theedgenumber);

}

It will open the node even when the value in the global table is not 0. I feel like I am missing something fairly obvious??

Thanks again.

Duncan
  #100  
Old 10-15-2008
Duncan Pascoe Duncan Pascoe is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 10
Downloads: 1
Uploads: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 141
Duncan Pascoe is on a distinguished road
Default

Ok my apologies I've just worked the problem out. Everything is working as it should.

Thanks!


Thread Thread Starter Forum Replies Last Post
Can coordinated task sequence and "break to requirement" be used together? qin tian Q&A 1 05-26-2008 10:44 AM
error message "Clock overflow, running stopped" Martin Kooijman Q&A 11 04-17-2008 10:29 AM
about "no select" and "show parameter window from side bar" qin tian Gripes and Goodies 3 03-21-2008 08:10 AM
Which variable stores "Properties -> General ->Flags -> Protected" information? KelvinHo Q&A 1 03-06-2008 06:18 AM
"Getting Started" and "Tutorial" models for v4.01 Cliff King Product Announcements 0 12-10-2007 07:34 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.