rpsg_restore_ps: Replace parameters with their values in PSG Problem Statement

Description Usage Arguments Value Author(s) References Examples

View source: R/rpsg_restore_ps.R

Description

Replace parameters with their values in PSG Problem Statement

Usage

1

Arguments

input

list with data for optimization problem. List members:

input$problem_statement

character with PSG Problem Statement;

input$parameter_<name>

value of PSG functions parameter;

input$coefficient_<name>

value of the coefficient before PSG function in objective or constraint;

input$bound_<name>

value of the bound in Constraint or Box of Variables sections of PSG Problem Statement;

input$solver_<name>

character with name of optimization solver: VAN, CAR, BULDOZER, TANK;

input$precision_<name>

number of digits that solver tries to obtain in objective;

input$stages_<name>

number of stages of the optimization process;

input$timelimit_<name>

time in seconds restricting the duration of the optimization process;

input$linearize_<name>

number 0 or 1, controls internal representation of risk function;

input$mip_<name>

number that specifies the linearization of PSG functions and using MIP capabilities of Gurobi. Active only in VANGRB, CARGRB or HELI solvers (based on Gurobi optimization solvers and are available only if Gurobi is installed);

Value

output list with results:

output$problem_statement

character with PSG Problem Statement with values of all input parameters;

output$...

all inputs without parameters;

Author(s)

Stan Uryasev [aut, cre, cph], Grigoriy Zrazhevsky [aut], Viktor Kuzmenko [aut], Alex Zrazhevsky [aut]

Maintainer: Stan Uryasev <stan.uryasev@aorda.com>

References

American Optimal Decisions
Portfolio Safeguard Help

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Define PSG Problem Statement:
problem_list<-list()
problem_list$problem_statement <- sprintf(
 "minimize
 cvar_risk(parameter_alpha,matrix_scenarios)
Constraint: >= bound_avg
 avg_g(matrix_scenarios)
Constraint: == bound_lin
 linear(matrix_budget)
Box: >= point_lowerbounds
Solver: solver_van")

#Define parameters:
problem_list$parameter_alpha <-0.95
problem_list$bound_avg <-4.5
problem_list$bound_lin <-1
problem_list$solver_van <-"VAN"

#Convert PSG Problem Statement:

problem_list_new <- rpsg_restore_ps(problem_list)

cat(problem_list_new$problem_statement)

PSGExpress documentation built on July 26, 2019, 5:02 p.m.