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

Add Antares historic model library configuration #57

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions src/andromede/libs/antares_historic/antares_historic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# SPDX-License-Identifier: MPL-2.0
#
# This file is part of the Antares project.
library:
id: antares-historic
description: Antares historic model library

port-types:
- id: flow
description: A port which transfers power flow
fields:
- name: flow

models:
- id: area
parameters:
- name: spillage_cost
- name: ens_cost
variables:
- name: spillage
lower-bound: 0
type: float
tbittar marked this conversation as resolved.
Show resolved Hide resolved
- name: unsupplied_energy
lower-bound: 0
type: float
ports:
- name: balance_port
type: flow
binding-constraints:
- name: balance
expression: sum_connections(balance_port.flow) = spillage - unsupplied_energy
objective: expec(sum(spillage_cost * spillage + ens_cost * unsupplied_energy))

- id: load
parameters:
- name: load
ports:
- name: balance_port
type: flow
port-field-definitions:
- port: balance_port
field: flow
definition: -load

- id: link
parameters:
- name: capacity_direct
time-dependent: true
scenario-dependent: true
- name: capacity_indirect
time-dependent: true
scenario-dependent: true
variables:
- name: flow_direct
lower-bound: 0
upper-bound: capacity_direct
- name: flow_indirect
lower-bound: 0
upper-bound: capacity_indirect
- name: flow
lower-bound: -capacity_indirect
upper-bound: capacity_indirect
ports:
- name: out_port
type: flow
- name: in_port
type: flow
port-field-definitions:
- port: out_port
field: flow
definition: flow
- port: in_port
field: flow
definition: -flow
constraints:
- name: flow_direct_indirect
expression: flow = flow_direct - flow_indirect

- id: renewable
parameters:
- name: nominal_capacity
time-dependent: false
scenario-dependent: false
- name: unit_count
time-dependent: false
scenario-dependent: false
- name: generation
time-dependent: true
scenario-dependent: true
ports:
- name: balance_port
type: flow
port-field-definitions:
- port: balance_port
field: flow
definition: generation

- id: thermal_cluster
parameters:
- name: p_min_cluster
tbittar marked this conversation as resolved.
Show resolved Hide resolved
scenario-dependent: false
- name: p_max_cluster # timeseries that takes outages into account
- name: p_min_unit
scenario-dependent: false
- name: p_max_unit
scenario-dependent: false
- name: generation_cost
tbittar marked this conversation as resolved.
Show resolved Hide resolved
scenario-dependent: false
- name: startup_cost
scenario-dependent: false
- name: fixed_cost
scenario-dependent: false
- name: d_min_up
type: integer
scenario-dependent: false
- name: d_min_down
type: integer
scenario-dependent: false
- name: nb_units_min # Equals to ceil(p_min_cluster/p_max_unit), to be done in preprocessing
type: integer
scenario-dependent: false
- name: nb_units_max # Equals to ceil(p_max_cluster/p_max_unit), to be done in preprocessing
type: integer
variables:
- name: generation
lower-bound: p_min_cluster
upper-bound: p_max_cluster
- name: nb_units_on
lower-bound: nb_units_min
upper-bound: nb_units_max
variable-type: integer
- name: nb_starting
lower-bound: 0
upper-bound: nb_units_max
variable-type: integer
- name: nb_stopping
lower-bound: 0
variable-type: integer
- name: nb_failing
lower-bound: 0
ports:
- name: balance_port
type: flow
port-field-definitions:
- port: balance_port
field: flow
definition: generation
constraints:
- name: max_generation
expression: generation <= nb_units_on * p_max_unit
- name: min_generation
expression: generation >= nb_units_on * p_min_unit
- name: on_units_dynamics
expression: nb_units_on = nb_units_on[t-1] + nb_starting - nb_stopping
- name: nb_failing_lower_than_stopping
expression: nb_failing <= nb_stopping
- name: nb_failing_lower_than_max_variation
expression: nb_failing <= max(0, nb_units_max[t-1] - nb_units_max)
- name: min_up_duration
expression: sum(t-d_min_up + 1 .. t, nb_starting - nb_failing) <= nb_units_on
- name: min_down_duration
expression: sum(t-d_min_down + 1 .. t, nb_stopping) <= nb_units_max[t-d_min_down] - nb_units_on + sum(t-d_min_down + 1 .. t, max(0, nb_units_max - nb_units_max[-1]))
objective: expec(sum(generation_cost * generation + startup_cost * nb_starting + fixed_cost * nb_units_on))
Loading