Second_Objective_Create: Create Second Objective coefficients

View source: R/Second_Objective.R

Second_Objective_CreateR Documentation

Create Second Objective coefficients

Description

Second_Objective_Create creates the problem's Second objective function. It creates a list named Second_Objective, where Second_Objective[["Coefficients"]] stores the the coefficient of parcels and Second_Objective[["Sense"]] is equal to "Min" or "Max" showing if the objective is to be minimized or maximized.
This function is not sensitive to the order the parcels are input and will automatically store parcels in Second_Objective[["Coefficients"]] sorted with the same order they were stored in Parcels. Note: The coefficients of the parcels not appearing in Parcels will be equal to zero.

Usage

Second_Objective_Create(Parcels, Coefficients, Sense= "Min",
                               Silence=FALSE, Env= .GlobalEnv)

Arguments

Parcels

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

Coefficients

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

Sense

A string: "Min" means the objective is to be minimized and "Max" means the objective is to be maximized. (Default: "Min")

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 Second Objective: Optimize_Second_Objective(), Second_Objective_Import()

Other Objective Creators: First_Objective_Create(), Risk_Objective_Create()

Examples

## Not run: 

Second_Objective_Create(Parcels = c("Parcel_1","Parcel_2","Parcel_3"),
                        Coefficients = c(1,5,10),Sense = "Max")

## Creates {Maximize: Parcel_1 + 5*Parcel_2 + 10*Parcel_3} ##

## End(Not run)


paymanghasemi/SiteOpt documentation built on May 18, 2024, 2:06 p.m.