@@ -462,15 +462,15 @@ public void withElectricalProfilesAndComfort() throws IOException {
462
462
var stops = new RJSTrainStop []{RJSTrainStop .lastStop (0.1 )};
463
463
var trainSchedules = new ArrayList <RJSStandaloneTrainSchedule >();
464
464
for (int i = 1 ; i <= 5 ; i ++) {
465
- var rollingStock = getExampleRollingStock ("fast_rolling_stock .json" );
465
+ var rollingStock = getExampleRollingStock ("electric_rolling_stock .json" );
466
466
rollingStock .name += i ;
467
467
rollingStock .basePowerClass = String .valueOf (i );
468
468
rollingStocks .add (rollingStock );
469
469
470
470
var trainSchedule = new RJSStandaloneTrainSchedule ("Test." + i , rollingStock .name , 0 , null , stops , null );
471
471
trainSchedules .add (trainSchedule );
472
472
}
473
- var trainSchedule = new RJSStandaloneTrainSchedule ("Test" , "fast_rolling_stock1 " , 0 , null , stops , null ,
473
+ var trainSchedule = new RJSStandaloneTrainSchedule ("Test" , "electric_rolling_stock1 " , 0 , null , stops , null ,
474
474
RJSComfortType .AC , null , null );
475
475
trainSchedules .add (trainSchedule );
476
476
@@ -513,9 +513,9 @@ public void testWithPowerRestrictions() throws IOException {
513
513
new RJSPowerRestrictionRange (6000. , 8000. , "Unknown" ),
514
514
};
515
515
var trains = new ArrayList <RJSStandaloneTrainSchedule >();
516
- trains .add (new RJSStandaloneTrainSchedule ("with" , "fast_rolling_stock " , 0 , null , stops , null ,
516
+ trains .add (new RJSStandaloneTrainSchedule ("with" , "electric_rolling_stock " , 0 , null , stops , null ,
517
517
RJSComfortType .STANDARD , null , powerRestrictionRanges ));
518
- trains .add (new RJSStandaloneTrainSchedule ("without" , "fast_rolling_stock " , 0 , null , stops , null ));
518
+ trains .add (new RJSStandaloneTrainSchedule ("without" , "electric_rolling_stock " , 0 , null , stops , null ));
519
519
520
520
var query = new StandaloneSimulationRequest ("small_infra/infra.json" , "1" , 2 , getExampleRollingStocks (), trains ,
521
521
rjsTrainPath );
@@ -524,7 +524,7 @@ public void testWithPowerRestrictions() throws IOException {
524
524
var resultWith = Iterables .getLast (simResult .baseSimulations .get (0 ).headPositions ).time ;
525
525
var resultWithout = Iterables .getLast (simResult .baseSimulations .get (1 ).headPositions ).time ;
526
526
assertTrue (resultWith > resultWithout + 1 ,
527
- "With power restrictions should be a lot slower than without, but was "
527
+ "With power restrictions should be a lot slower than without, but was "
528
528
+ resultWith + " vs " + resultWithout );
529
529
}
530
530
@@ -539,9 +539,9 @@ public void testWithPowerRestrictionsAndElectricalProfiles() throws IOException
539
539
new RJSPowerRestrictionRange (6000. , 8000. , "Unknown" ),
540
540
};
541
541
var trains = new ArrayList <RJSStandaloneTrainSchedule >();
542
- trains .add (new RJSStandaloneTrainSchedule ("with" , "fast_rolling_stock " , 0 , null , stops , null ,
542
+ trains .add (new RJSStandaloneTrainSchedule ("with" , "electric_rolling_stock " , 0 , null , stops , null ,
543
543
RJSComfortType .STANDARD , null , powerRestrictionRanges ));
544
- trains .add (new RJSStandaloneTrainSchedule ("without" , "fast_rolling_stock " , 0 , null , stops , null ));
544
+ trains .add (new RJSStandaloneTrainSchedule ("without" , "electric_rolling_stock " , 0 , null , stops , null ));
545
545
546
546
var query = new StandaloneSimulationRequest ("small_infra/infra.json" ,
547
547
"small_infra/external_generated_inputs.json" , "1" , 2 , getExampleRollingStocks (), trains , rjsTrainPath );
@@ -562,8 +562,7 @@ List<String> gather(List<ElectrificationConditionsRange> ranges,
562
562
public void testElectrificationConditionsInResult () throws IOException {
563
563
final var rjsTrainPath = smallInfraTrainPath ();
564
564
565
- var rollingStock = getExampleRollingStock ("fast_rolling_stock.json" );
566
- rollingStock .basePowerClass = "5" ;
565
+ var rollingStock = getExampleRollingStock ("electric_rolling_stock.json" );
567
566
568
567
var trainSchedule = new RJSStandaloneTrainSchedule ("Test" , rollingStock .name , 0 , new RJSAllowance [0 ],
569
568
new RJSTrainStop [] { RJSTrainStop .lastStop (0.1 ) }, null , RJSComfortType .AC , null , null );
@@ -583,15 +582,15 @@ public void testElectrificationConditionsInResult() throws IOException {
583
582
var simResult = runStandaloneSimulation (query );
584
583
var electrificationConditionsRanges = simResult .electrificationConditions .get (0 );
585
584
586
- var expectedUsedModes = List .of ("thermal " , "25000" , "25000" , "25000" , "25000" , "25000" );
585
+ var expectedUsedModes = List .of ("1500 " , "25000" , "25000" , "25000" , "25000" , "25000" );
587
586
var usedModes = gather (electrificationConditionsRanges , e -> e .usedMode );
588
587
assertEquals (expectedUsedModes , usedModes );
589
588
590
589
var expectedUsedProfiles = List .of ("null" , "25000" , "22500" , "20000" , "22500" , "25000" );
591
590
var usedProfiles = gather (electrificationConditionsRanges , e -> e .usedProfile );
592
591
assertEquals (expectedUsedProfiles , usedProfiles );
593
592
594
- var expectedSeenModes = List .of ("1500 " , "null" , "null" , "null" , "null" , "null" );
593
+ var expectedSeenModes = List .of ("null " , "null" , "null" , "null" , "null" , "null" );
595
594
var seenModes = gather (electrificationConditionsRanges , e -> e .seenMode );
596
595
assertEquals (expectedSeenModes , seenModes );
597
596
@@ -604,8 +603,7 @@ public void testElectrificationConditionsInResult() throws IOException {
604
603
public void testElectrificationConditionsInResultWithIgnored () throws IOException {
605
604
final var rjsTrainPath = smallInfraTrainPath ();
606
605
607
- var rollingStock = getExampleRollingStock ("fast_rolling_stock.json" );
608
- rollingStock .basePowerClass = "5" ;
606
+ var rollingStock = getExampleRollingStock ("electric_rolling_stock.json" );
609
607
610
608
var trainSchedule1 = new RJSStandaloneTrainSchedule ("Test" , rollingStock .name , 0 , new RJSAllowance [0 ],
611
609
new RJSTrainStop [] { RJSTrainStop .lastStop (0.1 ) }, null , RJSComfortType .AC , null , null );
@@ -642,8 +640,7 @@ public void testElectrificationConditionsInResultWithIgnored() throws IOExceptio
642
640
public void testElectrificationConditionsInResultWithPowerRestriction () throws IOException {
643
641
final var rjsTrainPath = smallInfraTrainPath ();
644
642
645
- var rollingStock = getExampleRollingStock ("fast_rolling_stock.json" );
646
- rollingStock .basePowerClass = "5" ;
643
+ var rollingStock = getExampleRollingStock ("electric_rolling_stock.json" );
647
644
648
645
var trainSchedule = new RJSStandaloneTrainSchedule ("Test" , rollingStock .name , 0 , new RJSAllowance [0 ],
649
646
new RJSTrainStop [] { RJSTrainStop .lastStop (0.1 ) }, null , RJSComfortType .AC , null ,
@@ -664,7 +661,7 @@ public void testElectrificationConditionsInResultWithPowerRestriction() throws I
664
661
var simResult = runStandaloneSimulation (query );
665
662
var electrificationConditionsRanges = simResult .electrificationConditions .get (0 );
666
663
667
- var expectedUsedModes = List .of ("thermal " , "thermal " , "25000" , "25000" , "25000" , "25000" , "25000" );
664
+ var expectedUsedModes = List .of ("1500 " , "1500 " , "25000" , "25000" , "25000" , "25000" , "25000" );
668
665
var usedModes = gather (electrificationConditionsRanges , e -> e .usedMode );
669
666
assertEquals (expectedUsedModes , usedModes );
670
667
@@ -676,7 +673,7 @@ public void testElectrificationConditionsInResultWithPowerRestriction() throws I
676
673
var usedRestrictions = gather (electrificationConditionsRanges , e -> e .usedRestriction );
677
674
assertEquals (expectedUsedRestrictions , usedRestrictions );
678
675
679
- var expectedSeenModes = List .of ("1500 " , "1500 " , "null" , "null" , "null" , "null" , "null" );
676
+ var expectedSeenModes = List .of ("null " , "null " , "null" , "null" , "null" , "null" , "null" );
680
677
var seenModes = gather (electrificationConditionsRanges , e -> e .seenMode );
681
678
assertEquals (expectedSeenModes , seenModes );
682
679
0 commit comments