ehub_model¶
Provides a class for encapsulating an energy hub model.
-
class
energy_hub.ehub_model.
EHubModel
(*, excel=None, request=None, big_m=99999, max_carbon=None)[source]¶ Represents a black-box Energy Hub.
-
constraints
¶ The list of constraints on the model.
-
energy_balance
(t, stream)[source]¶ Ensure the loads and exported energy is below the produced energy.
Parameters: - t – A time step
- stream – An output stream
-
objective
¶ The objective “function” of the model.
-
solve
(solver_settings: dict = None, is_verbose: bool = False)[source]¶ Solve the model.
Parameters: - solver_settings – The config options for the solver
- is_verbose – Makes it so the solver prints everything
Returns: The results
-
storage_balance
(t, storage)[source]¶ Calculate the current storage level from the previous level.
Parameters: - t – A time step
- storage – A storage
-
storage_charge_rate
(t, storage)[source]¶ Ensure the charge rate of a storage is below it’s maximum rate.
Parameters: - t – A time step
- storage – A storage
-
storage_discharge_rate
(t, storage)[source]¶ Ensure the discharge rate of a storage is below it’s maximum rate.
Parameters: - t – A time step
- storage – A storage
-
storage_is_installed
(storage)[source]¶ Set binary to 1 if capacity of storage is > 0. :param storage: A storage
-
storage_is_installed_2
(storage)[source]¶ Set binary to 1 if capacity of storage is > 0. :param storage: A storage
-
storage_level_above_minimum
(t, storage)[source]¶ Ensure the storage level is above it’s minimum level.
Parameters: - t – A time step
- storage – A storage
-
storage_level_below_capacity
(t, storage)[source]¶ Ensure the storage’s level is below the storage’s capacity.
Parameters: - t – A time step
- storage – A storage
-
storage_looping
(storage)[source]¶ Ensure that the storage level at the beginning is equal to it’s end level.
-
tech_input_below_capacity
(t, tech)[source]¶ Ensure the energy input by a tech is less than its capacity.
Parameters: - t – A time step
- tech – A converter
-
tech_is_installed
(tech)[source]¶ Set binary to 1 if capacity of tech is > 0. :param tech: A converter
-
tech_is_installed_2
(tech)[source]¶ Set binary to 1 if capacity of tech is > 0. :param tech: A converter
-
tech_is_on
(t, disp, out)[source]¶ Set binary to on if tech is active.
Parameters: - t – A time step
- disp – A dispatch tech
- out – An output energy stream
-