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
|
||||
|
||||
Set Speed for a task sequence
Hello
We are trying to make a few transporters move in a task sequence from one node to another node at the same speed but with a gap between them to make a train effect, and we are successful in it. Our transporters are moving at the default speed of a transporter ( maxspeed = 2) but our issue comes here " is there a way to change the speed of the transporter for each track segment ". What we are using is TASKTYPE_TRAVELTOLOC and we are assigning a network node as the from destination and another network node as the to destination. and various links have different speeds. We would like our transporters to move with the corresponding speeds at each segment. there is a parameter called end speed in TASKTYPE_TRAVELTOLOC but that doesnt solve our issue. please help..... |
#2
|
||||
|
||||
Maybe you should try to set the "Virtual Distance" between the different Networknodes. Or even the "Speed Limit". My experience showed, that setting speed by "Virtual Distance" sometimes seems to be little more tricky, but even works.
Purely can´t give you a hint, how "end speed" should work and where something works wrong.
__________________
Hemmi |
#3
|
|||
|
|||
Try setting the maxspeed variable before the travel task. If it has to be part of the task sequence use TASKTYPE_SETNODENUM or if you don't know the tasksexecuter use TASKTYPE_NODEFUNCTION to call a 'setspeed' function and pass in the speed as var1, referencing it in the function as parval(2). parnode(1) is reserved for pointers to involved 2 which left unspecified will be your task executer.
Setting the maxspeed this way means you should consider resetting it to a value and may want to set it for every travel task to avoid using a speed that is 'left over' from a previous travel task. You can also use a message task if you prefer, where a null invollved2 allows you to referenced the task executer as msgsendingobject. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Nischith Kashyap (05-24-2011) |
#4
|
||||
|
||||
TASKTYPE_SETNODENUM does work.......but is it possible during a task sequence that i am able to change the speed or is it only at the beginning of each task sequence.......say maybe during the travel from NN1 to NN2 ....half way through the journey ( unkown point ) i need to change the speed from 3k/hr to 0.5 k/hr ....
|
#5
|
|||
|
|||
You can change at any point in the sequence before the travel task it applies to, but not during the travel task. Networks allow you to limit the speeds to a number of values on different paths during one travel task , but it sounds like you're just using offset travel, so you're not using the network paths.
|
#6
|
||||
|
||||
The issue i am facing right now is that, when the engine stops at time = t1 and at a particular node say nn5 the wagons behind it dont stop at that time t1 as they would be in the middle of a task sequence.......so is their any possible way to make the wagons stop the same time when the train engine stops. What happens currently is that all the wagons pile up on each other at nn5 and then stop.....
|
#7
|
|||
|
|||
You can use TASKTYPE_STOPREQUESTBEGIN to stop the carriages, which creates a preempt_only task sequence with priority 100000 on the object you specify. Use TASKTYPE_STOPREQUESTFINISH to resume them.
If you don't have pointers to the carriages when you create the task sequence, then you'll need to make sure the engine task executer (the head TE) has relationships (named or other connections) to the carriages, and then use a TASKTYPE_NODEFUNCTION again, leaving involved2 NULL so that the engine gets passed in as parnode(1) and then use it's connections to find the carriages. Or use a message.... |
Thread | Thread Starter | Forum | Replies | Last Post |
Task Sequence Profile | Brandon Peterson | User Development | 6 | 09-21-2009 01:41 PM |
Task Sequence Display | jspeece | Q&A | 4 | 09-15-2009 09:03 AM |
Task Sequence Example 1 | Li Chin | Q&A | 4 | 10-27-2008 06:50 AM |
Task Sequence Question | David Chan | Q&A | 1 | 05-27-2008 03:56 AM |
coordinated task sequence, need help. | qin tian | Q&A | 4 | 05-12-2008 05:52 PM |