Is there an "abandon schedule" rule?

tbryson2

Member
Im setting up an AI scenario where I have engine 1 (AI engine) patiently waiting on engine 2 (Player engine) to pass by and drop off empty cars. After the cars are dropped off, engine 2 leaves the area and hits a trigger which sets engine 1 off to fetch the empty cars, load them, and park them elsewhere. This all works great except,

if engine 3 passes by the trigger (without dropping off any cars), engine 1 gets the schedule to do it's thing. It will not because there are no cars waiting. THIS IS GOOD!

BUT

Now engine 1 has a schedule (set by engine 3 hitting the trigger) and nothing to do. Engine two comes along later, and drops off empty cars, but engine 1 will not move even after engine 2 has hit the trigger, I'm assuming (yes, I know) it's because of the "blown" schedule still sitting in it's queue.

I figure I need a command to remove the schedule from engine 1 that was loaded when engine 3 (or any other engine) passed by and does not drop off any cars.

Is there a command to remove (abandon?) the entire schedule that was queued up on engine 1 when engine 3 passed by and no cars were dropped off?

I'm thinking I need to add a "wait x minutes" and then an "abandon schedule" to the end of the string and if nothing happens, it will automatically abandon the bogus schedule.

Thanks!
 
Last edited:
I dont think that there is a driver command that will do what you want. An alternative would be to set up the commands for engine 1 so that it only reacts to a certain class of engine rather than all engines. Use your chosen class of engine to deliver the wagons but not to pull any other trains and then engine 1 will only react when there are waggons waiting.

Andy
 
I'm not sure I'm clear on exactly you want to happen. If engine 2 will always set out cars (just sometimes after engine 3 passes) and you always want engine 1 to wait and pick them up, you could use pgipg's RaiseEvent (kuid:178892:80007) and WaitForEvent (kuid:178892:80006) driver commands instead of the trigger. Place the RaiseEvent command in engine 2's command string at an appropriate point (after it's uncoupled and moved away or whatever). Place the WaitForEvent in engine 1's string where you now have the wait for trigger. Engine 1 will sit there until engine 2 has set out the consist no matter what else occurs. If you want engine 1 to do something other than wait for enigine 2's consist if engine 3 passes first, pgipg's commands won't help. If there's a way to make AI conditional (if this do A otherwise do B), I'm not aware of it.
 
You need to use a conditional command such as these:

Wait Until S-variable,<kuid:160293:101006>
Skip if S-variable,<kuid:160293:101014>
Skip if trackmark vacant,<kuid2:160293:101010:1>
Skip to label,<kuid:160293:101003>
Change S-Variables,<kuid:160293:101005>
Insert Label,<kuid:160293:101002>
Insert or Replace Commands,<kuid2:160293:101200:1>

The condition you are waiting for is "the cars have been dropped off". Once this has happened you then wait for the trigger and then do your thing.

For engine 2 - after it has dropped off the cars, add the command Change S-Variable.

For engine 1 - start with Wait Until S-variable, followed by the Wait for Trigger command.

Now train 1 will wait until the variable has changed before it even thinks about moving. And the only train that will change the variable is train 2 and only after it sets out the cars.

You will need to add the InputTable rule to your session and set up the appropriate variable there as this is where the S-Variables (session variables) are stored.

There is not much that can't be done in complex operations with these very useful driver commands.

David
 
Re-wrote the original post for clarification.

ALSO, I did move the trigger to a different area and it will work better, but I could still create a bad schedule if I don't pay attention. A way to abandon a schedule would be nice.
 
Your clarification that engine 2 is a player train changes things. Try installing trigger1 at the location where the cars will be set out and trigger 2 where engine 1 leaves the area.

Commands for train 1 wait for trigger1, wait for trigger 2, the rest of the commandss for engine1.

With this set-up, no input is needed from engine2. The drawback from this solution is that if engine 3 can trip trigger 2 while engine one is setting out the cars, there may be a condition that causes engine1 to start running. If this is not possible, you have a solution.

David
 
You need to use a conditional command such as these:

Wait Until S-variable,<kuid:160293:101006>
Skip if S-variable,<kuid:160293:101014>
Skip if trackmark vacant,<kuid2:160293:101010:1>
Skip to label,<kuid:160293:101003>
Change S-Variables,<kuid:160293:101005>
Insert Label,<kuid:160293:101002>
Insert or Replace Commands,<kuid2:160293:101200:1>

The condition you are waiting for is "the cars have been dropped off". Once this has happened you then wait for the trigger and then do your thing.

For engine 2 - after it has dropped off the cars, add the command Change S-Variable.

For engine 1 - start with Wait Until S-variable, followed by the Wait for Trigger command.

Now train 1 will wait until the variable has changed before it even thinks about moving. And the only train that will change the variable is train 2 and only after it sets out the cars.

You will need to add the InputTable rule to your session and set up the appropriate variable there as this is where the S-Variables (session variables) are stored.

There is not much that can't be done in complex operations with these very useful driver commands.

David

Hi David - I suppose that you have forgotten or do not realise that that the commands mentioned above are not yet on the DLS. I sent them to you for evaluation in February 2011 and am still waiting for your report.

There have been several updates to the commands since then but some of them are still not fully debugged. If you have found any defects then I would appreciate receiving that information.

Cheers - Trevor
 
Thanks for the replys! I'll have to play with it and see what i come up with!

Terry

Use the trigger command but with to be triggered by a specific loco, at the moment you have it triggered by any loco. If it's a portal loco you'll have to wait until it's emitted.
And yes there is an abandon schedule rule, usually 3rd down when you r/click on any driver with a schedule.
 
Last edited:
Hi David - I suppose that you have forgotten or do not realise that that the commands mentioned above are not yet on the DLS. I sent them to you for evaluation in February 2011 and am still waiting for your report.

There have been several updates to the commands since then but some of them are still not fully debugged. If you have found any defects then I would appreciate receiving that information.

Cheers - Trevor

Trevor,

You are correct - my bad. I have used them once an did not notice any problems, but never had the chance to give them a thorough testing. If you send me the updates, I'll give them a go. I'm back to creating sessions after a break to update CMTM3 and CMTMBargeController.


David
 
BOGUS INFORMATION! Oh what SHALL we do? Oh the HUMANITY!!!! :hehe: Sounded promising though. Would be nice to know when these rules are released.

Thanks for all of the replys, I'm not desperate for an answer but I am tinkering with it though. Will be playing with it a bit and who knows, may come up with something.

Fran1, I am aware of the "abandon schedule" for when your driving the train, but I cannot establish one for an AI trian I'm setting up in surveyor. (Guess I should have made that obvious too.)

Terry
 
Back
Top