extract_facility_selected: Extract Selected Facilities

Description Usage Arguments Value Examples

View source: R/extractors.R

Description

This takes the linear programming solution, the A matrix, and the proposed facilities. It returns a tibble, which contains the facilities chosen from the proposed facilities.

Usage

1
extract_facility_selected(solution_vector, A_mat, proposed_facilities)

Arguments

solution_vector

vector from lp_solution$solution

A_mat

The "A" matrix from the solver

proposed_facilities

Dataframe of proposed facilities

Value

dataframe of selected facilities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# assuming that you've run max_coverage using lpSolve, then you
# will save the model output before the extraction process
# as `x`.
## Not run: 
mc_facilities_selected <- extract_facility_selected(
  solution_vector = x$lp_solution$solution,
  A_mat = x$A,
  proposed_facilities = x$proposed_facility)
  
## End(Not run)

njtierney/copertura documentation built on Nov. 13, 2019, 6:37 p.m.