Skip to content

Conversation

@dirkschumacher
Copy link
Contributor

No description provided.

@dirkschumacher dirkschumacher marked this pull request as ready for review October 13, 2025 12:48
@merschformann merschformann requested a review from Copilot October 13, 2025 13:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes interface-based abstractions for model objectives, converting them to concrete struct types. The change simplifies the codebase by eliminating unnecessary interfaces and their corresponding implementation types.

  • Removed interfaces like VehiclesDurationObjective, VehiclesObjective, UnPlannedObjective, etc. and converted them to concrete structs
  • Eliminated implementation structs (e.g., vehiclesDurationObjectiveImpl) by promoting their fields to the main struct
  • Updated function return types from interfaces to concrete struct pointers

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
model_objective_vehicles_duration.go Converted interface to struct, removed implementation type
model_objective_vehicles.go Converted interface to struct, removed implementation type
model_objective_unplanned.go Converted interface to struct, removed implementation type
model_objective_travelduration.go Converted interface to struct, removed implementation type
model_objective_term.go Converted interface to struct, removed implementation type
model_objective_stop_balancing.go Renamed and converted implementation struct to main struct
model_objective_min_stops.go Converted implementation struct to main struct
model_objective_expression_test.go Updated test to use concrete type methods
model_objective_expression.go Converted interface to struct, removed implementation type
model_objective_earliness.go Converted interface to struct, removed implementation type
model_objective_distance.go Converted interface to struct, removed implementation type
model_objective.go Converted sum interface to struct, removed implementation type
model.go Updated objective field type to concrete struct pointer

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@merschformann merschformann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you. One interface at a time. ❤️

Comment on lines +69 to +71
// Earliness returns the earliness of a stop. The earliness is the
// difference between target time and the actual arrival, start or stop of a
// stop. Depending on the TemporalReference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love us to improve our comments / code docs here, but that is besides the point of this PR. ❤️

@dirkschumacher dirkschumacher merged commit b6d0969 into draft-v1.2 Oct 14, 2025
32 checks passed
@dirkschumacher dirkschumacher deleted the feature/eng-6663 branch October 14, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants