View source: R/Second_Objective.R
Second_Objective_Import | R Documentation |
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
.
Second_Objective_Import(Address, Sheet = "Second_Objective", Sense= "Min",
Silence = FALSE, Env= .GlobalEnv)
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 |
Env |
the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv) |
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.
NULL (creates some variables in the environment but returns nothing)
Other Second Objective:
Optimize_Second_Objective()
,
Second_Objective_Create()
Other Import Functions:
First_Objective_Import()
,
Import_data()
,
Parcels_Import()
,
Risk_Objective_Import()
## Not run:
Second_Objective_Import("C:\\example.xlsx", Sheet = "Second_Objective", Sense= "Min")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.