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

[Feat] User provided InitialDesign #1034

Open
eddiebergman opened this issue Jun 9, 2023 · 1 comment
Open

[Feat] User provided InitialDesign #1034

eddiebergman opened this issue Jun 9, 2023 · 1 comment

Comments

@eddiebergman
Copy link
Contributor

It would be good to have an initial design that allows users to simply pass configurations they would like to start with. Currently this is not covered by any documented means. The easiest way for me to implement this is to inheirt from AbstractInitialDesign and pass this in.

Proposed solution:

  • A ProvidedInitialDesign which simply takes a list of configurations to start with.
    • Optionally should could have probability of sampling with n_configs to allow them to provide something like 10 configs but only have 5 sampled with a given waiting.
  • Simply pass a list[Configuration] to initial_design= which internally creates ProvidedInitialDesign and uses that.

The overhead to integrate this seems relatively low and I imagine it's easy enough to test.

@eddiebergman
Copy link
Contributor Author

class ProvidedInitialDesign(AbstractInitialDesign):
    def __init__(self, scenario: Scenario, configs: Iterable[Configuration]):
        self.configs = list(configs)
        super().__init__(scenario=scenario, n_configs=len(self.configs))

    def _select_configurations(self) -> list[Configuration]:
        for config in self.configs:
            config.origin = "Provided Initial Design"

        return self.configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants