Version Checks (indicate both or one)
Issue Description
In 0.35, ramp_limit_up for comittable links gives an expression which limits ramping unless the link status changes, works.
[hour_1, electrolyzer]: +1 Link-p[hour_1, electrolyzer] - 1 Link-p[hour_0, electrolyzer] + 80 Link-status[hour_0, electrolyzer] - 100 Link-status[hour_1, electrolyzer] ≤ -0.0
In 1.0, that fails it seems. I think I tracked it down to:
# ---------------- Check if ramping is at start of n.snapshots --------------- #
attr = {"p", "p0"}.intersection(c.dynamic.keys()).pop()
start_i = n.snapshots.get_loc(sns[0]) - 1
p_start = c.dynamic[attr].iloc[start_i]
# Get the dispatch value from previous snapshot if not at beginning
is_rolling_horizon = sns[0] != n.snapshots[0] and not p_start.empty
p = m[f"{c.name}-{attr}"]
The attr yields p0 here, and then the function tries to formulate something with "Link-p0" which doesn't exist (should be Link-p).
Reproducible Example
Expected Behavior
see above
Installed Versions
Details
Replace this line.
Version Checks (indicate both or one)
I have confirmed this bug exists on the lastest release of PyPSA.
I have confirmed this bug exists on the current
masterbranch of PyPSA.Issue Description
In 0.35, ramp_limit_up for comittable links gives an expression which limits ramping unless the link status changes, works.
In 1.0, that fails it seems. I think I tracked it down to:
The attr yields p0 here, and then the function tries to formulate something with "Link-p0" which doesn't exist (should be Link-p).
Reproducible Example
Expected Behavior
see above
Installed Versions
Details
Replace this line.