library(PSGExpress) #library(PSG) # Set your path to Rdata file including the RData file's name with CS: load("C:/Aorda/PSG/problem_1.RData") #your path # Run PSG Solver to optimize problem stored in problem.list results <- rpsg_solver(problem.list) # Convert PSG output to list with numeric values: output.list <- rpsg_getsolution(results) print(output.list) # Create user subroutine for solving this problem. # Set the main information about the new function: description <- list() description$path_to_save <- "C:/Aorda/PSG/" # your path description$function_name <- "problem_1" # problem's name description$function_description <- "CVaR risk minimization function" # any text rpsg_create_subroutine(problem.list, description) # Three files are stored in the folder : # 1. .R = user defined R function # 2. _example.R = example for .R function call # 3. .RData = RData-file with data for _example.R call. # Note! _example.R includes load and source from folder defined in . # Note! .RData includes data from current case study. # For details about inputs of .R see header of _example.R