Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/108 apply a measure selection strategy to all locations #111

Merged

Conversation

Carsopre
Copy link
Collaborator

No description provided.

@Carsopre Carsopre linked an issue Oct 25, 2023 that may be closed by this pull request
2 tasks
@Carsopre Carsopre added this to the [v0.14.0] Release 2023 milestone Oct 25, 2023
Copy link
Contributor

@ArdtK ArdtK left a comment

Choose a reason for hiding this comment

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

A few comments/questions

]
self._location_matrix = strategy_input.locations_matrix
self._structure_buffer = strategy_input.structure_buffer
self._min_space_between_structures = strategy_input.min_space_between_structures
Copy link
Contributor

Choose a reason for hiding this comment

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

Not used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct, this is preliminary work for #110

locations_profile_report_list: list[MultiLocationProfileCostReport]
available_locations: list[PointSurroundings]

def __init__(
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this match with the design principle of parameterless init?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does not. I'll make it parameterless. in the follow-up issue #110 (as #109 has already an opened PR).

_matrix[_reinforcement_per_location.location] = _suitable_locations + [
_reinforcement_per_location.selected_measure.output_name
]

Copy link
Contributor

Choose a reason for hiding this comment

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

Much better!

Copy link
Contributor

Choose a reason for hiding this comment

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

Will you add tests for the strategies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but once the code in OrderStrategy is final, as we are already checking via other tests (in #112 ) whether the extra column with selected measure exists.
I'm also doubting whether to introduce already a protocol or wait until we have anotherstrategy case.
I also just realized I wrote order_stategy.py instead of order_strategy.py I will correct that in #110

@Carsopre Carsopre merged commit c3b46f2 into master Oct 25, 2023
@Carsopre Carsopre deleted the feature/108-apply-a-measure-selection-strategy-to-all-locations branch October 25, 2023 18:24
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.

Apply a measure selection strategy to all locations
2 participants