ATTENTIONThis 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 |
#1
|
|||
|
|||
where to create operator TS ?
When a processor using an operator to setup, flexsim create a standard TS for the operator. I want to know what the TS is, and if I want to program my own TS for the operator, where to put the code?
thanks |
#2
|
||||
|
||||
Hallo,
the standard tasksequence is described in the manual. also you can find the standard tasksequence in the picklist >>Request Transport From<< under Flow tab: "Task Sequence sample 1...". You write your own tasksequence as a global tasksequence or your change the tasksequence in "Task Sequence sample 1...". Sorry I haven't read the question fully. You were asking for the setup task. I have found the tasksequence in small model built by myself: Source, Processor, Operator. I define a Setup Time and and use an operator for this task. As soon as the operator begin its task I am looking for the aktivetasksequence in the tree. You can use the command "profiletasksequence" in the scriptwindow, too, or as a command in a trigger. The Tasksequence is written in the output console. Jörg |
#3
|
||||
|
||||
Hallo,
after some model building here what I find: You can build your own Tasksequence at the OnEntry-trigger: int id = trunc(time()); if (getlabelnum(current,"setup")) /*decision for setup*/ { treenode ts = createemptytasksequence(centerobject(current,1),0,0); inserttask(ts,TASKTYPE_MILESTONE,NULL,NULL,0,0,0,0); inserttask(ts,TASKTYPE_TRAVEL,current,NULL); inserttask(ts,TASKTYPE_STOPREQUESTFINISH,current,NULL,0,id,0,0); inserttask(ts,TASKTYPE_UTILIZE,item,current,0,0,0,0); dispatchtasksequence(ts); stopobject(current,9,id,0); } At the OnSetupFinish-trigger you release your operator with: freeoperators(centerobject(current,1),item); Maybe it is a help. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
qin tian (10-22-2008) |
#4
|
|||
|
|||
I think it's better to put the code in the "pick operator" trigger of processor.
int id = trunc(time()); if (getlabelnum(current,"setup")) /*decision for setup*/ { treenode ts = createemptytasksequence(centerobject(current,1),0,0); inserttask(ts,TASKTYPE_MILESTONE,NULL,NULL,0,0,0,0); inserttask(ts,TASKTYPE_TRAVEL,current,NULL); inserttask(ts,TASKTYPE_STOPREQUESTFINISH,current,NULL,0,id,0,0); inserttask(ts,TASKTYPE_UTILIZE,item,current,0,0,0,0); dispatchtasksequence(ts); stopobject(current,9,id,0); return 0; |
Thread | Thread Starter | Forum | Replies | Last Post |
question to create my own objects | Kang Han | Q&A | 0 | 09-25-2008 01:17 AM |
is there a command opposite to "destroyobject" which create a object? | KelvinHo | Q&A | 3 | 07-03-2008 08:09 AM |
Create tables on the fly | AlanZhang | Tips and Tricks | 0 | 08-24-2007 06:01 PM |