Variable setup - possible bug

davidbird

ex-Chilwellian
I'm running build 103369. I have a session where I have set up a shunt in a power station and used session variables to control it

I have used the Input Table rule kuid2:131986:1012:1 to define the variables and operators to be used on them, and the Variable Modify rule kuid:-25:1050 to allocate initial values to them (to represent a partly-unloaded train, with some wagons still in the LWS (Loaded Wagon Sidings) and some already transferred to the EWS) - both as top-level rules run at session startup.
I then use a series of Set S-Variable kuid2:160293:101005:5 and ChangeSVariables kuid:131986:1005 DriverCommands to control the AI shunting loco, and Variable Modify child rules (as the player-train brings in a loaded and takes away an empty consist) to adjust the values as the session progresses.

This worked as expected in TANE, but failed in TRS19.

I have found out this failure is because during the initial setup the Variable Modify rule doubles the values allocated to the variables to represent the number of wagons in the LWS and EWS, so confusing the AI shunting loco. All the other operations are OK.

Is this doubling a bug - in TRS2019 or in the Input Table rule?

Any ideas before I put in a bug report?

Thanks

Edit:- Bug report submitted
 
Last edited:
Update

I added another top-level instance of the Variable Modify rule , which worked just as expected.

So I deleted the original VM rules, but when the session was ran again, the values were still modified - this time to the expected value - although the rules were no longer in the session!

I seem to have "ghost" copies of the rule, possibly from when the session was either imported from TANE to TRS19, or TRS19 updated to the beta 103369.

Bug report updated, but does anyone here have any ideas?
 
I use the Variable Modify Rule, Variable Check Rule, Variable Random Rule and Variable Show Rule in my sessions and have not come across this issue. I have never used the variable driver commands or the Input Table Rule that you have mentioned.

Is it possible that using two sets of different operations, Rules and Driver Commands, to set and alter the variables is the problem?
 
Hi David

I've noticed on more than one occasion that in sessions brought in from TANE the driver commands often don't work correctly, if at all. Removing them and re-entering them will cure the problem. I've not noticed this with rules though so far.

Regards

Brian
 
I use the Variable Modify Rule, Variable Check Rule, Variable Random Rule and Variable Show Rule in my sessions and have not come across this issue. I have never used the variable driver commands or the Input Table Rule that you have mentioned.
I tried deleting the Input Table rule - all runs properly - but the Input Table is necessary to setup the driver commands to use the variables, so I've re-instated it.
Is it possible that using two sets of different operations, Rules and Driver Commands, to set and alter the variables is the problem?
Don't think this can be the problem as the recently added Variable Modify rule works OK, and the "Ghost" values (from the now-deleted Variable Modify rules) appear immediately at session startup, while the driver commands are not activated until more than a minute into the session.

I definitely consider it is "ghosts" of the Variable Modify rule...
 
Hi David

I've noticed on more than one occasion that in sessions brought in from TANE the driver commands often don't work correctly, if at all. Removing them and re-entering them will cure the problem. I've not noticed this with rules though so far.

Regards

Brian

Thanks Brian,
As far as I can tell, the driver commands are working as expected. Deleting the Variable Modify rule and re-entering it just brings the problem back.

Of course, I can completely solve the problem simply by deleting the Variable Modify rule... but that shouldn't work!
And, as the rule is a built-in, I can't delete it from CM and do a "Remove Missing Assets" from the session.
So how do I remove these ghosts?
 
Hi David - Could you try using "Delete Missing Assets" anyway? That option seems to get rid of ghost trains and might also work for ghost rules.

Incidentally, "Set S-Variable" is a replacement for "ChangeSVariables" so you don't to use need both commands. The format is different so you do need to revise the Input Table entries to suit the command that you are using.

@Kennilworth - Hi Brian. Hope you are well.

Best Redards - Trevor
 
Update
It is not a problem on transferring from TANE to TRS2019. The recently added VM rule is now doubled! Also the Show Variables rules are also doubled!

Hi David - Could you try using "Delete Missing Assets" anyway? That option seems to get rid of ghost trains and might also work for ghost rules.
...
Best Redards - Trevor
Thanks Trevor, but that doesn't work.
 
Back
Top