calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
276 stars 89 forks source link

.inf not parsed correctly in math syntax #613

Closed FLomb closed 1 week ago

FLomb commented 1 week ago

What happened?

If using .inf in the math syntax in yaml files (e.g., - expression: sum(cost, over=[nodes, techs]) <= .inf), this is apparently not correctly parsed. It appears as None in the backend.

Which operating systems have you used?

Version

v0.7.0dev3

Relevant log output

No response

brynpickering commented 1 week ago

Yes, pyomo considers .inf as there being no upper bound. We might pass it .inf but it stores it as None. If there was a problem with parsing, the parser would complain. This shouldn't be an issue when solving the model as it's pyomo's decision to store it as None and it handles sending it to the solver just fine (in your case, it just wouldn't send it at all - it's a constraint that isn't constraining anything).

FLomb commented 1 week ago

I see, ok, then maybe we can consider the issue closed?