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 05-20-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default which is better way To deal with this problem?

if i want to change the length of item dynamically In a period of time.
the first way , i can senddelaymessage in a short time (for example 0.25s)to change the the length of item In that period of time.

the second way, i can use custom draw code to to change the length of item by simlation time

i think the second one is better,because message is event.but other people do not agree .
so i want to know which a higher efficiency for run speed
  #2  
Old 05-21-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Without context this is hard to answer as there may be other things I'd worry about, for example if you're changing the length of an item as it travels down a conveyor . However generally I think I'd say the following:

You shouldn't really depend on the draw code for anything, since you may want to run with no views open for speed - and in this case the draw code will not be called. OnDraw would still be useful for watching something expand in size as a function of time with the view open. You can calculate the size as a simple linear function or even use kinematics to create a more complex progression over time.

You would normally create an event/message for the end of the expansion/contraction where you set the size, and use draw code to draw it smoothly between the start and finish event.

If the resizing is part of a process that can be interrupted (failure or preemption) then I'd consider using a BasicFR for the process since it can detect the stop and pause a kinematic or adjust your manual calculation.

Another option for objects, if the resizing is independant of any other events, is to use the new animator feature in version 5.


Thread Thread Starter Forum Replies Last Post
Problem with installation (new problem) David Chan Installation 2 03-13-2009 10:41 AM


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.