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 10-21-2008
qin tian qin tian is offline
Flexsim User
 
Join Date: Dec 2007
Location: Shanghai, China
Posts: 137
Downloads: 115
Uploads: 0
Thanks: 59
Thanked 3 Times in 3 Posts
Rep Power: 161
qin tian is on a distinguished road
Default 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  
Old 10-22-2008
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

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  
Old 10-22-2008
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

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  
Old 10-22-2008
qin tian qin tian is offline
Flexsim User
 
Join Date: Dec 2007
Location: Shanghai, China
Posts: 137
Downloads: 115
Uploads: 0
Thanks: 59
Thanked 3 Times in 3 Posts
Rep Power: 161
qin tian is on a distinguished road
Default

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


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.