issues
search
rl-institut
/
SimBA
GNU Affero General Public License v3.0
2
stars
1
forks
source link
refactor of Trip and Rotation
#178
Open
stefansc1
opened
7 months ago
stefansc1
commented
7 months ago
Changes to Rotation:
remove vehicle_type as init argument, use Trip.vehicle_type to set attribute
Rotation.add_trip now expects a Trip object
change Rotation.add_trip to Rotation.add_trip_from_dict, which builds a Trip and calls Rotation.add_trip
rework of vehicle_type and charging_type assignment from given trips in add_trip
better structure and logic flow
keep charging_type of rotation and its trips consistent
Changes to Trip:
explicit arguments with defaults instead of kwargs
better attribute structure to see all at a glance
use Trip.vehicle/charging_type for consumption calculation instead of rotation (allows for indipendent trips)
make util.get_buffer_time(trip) a function of Trip
General changes:
remove optimizer_util.get_buffer_time (not needed)
add reasoning to expected values of test_util.test_get_buffer_time
Changes to Rotation:
Changes to Trip:
General changes: