-
Notifications
You must be signed in to change notification settings - Fork 70
/
StorageManagementCost.jl
83 lines (74 loc) · 3.52 KB
/
StorageManagementCost.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#=
This file is auto-generated. Do not edit.
=#
#! format: off
"""
mutable struct StorageManagementCost <: OperationalCost
variable::VariableCost
fixed::Float64
start_up::Float64
shut_down::Float64
energy_shortage_cost::Float64
energy_surplus_cost::Float64
end
Data Structure for Operational Cost Data like variable cost and start - stop costs and energy storage cost.
# Arguments
- `variable::VariableCost`: variable cost
- `fixed::Float64`: fixed cost
- `start_up::Float64`: start-up cost, validation range: `(0, nothing)`, action if invalid: `warn`
- `shut_down::Float64`: shut-down cost, validation range: `(0, nothing)`, action if invalid: `warn`
- `energy_shortage_cost::Float64`: Cost incurred by the model for being short of the energy target., validation range: `(0, nothing)`, action if invalid: `warn`
- `energy_surplus_cost::Float64`: Cost incurred by the model for surplus energy stored., validation range: `(0, nothing)`, action if invalid: `warn`
"""
mutable struct StorageManagementCost <: OperationalCost
"variable cost"
variable::VariableCost
"fixed cost"
fixed::Float64
"start-up cost"
start_up::Float64
"shut-down cost"
shut_down::Float64
"Cost incurred by the model for being short of the energy target."
energy_shortage_cost::Float64
"Cost incurred by the model for surplus energy stored."
energy_surplus_cost::Float64
end
function StorageManagementCost(; variable=VariableCost((0.0, 0.0)), fixed=0.0, start_up=0.0, shut_down=0.0, energy_shortage_cost=0.0, energy_surplus_cost=0.0, )
StorageManagementCost(variable, fixed, start_up, shut_down, energy_shortage_cost, energy_surplus_cost, )
end
# Constructor for demo purposes; non-functional.
function StorageManagementCost(::Nothing)
StorageManagementCost(;
variable=VariableCost((0.0, 0.0)),
fixed=0.0,
start_up=0.0,
shut_down=0.0,
energy_shortage_cost=0.0,
energy_surplus_cost=0.0,
)
end
"""Get [`StorageManagementCost`](@ref) `variable`."""
get_variable(value::StorageManagementCost) = value.variable
"""Get [`StorageManagementCost`](@ref) `fixed`."""
get_fixed(value::StorageManagementCost) = value.fixed
"""Get [`StorageManagementCost`](@ref) `start_up`."""
get_start_up(value::StorageManagementCost) = value.start_up
"""Get [`StorageManagementCost`](@ref) `shut_down`."""
get_shut_down(value::StorageManagementCost) = value.shut_down
"""Get [`StorageManagementCost`](@ref) `energy_shortage_cost`."""
get_energy_shortage_cost(value::StorageManagementCost) = value.energy_shortage_cost
"""Get [`StorageManagementCost`](@ref) `energy_surplus_cost`."""
get_energy_surplus_cost(value::StorageManagementCost) = value.energy_surplus_cost
"""Set [`StorageManagementCost`](@ref) `variable`."""
set_variable!(value::StorageManagementCost, val) = value.variable = val
"""Set [`StorageManagementCost`](@ref) `fixed`."""
set_fixed!(value::StorageManagementCost, val) = value.fixed = val
"""Set [`StorageManagementCost`](@ref) `start_up`."""
set_start_up!(value::StorageManagementCost, val) = value.start_up = val
"""Set [`StorageManagementCost`](@ref) `shut_down`."""
set_shut_down!(value::StorageManagementCost, val) = value.shut_down = val
"""Set [`StorageManagementCost`](@ref) `energy_shortage_cost`."""
set_energy_shortage_cost!(value::StorageManagementCost, val) = value.energy_shortage_cost = val
"""Set [`StorageManagementCost`](@ref) `energy_surplus_cost`."""
set_energy_surplus_cost!(value::StorageManagementCost, val) = value.energy_surplus_cost = val