Skip to content

Commit

Permalink
Change: Randomised Piece Goods Wagons - match refit to box vans, not …
Browse files Browse the repository at this point in the history
…flat wagons, as it's more flexible
  • Loading branch information
andythenorth committed May 21, 2024
1 parent 080a4cc commit ed55b69
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -6615,18 +6615,20 @@ def __init__(self, **kwargs):

class PieceGoodsCarRandomisedConsist(RandomisedConsistMixin, CarConsist):
"""
Randomised general freight wagon - with refits matching flat / plate / tarpaulin cars - this might be a bad idea
Randomised general freight wagon - with refits matching box vans - this is a compromise and means some cargos won't match e.g. non-randomised plate wagons or opens.
"""

def __init__(self, **kwargs):
self.base_id = "randomised_piece_goods_car"
super().__init__(**kwargs)
self.class_refit_groups = ["flatbed_freight"]
self.label_refits_allowed = ["GOOD"]
self.class_refit_groups = ["packaged_freight"]
self.label_refits_allowed = polar_fox.constants.allowed_refits_by_label[
"box_freight"
]
self.label_refits_disallowed = polar_fox.constants.disallowed_refits_by_label[
"non_flatbed_freight"
"non_freight_special_cases"
]
self.default_cargos = polar_fox.constants.default_cargos["flat_tarpaulin_roof"]
self.default_cargos = polar_fox.constants.default_cargos["box"]
self._intro_year_days_offset = (
global_constants.intro_month_offsets_by_role_group["non_core_wagons"]
)
Expand Down

0 comments on commit ed55b69

Please sign in to comment.