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 08-21-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default use moveobject() in the onExit trigger ,the flexsim closed

someone ask me about this?
he write code in the onExit trigger like this
if(content(current)>=5)
{
//closeinput(current);
//closeoutput(current);
double val=getlabelnum(rank(current,4),"my");
pf(val);
moveobject(rank(current,4),node(("/Queue9"),model()));
}

more detail see attach
Attached Files
File Type: zip bad.zip (35.7 KB, 187 views)
  #2  
Old 08-23-2009
Rachid Kolfin Rachid Kolfin is offline
Simulation Consultant
 
Join Date: May 2008
Location: Amsterdam
Posts: 21
Downloads: 18
Uploads: 0
Thanks: 58
Thanked 37 Times in 16 Posts
Rep Power: 169
Rachid Kolfin will become famous soon enoughRachid Kolfin will become famous soon enough
Default use moveobject() in the onExit trigger ,the flexsim closed

Linweixu,

Maybe it would be a good idea to actually ask a question when you post a model. I did not take a look at the model but to me it seems like a bad idea to execute this on the OnExit trigger of the queue. It is probably better to send a message and to execute this on the OnMessage trigger. Furthermore when you use a moveobject command you need to update the internal statistics of the objects involved. So you need to use a transportoutcomplete and a transportincomplete (see the command list under help) command as well .

Good luck,

Rachid
The Following 8 Users Say Thank You to Rachid Kolfin For This Useful Post:
Tom David (08-24-2009)


Thread Thread Starter Forum Replies Last Post
when the port is closed? qin tian Q&A 1 11-18-2008 06:35 AM
Is there a time dependent trigger? Matthias Hofmann Q&A 3 08-25-2008 05:50 AM
On Message Trigger Anthony Timmiss Q&A 19 08-13-2008 08:20 AM
return 1 in entry trigger? qin tian Q&A 1 05-07-2008 04:05 PM
Entry trigger mallik Q&A 4 01-25-2008 07:18 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.