Solution class

Solution class

Details

Definition for the Solution class.

See also

Public fields

id

character identifier.

name

character name.

project

Project object.

settings

list of Parameter objects.

summary_results

data.frame object.

site_results

data.frame object.

feature_results

data.frame object.

Methods

Public methods


Method new()

Create a Solution object.

Usage

Solution$new(
  id,
  name,
  project,
  settings,
  summary_results,
  site_results,
  feature_results
)

Arguments

id

character identifier.

name

character value.

project

character identifier.

settings

list of Parameter objects.

summary_results

data.frame object.

site_results

data.frame object.

feature_results

data.frame object.

Returns

A new Solution object.

Method new()

Create a Solution object.

Usage

Solution$new(
  id,
  name,
  project,
  settings,
  summary_results,
  site_results,
  feature_results
)

Arguments

id

character identifier.

name

character value.

project

character identifier.

settings

list of Parameter objects.

summary_results

data.frame object.

site_results

data.frame object.

feature_results

data.frame object.

Returns

A new Solution object.


Method print()

Print the object.

Usage

Solution$print(...)

Arguments

...

not used.

Method print()

Print the object.

Usage

Solution$print(...)

Arguments

...

not used.


Method repr()

Generate a character summarizing the representation of the object.

Usage

Solution$repr()

Returns

character value.

Method repr()

Generate a character summarizing the representation of the object.

Usage

Solution$repr()

Returns

character value.


Method get_site_ids()

Get site identifiers.

Usage

Solution$get_site_ids()

Returns

character vector.

Method get_site_ids()

Get site identifiers.

Usage

Solution$get_site_ids()

Returns

character vector.


Method get_feature_ids()

Get feature identifiers.

Usage

Solution$get_feature_ids()

Returns

character vector.

Method get_feature_ids()

Get feature identifiers.

Usage

Solution$get_feature_ids()

Returns

character vector.


Method get_action_ids()

Get action identifiers.

Usage

Solution$get_action_ids()

Returns

character vector.

Method get_action_ids()

Get action identifiers.

Usage

Solution$get_action_ids()

Returns

character vector.


Method get_map_layers()

Get layer names for rendering data on map

Usage

Solution$get_map_layers()

Method get_map_layers()

Get layer names for rendering data on map

Usage

Solution$get_map_layers()


Method get_bbox()

Get the bounding box.

Usage

Solution$get_bbox(expand = FALSE)

Arguments

expand

FALSE should the bounding box be expanded by 10%?

Returns

list object with "xmin", "xmax", "ymin", and "ymax" elements.

Method get_bbox()

Get the bounding box.

Usage

Solution$get_bbox(expand = FALSE)

Arguments

expand

FALSE should the bounding box be expanded by 10%?

Returns

list object with "xmin", "xmax", "ymin", and "ymax" elements.


Method render_on_map()

Render on map.

Usage

Solution$render_on_map(map, data = "location", group = "sites")

Arguments

map

leaflet::leaflet() object.

data

character name of dataset to show. Argument must be a valid layer name (see self$get_map_layers()).

group

character group name. Defaults to "sites".

Returns

leaflet::leaflet() map.

Method render_on_map()

Render on map.

Usage

Solution$render_on_map(map, data = "location", group = "sites")

Arguments

map

leaflet::leaflet() object.

data

character name of dataset to show. Argument must be a valid layer name (see self$get_map_layers()).

group

character group name. Defaults to "sites".

Returns

leaflet::leaflet() map.


Method get_solution_results_data()

Get data for rendering widget to display results.

Usage

Solution$get_solution_results_data()

Method get_solution_results_data()

Get data for rendering widget to display results.

Usage

Solution$get_solution_results_data()


Method render_site_data()

Render site data.

Usage

Solution$render_site_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_site_data()

Render site data.

Usage

Solution$render_site_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_feature_data()

Render feature data.

Usage

Solution$render_feature_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_feature_data()

Render feature data.

Usage

Solution$render_feature_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_feasibility_data()

Render feasibility data.

Usage

Solution$render_feasibility_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_feasibility_data()

Render feasibility data.

Usage

Solution$render_feasibility_data(height = "100%", width = "100%")

Arguments

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_consequence_data()

Render consequence data.

Usage

Solution$render_consequence_data(action_id, height = "100%", width = "100%")

Arguments

action_id

character identifier for action.

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.

Method render_consequence_data()

Render consequence data.

Usage

Solution$render_consequence_data(action_id, height = "100%", width = "100%")

Arguments

action_id

character identifier for action.

height

character/numeric CSS measurement value. Default to "100%".

width

character/numeric CSS measurement value. Default to "100%".

Returns

rhandsontable::rhandsontable object.


Method render_summary_results()

Display summary results data.

Usage

Solution$render_summary_results()

Returns

DT::datatable() object.

Method render_summary_results()

Display summary results data.

Usage

Solution$render_summary_results()

Returns

DT::datatable() object.


Method render_site_results()

Display site results data.

Usage

Solution$render_site_results()

Returns

DT::datatable() object.

Method render_site_results()

Display site results data.

Usage

Solution$render_site_results()

Returns

DT::datatable() object.


Method render_feature_results()

Display feature results data.

Usage

Solution$render_feature_results()

Returns

DT::datatable() object.

Method render_feature_results()

Display feature results data.

Usage

Solution$render_feature_results()

Returns

DT::datatable() object.


Method write()

Write the data to disk.

Usage

Solution$write(workbook_path, geometry_path)

Arguments

workbook_path

character file path.

geometry_path

character file path.

Method write()

Write the data to disk.

Usage

Solution$write(workbook_path, geometry_path)

Arguments

workbook_path

character file path.

geometry_path

character file path.


Method clone()

The objects of this class are cloneable with this method.

Usage

Solution$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Method clone()

The objects of this class are cloneable with this method.

Usage

Solution$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.