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 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
Reply With Quote
  #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: 768
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.
Reply With Quote
Reply

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
Problem with installation (new problem) David Chan Installation 2 03-13-2009 10:41 AM


All times are GMT -6. The time now is 04:54 PM.


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