InvestmentBlock is designed to model the investment in different assets
defined in UCBlock, like generating units and transmission lines.
The InvestmentBlock class, which derives from Block, has a vector of
ColVariable, each of which represents the investment in a particular asset.
The number of ColVariable is thus the number of assets that are subject to
investment. The Objective of the InvestmentBlock is an FRealObjective
whose Function is a InvestmentFunction. The active Variable of this
InvestmentFunction are the ones defined in this InvestmentBlock.
The InvestmentBlock can have explicit BoxConstraint on the ColVariable,
and "implicit" linear constraints can be generated by the InvestmentFunction
itself (as "vertical linearizations").
An InvestmentFunction is a C05Function that is capable of evaluating the
investment on a set of assets. InvestmentFunction derives from both
C05Function and Block. The main ingredients of an InvestmentFunction are
the following:
-
The active
ColVariableof theInvestmentFunctionrepresent investments that can be made in certain assets. An asset can be one of the following: aThermalUnitBlock, anIntermittentUnitBlock, aBatteryUnitBlock, or a transmission line in aDCNetworkBlock. The meaning of an investment depends on the type of asset it is associated with.-
Investing an amount x in a
ThermalUnitBlockmeans that the unit is scaled (seeThermalUnitBlock::scale()) by x. -
For
BatteryUnitBlockandIntermittentUnitBlock, two types of investments can be made. Considering an investment of an amount x, the unit may either be scaled by x (according toUnitBlock::scale()) or have its minimum and maximum power and storage levels scaled by x usingset_kappa(). -
Investing an amount x in a transmission line means that its minimum and maximum power flow are scaled by x using
set_kappa().
-
-
The value of the
InvestmentFunctionis given by a fixed investment cost (CAPEX) and an [expected] operational cost (OPEX). The fixed investment cost is a linear function of theColVariableof theInvestmentFunction. The [expected] operational cost is given by the solution value of the innerBlock(which depends on the investment being made, i.e., the values of the variables of theInvestmentFunction). -
The
InvestmentFunctionhas an innerBlockwhich contains the assets to invest in. This innerBlockcan be either aUCBlockor anSDDPBlock. In the former case the OPEX is deterministic. In the latter case it is the expected cost of the sub-Blockof theSDDPBlock, some of which (the ones where the investments take place) must themselves beUCBlock. Note that the same amount of investment in the assets is made for all the stages of theSDDPBlock.
These instructions will let you build InvestmentBlock on your system.
-
The SMS++ core library and its requirements.
Configure and build the library with:
mkdir build
cd build
cmake ..
cmake --build .The library has the same configuration options of SMS++.
Optionally, install the library in the system with:
cmake --install .After the library is built, you can use it in your CMake project with:
find_package(InvestmentBlock)
target_link_libraries(<my_target> SMS++::InvestmentBlock)Carefully hand-crafted makefiles have also been developed for those unwilling to use CMake. Makefiles build the executable in-source (in the same directory tree where the code is) as opposed to out-of-source (in the copy of the directory tree constructed in the build/ folder) and therefore it is more convenient when having to recompile often, such as when developing/debugging a new module, as opposed to the compile-and-forget usage envisioned by CMake.
Each executable using InvestmentBlock has to include a "main makefile" of
the module, which typically is either makefile-c including all
necessary libraries comprising the "core SMS++" one, or
makefile-s including all necessary libraries but not the "core
SMS++" one (for the common case in which this is used together with other
modules that already include them). One relevant case is the
InvestmentBlock main in the tools/ repo. The makefiles
in turn recursively include all the required other makefiles, hence one should
only need to edit the "main makefile" for compilation type (C++ compiler and
its options) and it all should be good to go. In case some of the external
libraries are not at their default location, it should only be necessary to
create the ../extlib/makefile-paths out of the
extlib/makefile-default-paths-* for your OS * and edit the relevant bits
(commenting out all the rest).
Check the SMS++ installation wiki for further details.
We provide some data sets that are used, among other things, by some of the testers of the test repo. Since they are large they are not included in the repo. They are automatically downloaded by CMake if the test repo is included, but if you are not using CMake to build the system you need to do it by hand, via
cd data
wget https://gitlab.com/api/v4/projects/45125867/packages/generic/nc4/latest/nc4.tgz
tar xzvf nc4.tgzThis builds the data/nc4 folder with the InvestmentBlock
instances (such as the resilient-data set) used by the tests.
If you need support, you want to submit bugs or propose a new feature, you can open a new issue.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting merge requests to us.
- Rafael Durbano Lobato
Dipartimento di Informatica
Università di Pisa
- Antonio Frangioni
Dipartimento di Informatica
Università di Pisa
This code is provided free of charge under the GNU Lesser General Public License version 3.0 - see the LICENSE file for details.
The code is currently provided free of charge under an open-source license. As such, it is provided "as is", without any explicit or implicit warranty that it will properly behave or it will suit your needs. The Authors of the code cannot be considered liable, either directly or indirectly, for any damage or loss that anybody could suffer for having used it. More details about the non-warranty attached to this code are available in the license description file.