Commit f021c6b2 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

distinguish between ICE 3 403 series 1/2 and ICE T 411 series 1/2

parent 6c55049d
Loading
Loading
Loading
Loading
+21 −7
Original line number Diff line number Diff line
@@ -311,10 +311,13 @@ sub train_subtype {
	my %ml = (
		'ICE 1'        => 0,
		'ICE 2'        => 0,
		'ICE 3'        => 0,
		'ICE 3 403.1'  => 0,
		'ICE 3 403.2'  => 0,
		'ICE 3 406'    => 0,
		'ICE 3 Velaro' => 0,
		'ICE 4'        => 0,
		'ICE T 411'    => 0,
		'ICE T 411.1'  => 0,
		'ICE T 411.2'  => 0,
		'ICE T 415'    => 0,
		'IC2 Twindexx' => 0,
		'IC2 KISS'     => 0,
@@ -337,8 +340,15 @@ sub train_subtype {
		{
			$ml{'ICE 2'}++;
		}
		elsif ( $wagon->model == 403 or $wagon->model == 406 ) {
			$ml{'ICE 3'}++;
		elsif ( $wagon->model == 403 and substr( $wagon->uic_id, 9, 2 ) <= 37 )
		{
			$ml{'ICE 3 403.1'}++;
		}
		elsif ( $wagon->model == 403 and substr( $wagon->uic_id, 9, 2 ) > 37 ) {
			$ml{'ICE 3 403.2'}++;
		}
		elsif ( $wagon->model == 406 ) {
			$ml{'ICE 3 406'}++;
		}
		elsif ( $wagon->model == 407 ) {
			$ml{'ICE 3 Velaro'}++;
@@ -346,8 +356,12 @@ sub train_subtype {
		elsif ( $wagon->model == 412 or $wagon->model == 812 ) {
			$ml{'ICE 4'}++;
		}
		elsif ( $wagon->model == 411 ) {
			$ml{'ICE T 411'}++;
		elsif ( $wagon->model == 411 and substr( $wagon->uic_id, 9, 2 ) <= 32 )
		{
			$ml{'ICE T 411.1'}++;
		}
		elsif ( $wagon->model == 411 and substr( $wagon->uic_id, 9, 2 ) > 32 ) {
			$ml{'ICE T 411.2'}++;
		}
		elsif ( $wagon->model == 415 ) {
			$ml{'ICE T 415'}++;
@@ -373,7 +387,7 @@ sub train_subtype {

	$self->{train_subtype} = $likelihood[0];

	if ( $self->{train_subtype} eq 'ICE 3' and $with_restaurant ) {
	if ( $self->{train_subtype} =~ m{ICE 3 4} and $with_restaurant ) {
		$self->{train_subtype} = 'ICE 3 Redesign';
	}
	return $self->{train_subtype};