Budget_Add_Constraint creates a Budget Constraint in the optimization model of the form:
where B and S are respectively the set of initially protected and unprotected parcels, and
C is the budget limit.
A vector of strings: the name of the parcels appearing in the constraint. The package will automatically differentiate protected from unprotected parcels.
A vector of doubles: the respective coefficients of the parcels in
A double: defining the budget limit (right-hand-side)
A binary parameter: if
the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv)
When used for the first time,
Budget_Add_Constraint or Budget_Import_Constraint will create a list named
Budget in the environment.
Whenever a new budget constraint is added, a new member will be added to the list
Each member of the list
Budget represents a budget constraint.
Each budget constraint is stored as a list with three members:
Parcels storing the names of the parcels in the constraint,
Coefficients storing the respective coefficients of the parcels, and
Limit storing the budget limit (right-hand-side).
In other words, the information of the
i'th Budget constraint in
Budget can be accessed by:
Removing a budget: Budget
i can be removed using the following code:
Removing all budget constraints: All budget constraints can be removed using the following code:
NULL (creates some variables in the environment but returns nothing)
Other Budget Constraints:
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.