Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in docs and new data checks #644

Merged
merged 12 commits into from
Aug 16, 2024
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Francesco Lombardi, Politecnico di Milano <[email protected]>
Adriaan Hilbers, Imperial College London <[email protected]>
Jann Launer, TU Delft <[email protected]>
Ivan Ruiz Manuel, TU Delft <[email protected]>
Stefan Strömer, AIT Austrian Institute of Technology GmbH and TU Delft <[email protected]>
4 changes: 2 additions & 2 deletions src/calliope/config/model_data_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fail:
- where: carrier_export and not any(carrier_out, over=nodes)
message: "Export carriers must be one of the technology outflow carriers."

- where: storage_initial>1
message: "storage_initial is a fraction; values larger than 1 are not allowed."
- where: storage_initial<0 OR storage_initial>1
message: "storage_initial is a fraction, requiring values within the interval [0, 1]."

- where: integer_dispatch=True AND NOT cap_method=integer
message: Cannot use the integer `integer_dispatch` unless the technology is using an integer unit capacities (`cap_method=integer`).
Expand Down
10 changes: 5 additions & 5 deletions src/calliope/config/model_def_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ properties:
x-type: str
title: Sink unit
description: >-
Sets the unit of `Sink` to either `absolute` x-unit: energy), `per_area` x-unit: energy/area), or `per_cap` x-unit: energy/power).
Sets the unit of `Sink` to either `absolute` (unit: `energy`), `per_area` (unit: `energy/area`), or `per_cap` (unit: `energy/power`).
`per_area` uses the `area_use` decision variable to scale the sink while `per_cap` uses the `flow_cap` decision variable.
enum: [absolute, per_area, per_cap]

Expand All @@ -687,7 +687,7 @@ properties:
title: Minimum bound on sink.
description: >-
Minimum sink use to remove a carrier from the system (e.g., electricity demand, transport distance).
Unit dictated by `source_unit`.
Unit dictated by `sink_unit`.

sink_use_max:
$ref: "#/$defs/TechParamNullNumber"
Expand All @@ -697,7 +697,7 @@ properties:
title: Maximum bound on sink.
description: >-
Maximum sink use to remove a carrier from the system (e.g., electricity demand, transport distance).
Unit dictated by `source_unit`.
Unit dictated by `sink_unit`.

sink_use_equals:
$ref: "#/$defs/TechParamNullNumber"
Expand All @@ -707,7 +707,7 @@ properties:
title: Required sink use.
description: >-
Required amount of carrier removal from the system (e.g., electricity demand, transport distance).
Unit dictated by `source_unit`.
Unit dictated by `sink_unit`.

source_unit:
type: string
Expand All @@ -716,7 +716,7 @@ properties:
x-type: str
title: Source unit
description: >-
Sets the unit of `Source` to either `absolute` (e.g. kWh), `per_area` (e.g. kWh/m2), or `per_cap` (e.g. kWh/kW).
Sets the unit of `Source` to either `absolute` (unit: `energy`), `per_area` (unit: `energy/area`), or `per_cap` (unit: `energy/power`).
`per_area` uses the `area_use` decision variable to scale the source while `per_cap` uses the `flow_cap` decision variable.
enum: [absolute, per_area, per_cap]

Expand Down
4 changes: 3 additions & 1 deletion tests/test_backend_pyomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,9 @@ def test_storage_initial_fractional_value(self):

with pytest.raises(exceptions.ModelError) as error:
m.build()
assert check_error_or_warning(error, "values larger than 1 are not allowed")
assert check_error_or_warning(
error, "requiring values within the interval [0, 1]"
)


class TestNewBackend:
Expand Down