Add a check to H2IntegrateModel to check timestep duration

Open
#635 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start with H2IntegrateModel and the proposed model metadata, then compare the user-input technologies in plant_config.yaml with the options discussed in supported_models.py and the performance or cost classes. Define how supported timesteps should be represented and where validation belongs; done means unsupported model and timestep combinations receive a clear framework check instead of an esoteric error.

Written by the indexing model from the issue text.

Description

Add a check to H2IntegrateModel to check timestep duration

We should have framework checks to ensure users don't get esoteric error messages when using models that might not support a given timestep.

Proposed solution

We could implement a check based on comparing the user-inputted technologies included in the plant_config.yaml against a list of known models that support given timesteps.
It could be as simple as must_be_hourly set to True or False for technologies, or something more complex that lists the available timesteps for a model.
I think it should be that latter one, in case we get models that work at e.g. 5, 15, 30 min intervals, and others that work just at 15, and 30, and we'd want a nice way to track what's supported across different models in a cohesive way.

We discussed having a list of models and their supported timesteps at the supported_models.py level.
That could be a great solution, though as I'm sitting here typing this, it seems that having this information live with the model definition itself, e.g. in the performance or cost classes themselves, might make more sense?
It could be an expected attribute on the classes.

Alternatives considered

Additional context

Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NatLabRockies/H2Integrate

All issues in NatLabRockies/H2Integrate

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.