Parcels_Create: Create Parcels and their Status

Description Usage Arguments Details Value See Also Examples

View source: R/Parcels_status.R

Description

Parcels_Create manually creates the problem's data. It will create variables named Parcels storing the name of parcels and the order they are used, and Status showing whether parcels are protected or not.
Note: These variables are essential to create the optimization problem. So, if not created, calling other functions will result in an error.

Usage

1
Parcels_Create(Parcels, Status, Silence= FALSE, Env= .GlobalEnv)

Arguments

Parcels

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

Status

A vector of binary: the respective status of the parcels in Parcels. Value 1 means the parcel is protected (owned), and value 0 means the parcel is unprotected (unowned).

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

Parcels should include the name of all parcels appearing in the problem, and Status should include all the parcels' status, where value 1 means the parcel is protected (owned), and value 0 means the parcel is unprotected (unowned). These values are essential in creating optimization variables.

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_Import()

Examples

1
2
3
4
5
6
## Not run: 

Parcels_Create(Parcels=c("Parcel_1","Parcel_2","Parcel_3","Parcel_4","Parcel_5"),
                  Status= c(0,1,0,1,1))

## End(Not run)

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