Closed jmorrisnrel closed 2 months ago
This was because I forgot transmission was included in the sum() if I didn't specify a slice without transmission. Applying a slice to just the supply/conversion tech results in a working constraint. I'll be sure to add a global expression for non-transmission techs to our default configs to make configuring constraints like this easier.
What happened?
I've been working on testing v0.7 with some of the features we regularly use and have had some issues trying to recreate certain 0.6 group constraints. I've narrowed the issue down to a specific sum() expression I'm doing in a custom constraint which seems to not calculate correctly. Below is the constraint definition I've been using
flow_max_share
is defined inparameters
in the YAML:The sub expression sum
sum(flow_out[carriers=Power], over=[nodes, timesteps, techs])
is the one that doesn't seem to calculate correctly. If I add a techs slice to the expression and specify a tech the constraint seems to calculate correctly, and manually entering a value instead of the sum also works, but specifying a sum with just the carrier slice seems to fail. The constraint doesn't have an effect no matter what comparison operator I use and produces the same result (which isn't the result that equals would produce).Adding a tech slice like this works:
Which operating systems have you used?
Version
v0.7.0-dev
Relevant log output
No response