Second_Objective_Import: Import Second Objective coefficients from Excel file

Description Usage Arguments Details Value See Also Examples

View source: R/Second_Objective.R

Description

Second_Objective_Import imports the problem's second objective coefficients from a sheet in an excel file. 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 stored in the sheet and will automatically store parcels in Second_Objective[["Coefficients"]] sorted with the same order they were stored in Parcels.

Usage

1
2
Second_Objective_Import(Address, Sheet = "Second_Objective", Sense= "Min",
                               Silence = FALSE, Env= .GlobalEnv)

Arguments

Address

A string: the location and name of the excel file.

Sheet

A string: the name of the sheet holding the Second objective's data. (Default: "Second_Objective")

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)

Details

The first row of the sheet will be ignored as captions. The Second column of the sheet should include names, and the second column should include coefficients.
Here is an example Second Objective table:


Note: The coefficients of the parcels not appearing in the excel file will be equal to zero.

Value

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

See Also

Other Second Objective: Optimize_Second_Objective(), Second_Objective_Create()

Other Import Functions: First_Objective_Import(), Import_data(), Parcels_Import(), Risk_Objective_Import()

Examples

1
2
3
4
5
## Not run: 

Second_Objective_Import("C:\\example.xlsx", Sheet = "Second_Objective", Sense= "Min")

## End(Not run)

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