SPDPS
is a Julia project providing the code for the PhD thesis A Stochastic Primal-Dual Proximal Splitting Method for Risk-Averse Optimal Control of PDEs by Sebastian Angerhausen, submitted in 2022 to the Faculty of Mathematics, University of Duisburg-Essen.
In order to use the project, you can follow the steps explained here. You basically need to
- download the code, start the Julia REPL and
cd
to the project directory, - enter the package manager by pressing
]
, - activate the project by executing the command
activate .
, - for the first time use: instantiate the project by executing the command
instantiate
, - exit the package manager by pressing backspace,
- load the project by executing
using SPDPS
.
Note that, in order to use the plotting features, you need to have Python installed together with the library matplotlib
. For further help, see the installation instructions of PyPlot.jl.
You can then solve one of the two exemplary problems presented in the aforementioned PhD thesis by executing
run_test("EEDC")
for the elliptic equation with a discontinuous coefficient (see Section 6.3), and
run_test("SBE")
for the steady Burgers’ equation (see Section 6.4). The method run_test
moreover takes the following keyword arguments:
N
: number of grid pointsS
: number of scenariosβ
: probability level of CVaRrisk_neutral
: determines whether to compute a risk-neutral control or nottol
: tolerance for the stopping criterionstep_size
: step size rule (either "constant" or "acc" for acceleration)σ
: initial dual step sizeγ
: acceleration parameterit_acc
: number of iterations with accelerationCGF_rule
: determines the index selection rule (1 or 2), 0 for no CGFq
: parameter for the index selectionuse_Bk
: determines whether to use the index set Bₖ or notmaxit
: maximum number of iterationsit_out
: defines after how many iterations the output is printedplot
: determines whether to display plots or notcsv
: determines whether to create csv-files or notfolder
: name of the folder for output filestol_newton
: tolerance for Newton's method (only for SBE)maxit_newton
: maximum number of iterations for Newton's method (only for SBE)
The parameters N
, S
, β
, tol
, and q
can be provided as arrays in order to compute solutions for all parameter combinations in a row.
If csv
is true
(which is the default value), then the results are automatically saved to csv-files that are located within a folder (with the name specified in folder
) of the current working directory.