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-01-2013
Abdul Mirza Abdul Mirza is offline
Flexsim User
 
Join Date: Jul 2012
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 94
Abdul Mirza is on a distinguished road
Default Time Table triggers don't work

Hi All,

I am working with fluid objects. And I am using time table for a fluid process object.

My Goal:
1. open output port(2) of fluid process object from 8:00am to 4:00pm, while output port(1) is closed.
2. and from 4:00pm to 8:00am close (2), open (1)


I tried writing code at Down trigger and Resume Trigger of Time table. below are following codes:

Down trigger
Code:
treenode current = ownerobject(c);
treenode members = var_s(current,"members");
double tablerow = parval(1);
{ //************* PickOption Start *************\\
/**Set Label on all Members*/
/** \nLabel: */
string labelname = /**/"labelname"/**/;
/** \nValue: */
double value = /**/0/**/;
/**\n\n*/
for (int index = 1; index <= content(members); index++)
{
  treenode curmember = ownerobject(tonode(getnodenum(rank(members,index))));
  openop(curmember,1);
  closeop(curmember, 2);
}
} //******* PickOption End *******\\
Resume Trigger
Code:
treenode current = ownerobject(c);
treenode members = var_s(current,"members");
double tablerow = parval(1);
{ //************* PickOption Start *************\\
/**Set Label on all Members*/
/** \nLabel: */
string labelname = /**/"labelname"/**/;
/** \nValue: */
double value = /**/0/**/;
/**\n\n*/
for (int index = 1; index <= content(members); index++)
{
  treenode curmember = ownerobject(tonode(getnodenum(rank(members,index))));
  openop(curmember,2);
  closeop(curmember, 1);
 // treenode tank1 = outobject(outobject(outobject(outobject(curmember,1),1),1),1);
 // openoutput(tank1);
}
} //******* PickOption End *******\\

And i am getting a weird error at console
Quote:
time: 0.000000 exception: Exception caught in flexscript execution of MAIN:/project/model/Tools/TimeTables/TimeTable25>variables/downtrigger line 24 instruction 44. Discontinuing execution.
Quote:
time: 0.000000 exception: Exception caught in flexscript execution of MAIN:/project/model/Tools/TimeTables/TimeTable25>variables/downtrigger line 24 instruction 44 (evaluating command parameter 1 as number). Discontinuing execution.
Any help will be greatly appreciated.

Thanks
  #2  
Old 05-01-2013
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Abdul,

the datatype of the members under the timetable member is of coupling. I don't know how to acces the coupling member. The method seems to be right fo the pointer curmember.

Jörg

Last edited by Jörg Vogel; 05-01-2013 at 03:39 PM. Reason: checked the post again
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Abdul Mirza (05-08-2013)
  #3  
Old 05-08-2013
Abdul Mirza Abdul Mirza is offline
Flexsim User
 
Join Date: Jul 2012
Posts: 13
Downloads: 0
Uploads: 0
Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 94
Abdul Mirza is on a distinguished road
Default

Thanks for the advice J�rg.
I figure out the problem. My output ports were not connected properly.
now that have fixed them. It work fine.


Thread Thread Starter Forum Replies Last Post
Global Table for Stochastic Processing Time aryka putra Q&A 2 11-01-2013 01:39 AM
Inter-arrival Time From Global Table shashanktrivedi Q&A 2 06-15-2011 11:01 AM
Time Table for Dispatcher/Transporter shafizad Q&A 5 10-25-2010 10:42 AM
Dynamically assigning processors/people to time table Rhonda MacIntyre Q&A 7 01-28-2010 11:28 AM
Regarding the function of Time table in Flexsim Ong Wu Sheng Q&A 2 12-16-2009 08:58 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.