Risk_Objective_Create: Create Risk Objective

Description Usage Arguments Value See Also Examples

View source: R/Risk_Objective.R

Description

Risk_Objective_Create creates the problem's Risk objective function. It creates a list named Risk_Objective, where Risk_Objective[["Sigma"]] stores the the sigmas of parcels, and
Risk_Objective[["Correlation"]] stores the the Correlation of parcels.
This function is not sensitive to the order the parcels are stored in the sheet and will automatically store parcels sorted with the same order they were stored in Parcels.

Usage

1
2
Risk_Objective_Create(Parcels, Sigma, Correlation,
                             Silence=FALSE, Env= .GlobalEnv)

Arguments

Parcels

A vector of strings: the name of the parcels appearing in the objective

Sigma

A vector of doubles: the respective sigmas of the parcels in Parcels.

Correlation

A matrix of doubles: a symmetric matrix with diogonal elements equal to one. The element in i'th row and j'th column is the correlation between the i and j member of Parcels.

Silence

A binary parameter: if FALSE, the function will report a summary message. If TRUE, the function will be silent. (Default: FALSE)

Env

the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv)

Value

NULL (creates some variables in the environment but returns nothing)

See Also

Other Risk Objective: Risk_Objective_Import()

Other Objective Creators: First_Objective_Create(), Second_Objective_Create()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

Risk_Objective_Create(Parcels = c("Parcel_1","Parcel_2","Parcel_3"),
                      Sigma = c(1,2,3),
                     Correlation = cbind(c(1,0.5,-0.7),c(0.5,1,0.2),c(-0.7,0.2,1)))

## Correlation matrix in this example is
 | +1.0 | +0.5 | -0.7 |
 | +0.5 | +1.0 | +0.2 |
 | -0.7 | +0.2 | +1.0 | ##

## End(Not run)

paymanghasemi/SiteOpt documentation built on April 8, 2021, 3:44 a.m.