Code Review #6920

Shinkansen Trains load slowly

Added by stevenh over 5 years ago. Updated over 5 years ago.

Status:NewStart date:2014-05-21
Priority:NormalDue date:
Assignee:stevenh% Done:

0%

Category:-
Target version:-

Description

As noted here:
http://www.tt-forums.net/viewtopic.php?f=26&t=5358&start=4280#p1111583

It seems that Shinkansen don't apply to loading times.
Research how it all works and confirm that it applies to all vehicles.

History

#1 Updated by stevenh over 5 years ago

  • Subject changed from Confirm loading time parameter still functional to Loading time parameter not functional
  • Tracker changed from Code Review to Bug

It doesn't seem that param '6' for Loading time is even used.
This needs to be mapped in as a multiplier for lines 269-311 of header.pnfo.

#2 Updated by stevenh over 5 years ago

Self-commentary: Seems that they 3 vars are merged into one via ActionDs.
Will need to document this and then continue investigations...

#3 Updated by stevenh over 5 years ago

Further investigation:

//For "historical" reasons, these two parameters have to be merged into one.
//NUM * LEN  0D <target B> <operation B> <source1 B> <source2 B> [<data>]
            //Grab param 4 (paxmail caps) and default to 1
   97 * 9     0D 04 80 FF 00 01 00 00 00
            //Grab param 5 (freight caps) and default to 0
   98 * 9     0D 05 80 FF 00 00 00 00 00
            //Grab param 6 (loading times) and default to 1
   99 * 9     0D 06 80 FF 00 01 00 00 00

            //multiply paxmail cap by 10 (data driven)
  100 * 9     0D 12 \D* 04 FF 0A 00 00 00
            //add param 12 and param 06 into 10
            //if param 6 can only be 0-2, then this isn't a large variance at all.
  101 * 5     0D 10 \D+ 12 06
            //multiply param 5 by 10 into 13
  102 * 9     0D 13 \D* 05 FF 0A 00 00 00
            //add this to param 6 and put into 11
  103 * 5     0D 11 \D+ 13 06

This then gives the following table for standard trains:

  //possible load amounts:
  //            |   Load Amount (param 6)     |
  //(pm.cap)    | 0              1              2   |
  //  0            0=\b5        1=\b8        2=\b10
  //  0a        0a=\b7        0b=\b9        0c=\b13
  //  14        14=\b9        15=\b11        16=\b15

//load amount for standard trains
  133 * 55     02 00 FA 81 7F 10 00 FF 0B
     \b5 80 00 00
     \b10 80 02 09
     \b7 80 0A 0A
     \b9 80 0B 0B
     \b13 80 0C 13
     \b9 80 14 14
     \b11 80 15 15
     \b15 80 16 1D
     \b11 80 1E 1E
     \b13 80 1F 1F
     \b18 80 20 FF
     \b8 80

Will investigate tonight to see if it provides enough variance.

#4 Updated by stevenh over 5 years ago

And now for express... this includes shinkansen.... The values are lower?

  //possible load amounts for express(incl.shinkansen) trains
  //            |   Load Amount (param 6)     |
  //(pm.cap)    | 0              1              2   |
  //  0            0=\b3        1=\b5        2=\b8
  //  0a        0a=\b4        0b=\b6        0c=\b10
  //  14        14=\b5        15=\b7        16=\b12

//load amount for express trains
  134 * 55     02 00 FB 81 7F 10 00 FF 0B
     \b3 80 00 00
     \b8 80 02 09
     \b4 80 0A 0A
     \b6 80 0B 0B
     \b10 80 0C 13
     \b5 80 14 14
     \b7 80 15 15
     \b12 80 16 1D
     \b6 80 1E 1E
     \b8 80 1F 1F
     \b14 80 20 FF
     \b5 80

#5 Updated by stevenh over 5 years ago

And... of course, var '4' (paxmail cap) scales from 0-3, not 0-2.

#6 Updated by stevenh over 5 years ago

  • Subject changed from Loading time parameter not functional to Shinkansen Trains load slowly
  • Tracker changed from Bug to Code Review

This all works as expected.
Review required as to whether the Shinkansen loading times are quick enough?

Also available in: Atom PDF