[X] I am running on an up-to-date pypsa-usa environment. Update via conda env update -f envs/environment.yaml
The Issue
Error thrown when using the Eq0.2c constraint that requires 0.2 % of generation to be produced within a given country/region.
Steps To Reproduce
No response
Expected Behavior
No response
Error Message
scripts/tmp_5aijmfg.solve_network.py", line 598, in extra_functionality
add_EQ_constraints(n, o)
File "/home/groups/iazevedo/kamran/pypsa-usa/workflow/.snakemake/shadow/tmpp_za9rkr/.snakemake/scripts/tmp_5aijmfg.solve_network.py", line 322, in add_EQ_constraints
n.model.add_constraints(lhs >= rhs, name="equity_min")
^^^^^^^^^^
File "/home/groups/iazevedo/miniforge3/envs/pypsa-usa/lib/python3.11/site-packages/linopy/expressions.py", line 483, in __ge__
return self.to_constraint(GREATER_EQUAL, rhs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/groups/iazevedo/miniforge3/envs/pypsa-usa/lib/python3.11/site-packages/linopy/expressions.py", line 846, in to_constraint
all_to_lhs = (self - rhs).data
~~~~~^~~~~
File "/home/groups/iazevedo/miniforge3/envs/pypsa-usa/lib/python3.11/site-packages/linopy/expressions.py", line 414, in __sub__
other = as_expression(
^^^^^^^^^^^^^^
File "/home/groups/iazevedo/miniforge3/envs/pypsa-usa/lib/python3.11/site-packages/linopy/expressions.py", line 1367, in as_expression
raise ValueError("Cannot convert to LinearExpression") from e
ValueError: Cannot convert to LinearExpression
Checklist
master
branchpypsa-usa
environment. Update viaconda env update -f envs/environment.yaml
The Issue
Error thrown when using the Eq0.2c constraint that requires 0.2 % of generation to be produced within a given country/region.
Steps To Reproduce
No response
Expected Behavior
No response
Error Message
Anything else?
No response