Package: energiapy
energiapyenergiapy is a tool for the multiscale modeling and optimization of energy systems. energiapy uses a resource task
network (RTN) based approach to formulate mathematical programs as pyomo instances. Models can be solved using solvers,
and the results can be analyzed within the energiapy framework.
Constituent functionalities have been built over the research conducted by
theMultiparameteric Optimization and Control (Pistikopoulos) Group.Installationenergiapy can be installed using the standard pip installation. It is recommended to install the package in a separate
conda or pip environment.Create and activate a conda environmentconda create --name energiaenv python=3.10
conda activate energiaenvOr, create and activate a pip environmentpython3.10 -m venv energiaenv
.\energiaenv\Scripts\activateInstall energiapypip install energiapyenergiapy is being developed as a PhD project, and is hence frequently updated. For the most updated (sometimes
unstable) version usepip install git+https://github.com/TAMUparametric/energiapyKey ApplicationsDesign of future energy systems (network design)Scheduling under uncertaintyLife-cycle and environmental impact assessmentTechno-economic analysisSystem resiliency and reliability characterizationModels can also simultaneously assuage the above under an integrated paradigm.Modeling ApproachModel components are declared as energiapy objects. The suggested hierarchy is as follows:TemporalScale:The multiple temporal scales being consideredResource:Resources can be in any quantifiable form such mass, energy, informationMaterial:Infrastructural materials are required for establishing tasks, and require resources if producedProcess:Tasks/processes are set up by utilizing materials, and convert resources from on form to the other.Location:Locations are essentially a set of process. Capacity, cost, and demand variability can also be
introduced.Transport:Modes of transportation translocate resources. Materials usage can also be provided.Network:Networks connect locations using transport linkages. The distance and transport availability matrices
need to be provided.Scenario:single location (using Location) or multi-location (using Network) scenarios can be generated at
appropriate scales.Scenarios can then be formulated as a pyomo instance with the formulate function by using a set of constraints, setting
an objective, providing demand targets, etc. Sets and variables are defined implicitly. Bespoke constraints can be added
using the pyomo syntax. The solve functionality using appropriate solvers provides a solution (Result), which can be
exported, analyzed, or itself used to initialize models.Select FeaturesAvailable constraints are able to model:network design (using binaries)resource flowsinventory balancecostingemission (using global warming potential)land usemode based production (multiple resource inputs, nonlinear behavior modeling using piece-wise linear curves)transportationfailure ratesA model can be optimized towards:minimizing costminimizing emissionmaximizing resource dischargeLarge scenarios can be aggregated using the following available techniques:agglomerative hierarchial clustering (AHC)dynamic time warping (DTW)Both the input data and solution output can be plotted with energiapy's own plot module:input data: capacity, demand, cost factorssolution output: inventory, production, consumption, discharge/sales schedule; contribution towards costs (capital,
variable and fixed operational), meeting demand.Other (and optional) features include:math utilities for calculating euclidean distances, generation connectivity matrices, etc.generating dataframes with missing data fixed (weekends, public holidays) for time-series data such as resource pricefunction to fetch weather data at an appropriate resolution fromNREL NSRDBfor any county
in the USlatex constraints writer for model documentationDirect any communication to Rahul Kakodkar (cacodcar@tamu.edu)