NatLabRockies / NatLabRockies/H2Integrate

Correctly connect `buy_price` to system level controllers that use it

Open
#790 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Correctly connect buy_price to system level controllers that use it

Right now, the buy_price variable within a technology (e.g. grid) is not connected to the SLC controller's buy_price value.
If it's a scalar price, we use the config values from the tech.
However, if you're setting the buy_price via set_val (usually because it varies in time, e.g. is an array) then you have to set it in both the grid tech and the SLC because it's not currently connected.

Proposed solution

Connect the buy_price directly to the SLC.
I think I didn't do this before because there was some coupling introduced that negatively affected convergence, but that was a while ago and my memory is fuzzy.
I can't think of a legit reason that wouldn't work now.

Alternatives considered

Additional context

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.

Research direction

No files or tests are named. Start by locating the technology-level buy_price handling and the system level controller (SLC) entry point, then trace how scalar values and values set through set_val flow between them. Done means the SLC uses the technology's buy_price directly for both scalar and time-varying values without worsening convergence.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.