Description Usage Arguments Value See Also Examples

View source: R/First_Objective.R

`First_Objective_Create`

creates the problem's first objective function.

It creates a list named `First_Objective`

, where `First_Objective[["Coefficients"]]`

stores the coefficients of parcels
and `First_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 input and will automatically store parcels in `First_Objective[["Coefficients"]]`

sorted with the same order they were stored in `Parcels`

.

**Note:** The coefficients of the parcels not appearing in the input `Parcels`

will be equal to zero.

1 2 | ```
First_Objective_Create(Parcels, Coefficients, Sense= "Min",
Silence=FALSE, Env= .GlobalEnv)
``` |

`Parcels` |
A vector of strings: the name of the parcels appearing in the objective |

`Coefficients` |
A vector of doubles: the respective coefficients of the parcels in |

`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) |

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

Other First Objective:
`First_Objective_Import()`

,
`Optimize_First_Objective()`

Other Objective Creators:
`Risk_Objective_Create()`

,
`Second_Objective_Create()`

1 2 3 4 5 6 7 8 9 | ```
## Not run:
First_Objective_Create(Parcels = c("Parcel_1","Parcel_2","Parcel_3"),
Coefficients = c(1,5,10),Sense = "Max")
## Creates {Maximize: Parcel_1 + 5*Parcel_2 + 10*Parcel_3} ##
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.