Closed mbbruch closed 1 month ago
@FDsteven , this PR integrates the private repo changes into your ongoing train planner updates branch. Please review the list of changes above + the code changes and let me know if you have any questions.
@Shawn0516 , for your awareness, this is where I am starting to port your changes into the ALTRIOS repo.
generate_return_demand
implemented as separate functions for each train type. Functions are "registered" in a dict and looked up by train type.target_cars_per_train
andmin_cars_per_train
are dicts where eachTrain_Type
can have a different value specified.TrainPlannerConfig
is a@dataclass
to make code cleanergenerate_demand_trains
generate_dispatch_times
renamedgenerate_dispatch_details
. It now evenly spaces out all dispatches for each OD pair, rather than doing so separately for each train type, so that simultaneous departures are avoided.alt.TrainConfig
object is updated based on the actual dispatched rail vehicles (loaded and/or empty) including therail_vehicles
vector and then_cars_by_type
dict.