Elvas Tower: How does con editor handle unknown parameters? - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How does con editor handle unknown parameters? Rate Topic: -----

#1 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 15 July 2018 - 01:00 PM

Goku,

I'm doing some work for to-be-proposed parameters and have noticed that the con editor appears to stop reading the remaining data of a .wag file when it encounters one of these.

Could you check? I think all you have to do is insert a bogus parameter name in the middle of any .wag file -- BogusName( 123 ) would serve well enough -- and see whether I'm correct.

This could be a larger problem if anyone misspells a real parameter name. Trapping with error message would be much better than abruptly stopping.

Lemme know.

Thanks.

#2 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 15 July 2018 - 01:22 PM

View PostGenma Saotome, on 15 July 2018 - 01:00 PM, said:

Goku,

I'm doing some work for to-be-proposed parameters and have noticed that the con editor appears to stop reading the remaining data of a .wag file when it encounters one of these.

Could you check? I think all you have to do is insert a bogus parameter name in the middle of any .wag file -- BogusName( 123 ) would serve well enough -- and see whether I'm correct.

This could be a larger problem if anyone misspells a real parameter name. Trapping with error message would be much better than abruptly stopping.

Lemme know.

Thanks.
You may have something there Dave. I added "BogusName ( 123 )" in an ENG file just after the second Wagon line and before the Type (Diesel) line. The ENG did not appear in the "ENG list 1" list with filter set to Diesel but did appear in the list when I removed the filter and set it to "All". Changed filter to "Electric" and the ENG, a GP38, was in the list.

#3 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 15 July 2018 - 01:41 PM

What led me to suspect this was a problem was noticing that only the first of four .inc files were logged as read for a particular .wag. Looking at that first .inc file everything looked fine... except down at the very end were two undefined parameters. I had thought the practice was to ignore everything the software didn't recognize and that doesn't seem to be what's going on here.

But... you never really know what's going on w/o asking.

I have my suspicions OR is having the same problem but I've not yet invested the time to do any controlled testing.

#4 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 15 July 2018 - 05:49 PM

Dave,

You are correct because I just solved an issue where the entire wagon would not show up on the list because "CommentToken" was used. I do not know if you have ever seen this, but about 3 lines worth was enough to stop the editor from reading to the end.

#5 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 15 July 2018 - 11:58 PM

Quote

I'm doing some work for to-be-proposed parameters and have noticed that the con editor appears to stop reading the remaining data of a .wag file when it encounters one of these.


In 99.99% cases this is caused by one bracket too much inside .INC file.

Quote

I had thought the practice was to ignore everything the software didn't recognize and that doesn't seem to be what's going on here.


TSRE will ignore all undefined parameters if they are defined correctly.

Quote

You are correct because I just solved an issue where the entire wagon would not show up on the list because "CommentToken" was used. I do not know if you have ever seen this, but about 3 lines worth was enough to stop the editor from reading to the end.


This is different case. CommentToken crashed TSRE not because TSRE doesn't handle "CommentToken" Tag, but because CommentToken in your file is defined without ( ) and TSRE doesn't allow this kind of tag.

#6 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 July 2018 - 01:38 PM

View PostGoku, on 15 July 2018 - 11:58 PM, said:

In 99.99% cases this is caused by one bracket too much inside .INC file.


Not in this case. Here is the .wag:
SIMISA@@@@@@@@@@JINX0D0t______

Wagon ( XM_MILW_702584_Hides
WagonShape ( MILW_USRA_702584.s )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_SS_Boxcar\\XM_USRA_SS_Empty_Car.inc" )
FreightAnim ( Old_ss_parts.s 1 1 1 )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_SS_Boxcar\\XM_USRA_SS_Hides_Ld.inc" )
Include ( "..\\Common.Inc\\Fleet\\Std_Type_E_Coupler_Generic_Draft_Gear.inc" )
Include ( "..\\Common.Inc\\Fleet\\Single_Pipe_AB_Brakes.inc" )
Sound ( "genfreightwag2.sms" )
Name ( "XM 40' MILW <USRA SS> 702584 Hides" )
)



The first .inc file:
Comment ( XM_USRA_SS_Empty_Car.inc )

comment ( "Parts 1A and 1B are correct for all .wags of this model" )

comment ( "Part 1A - Parameters based on the model itself." )
Type ( Freight )
Size ( 3.1m 4.6m 13.45m )
WheelRadius ( 33in/2)
NumWheels ( 8 )
InertiaTensor ( Box ( 3.1m 4.6m 13.15m ) )
MaxBrakeForce (3.6497kn )
MaxHandbrakeForce (2.7372kn )
DerailRailHeight ( 4cm )
ORTSTrackGauge ( 4ft 8.5in )
ORTSRigidWheelBase (5ft 6in )
ORTSBearingType ( Friction )
ORTSUnbalancedSuperelevation ( 6in )


comment ( "Part 1B - Unsupported parameters based on the model itself." )
MaxWidth ( 10.0833 ft )
MaxHeight ( 13.5833 ft )
BrakeShoeFriction ( 0.2)
TargetPctMtyWeight ( 0.7)
DavisFormula ( "Davis 1926" )
CAPY ( 100000 )
LD_LMT ( 122400 )
LT_WT ( 46200 )



The second .inc file:
Comment ( XM_USRA_SS_Burlap_Bags_LD.inc )

comment ( "Part 2A and 2B are parameters based on presence or absence of a load. " )
comment ( "Parameters for an empty car belong in a Fixed_Specs.inc" file." )
comment ( "Parameters for a loaded car belong in a {Lading Name}_Loads.inc file." )

comment "Part 2A - parameters based on presence or absence of a load.
Mass ( 48.0998 s-t )
CentreOfGravity (1.9m)
DerailRailForce ( 109.0903t )
DerailBufferForce ( 380.1582kn )
ORTSDavis_A ( 178.5297 lbf )
ORTSDavis_B ( 2.1645 lbf/mph )
ORTSDavis_C ( 0.0685 lbf/mph^2 )



comment ( "Part 2B - Unsupported parameters based on presence or absence of a load." )
LadingName ( "Burlap bags" )
LadingWeight ( 24.45 s-t )



The third .inc file
comment ( "Type E coupler w/ generic draft gear" )
comment ( "For cars equipped with uncushioned slack pro-couplers ie: Hopper cars, gondolas, tankcars" )
comment ( "older flatcars and boxcars." )

Coupling (
Type ( Automatic )
Spring (
Stiffness ( 0 5e6N/m )
Damping ( 2e6N/m/s 2e6N/m/s )
Break ( 1023.09097kN 1023.09097kN )
r0 ( 7.68cm 15.24cm )
)
Velocity ( 0.2m/s )
)
Coupling (
Type ( Automatic )
Spring (
Stiffness ( 0 5e6N/m )
Damping ( 2e6N/m/s 2e6N/m/s )
Break ( 1023.09097kN 1023.09097kN )
r0 ( 7.68cm 15.24cm )
)
Velocity ( -0.2m/s )
)
Buffers (
Spring (
Stiffness ( 5e6N/m 8e6N/m )
Damping ( 1e6N/m/s 1e6N/m/s )
r0 ( 0m 1e9 )
)
Centre ( 0.5 )
Radius ( 1 )
Angle ( 0.5deg )
)



and the fourth:
Comment ( "Single_Pipe_AB_Brakes.inc" )

BrakeEquipmentType ( "Handbrake, Triple_valve, Auxilary_reservoir, Emergency_brake_reservoir, Retainer_4_Position" )
BrakeSystemType ( "Air_single_pipe" )
NumberOfHandbrakeLeverSteps( 100 )

TripleValveRatio( 2.5 )
MaxReleaseRate( 20 )
MaxApplicationRate( 0.9 )
MaxAuxilaryChargingRate( 1.684 )
EmergencyResCapacity( 2.604 )
EmergencyResChargingRate( 1.684 )
EmergencyBrakeResMaxPressure( 90 )
BrakeCylinderPressureForMaxBrakeBrakeForce( 70 )




The con editor display shows garbage for Mass(), nothing at all for brakes and couplers, and the "Wagon (" string for name. I had my editor count the ( and ) characters in each file before doing the copy paste here and there were matches all around. SOMETHING is going wrong in the first or second .inc file and I can't find it. It might be one of those very simple things that paradoxically are hard to see... or something new, I dunno.

What I do know is the information the con editor is displaying is wrong and I'd like to know how to correct it.

#7 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 16 July 2018 - 01:57 PM

Quote

Not in this case. Here is the .wag:

Ok. This is also the case of no brackets after Tag Name.

Quote

comment "Part 2A - parameters based on presence or absence of a load.
Mass ( 48.0998 s-t )

The line is wrong everywhere! You can't put junk into the file and expect that software will think about everything.
Replace
comment "Part 2A - parameters based on presence or absence of a load.
With:
comment ( "Part 2A - parameters based on presence or absence of a load." )

#8 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 16 July 2018 - 02:05 PM

What about the Mass line. Is "s-t" a proper abbreviation for short ton? The ORTS Manual says in 6.1.10 that the Hud displays "stn" for Short Ton.

#9 User is offline   cr-stagg 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 909
  • Joined: 16-May 05
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 16 July 2018 - 02:16 PM

I find it odd that a WAG file of almost all Include lines has a Sound line, Sound ( "genfreightwag2.sms" ), that refences a file that is a generic sound in the Sound subfolder of the WAG's rather than using an alias to a file in a common.sound folder.

#10 User is online   jdgremsjr 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 31-March 12
  • Gender:Male
  • Location:Fulton, Missouri
  • Simulator:MSTS, OR, TS2016
  • Country:

Posted 16 July 2018 - 02:31 PM

Change:
comment "Part 2A - parameters based on presence or absence of a load.

to:
comment ("Part 2A - parameters based on presence or absence of a load.")

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users