aggregate_raw_sim_rslt {care4cmodel}R Documentation

Comprehensively Aggregate Raw Simulation Results

Description

Aggregate and prepare raw simulation output as obtained from sim_area_single_concept_with_risk in a way that makes them readable and appropriate for further processing.

Usage

aggregate_raw_sim_rslt(sim_areas_raw, concept_def)

Arguments

sim_areas_raw

Raw simulation results as obtained from sim_area_single_concept_with_risk

concept_def

The concept definition (a c4c_concept object) used for the simulation which generated sim_areas_raw

Value

A list of three matrices with named columns. Each row of these matrices represents a point in simulation time, but only integer times. The time distance from one row to the next one is one time unit, typically one year. The first column of the matrices is time, the other columns represent the stand development phases as defined in concept_def. The three list elements (matrices) are:

Examples

  # Make a simulation
  state_vars <- setup_statevars(
    pine_thinning_from_above_1, c(1000, 0, 0, 0, 0, 0)
  )
  time_span  <- 50
  parms      <- setup_parms(pine_thinning_from_above_1)
  parms$risk_mat <- setup_risk_events(
    time_span, avg_event_strength = 1, parms$risk
  )

  # Simulate
  sim_rslt_raw <- sim_area_single_concept_with_risk(
    state_vars,
    parms       = parms,
    event_times = c(0:time_span),
    time_span   = time_span
  )

  aggregate_raw_sim_rslt(sim_rslt_raw, pine_thinning_from_above_1)



[Package care4cmodel version 1.0.1 Index]