A tester which provides initial tests for MultiStageStochasticBlock,
the SMS++ Block that aggregates one TwoStageStochasticBlock per
outer-stage scenario and ties the first-stage variables across them with
an outer set of non-anticipativity constraints, as well as for quite a
lot of the mechanics of the "core" SMS++ library.
This executable, given the filename of a netCDF file containing the
description of a MultiStageStochasticBlock, solves its deterministic
equivalent (the extensive form of the whole multi-stage scenario tree)
with a :MILPSolver, comparing the result against an optional reference
objective value passed on the command line. The running time is printed.
The relative tolerance for the comparison is fixed at 1e-5.
The usage of the executable is the following:
./MSSB_test MSSB-file [BSC-file ws ref]
BSC-file: BlockSolverConfig description [BSPar-MS.txt]
ws: 0 = LagrangianDualSolver, 1 = reserved [0]
ref: reference objective value to compare against [none]
The inner Block of each TwoStageStochasticBlock can be any SMS++ Block:
the tester is problem-agnostic. The instances shipped under batches/
happen to embed a UCBlock (for energy-community-type applications), but
nothing in the executable assumes a specific inner Block type.
For the instances produced by csv2nc4.jl --multistage, the multi-stage
extensive form coincides with the flattened TwoStageStochasticBlock
one, so the reference objective values under batches/batch-ec are
exactly those of the corresponding TSSB_EC_* instances of
tests/TwoStageStochasticBlock.
A makefile is also provided that builds the executable including the
MultiStageStochasticBlock, TwoStageStochasticBlock,
LagrangianDualSolver, BundleSolver, MILPSolver modules and the core
SMS++ library, together with the inner-Block module needed by the
instances in batches/ (currently UCBlock).
BSPar-MS.txt— outerBlockSolverConfigregistering a:MILPSolver(defaultGRBMILPSolver) on the deterministic equivalent.MILPCfg.txt—ComputeConfigof the:MILPSolver(continuous relaxation, used to match theEnergyCommunity.jllinear reference).InnerBCfg.txt— "meta"-BlockConfigmapping each inner-Block classname (ThermalUnitBlock,DCNetworkBlock, ...) to its ownBlockConfig(TUBCfg.txt,DCNBCfg.txt,ACBCfg.txt,PFBCfg.txt), applied recursively over the whole Block tree.
-
Antonio Frangioni
Dipartimento di Informatica
Università di Pisa -
Donato Meoli
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.