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

Normalize *Strategy* related classes and properties #204

Open
3 tasks
Carsopre opened this issue Oct 25, 2024 · 1 comment
Open
3 tasks

Normalize *Strategy* related classes and properties #204

Carsopre opened this issue Oct 25, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Carsopre
Copy link
Collaborator

Carsopre commented Oct 25, 2024

Kind of request

Changing existing functionality

Enhancement Description

We want to have self-contained and self-explanatory dataclasses whose purpose is defined (and limited) during the koswat analysis.

During the last PRs we have introduced (at least) the following dataclasses for strategy calculations:

  • StrategyInput, (should be) used as an input to generate the results.
  • StrategyLocationInput (should be) used as the initial state of a location (selected reinforcement, costs, ...)
  • StrategyReinforcementTypeCosts (should be) used to store the location's costs for a specific reinforcement type.
  • StrategyLocationReinforcement (should be) used to represent the resulting state of applying a strategy.

On the other hand, we also should consider the renaming of OrderStrategy into something related to its real scope (clustering based on space due to obstacles)

  • Study the option to change the return type of StrategyProtocol.apply_strategy to return an object that also includes the used reinforcement order.

What needs to be done?

Create sub-tasks for better traceability!

  • Streamline the scope of the aforementioned dataclasses, creating new ones if needed ( StrategyObastacleCosts / StrategyLocationInfrastructureCosts?).
  • Ensure the (class and properties) names match expectations.
  • Define strategies' scope as docstrings and rename if necessary.

Use case

  • Code should be readable and easy to extend.
  • Objects should have a defined limited "life" scope.
  • It can be confusing when the names seem to be the same.

Additional Context

Do not take this issue during active development of strategies.

@Carsopre Carsopre added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 25, 2024
@Carsopre Carsopre added this to the Sprint 2024.4.2 milestone Oct 25, 2024
@Carsopre Carsopre changed the title Normalize StrategyInput properties and dataclasses Normalize *Strategy* related classes and properties Oct 25, 2024
@ArdtK
Copy link
Contributor

ArdtK commented Oct 28, 2024

@Carsopre I also spotted a few other (broader) opportunities:

  • measure vs reinforcement vs reinforcement profile vs profile
  • cost vs costs

@ArdtK ArdtK removed this from the Sprint 2024.4.2 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants