Parcels_Import: Import parcel status data from Excel file

Description Usage Arguments Details Value See Also Examples

View source: R/Parcels_status.R

Description

Parcels_Import imports the parcels' data from a sheet in an excel file. It will create some variables in the input Env. The variables are Parcels storing the name of all parcels and the order they are used, and Status storing the status of the parcels.
Note: These variables are essential to create the optimization problem. So, if not created properly, using other functions will result in an error.

Usage

1
Parcels_Import(Address, Sheet= "Parcels", 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 parcels' data. (Default: "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)

Details

In the input excel file, the first row of the sheet will be ignored as captions. The first column of the sheet should include names of parcels, and the second column should include their status. Value 1 means the parcel is already protected (owned), and value 0 means the parcel is not protected (unowned). These values are essential in creating optimization variables.
Here is an example table of a problem with 5 parcels:

Our logo

In the optimization model, protected (owned) and unprotected (unowned) parcels will be represented by the binary decision variables (1-y) and x. In the final solution after optimization, (1-y)=1 means that the parcel which was initially protected (owned) remains protected, and (1-y)=0 means that the parcel is divested (sold).
Similarly, x=1 means that the parcel that was initially unprotected (unowned) will become protected (invested), and x=0 means that the parcel will remain unprotected.
(For more information refer to the Paper)

Value

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

See Also

Other Parcels Status: Parcels_Create()

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

Examples

1
2
3
4
5
## Not run: 

Parcels_Import("example.xlsx",Sheet= "Parcels")

## End(Not run)

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