# Initialize with phase wise initial areas
init_areas <- c(1000, 400, 250, 125, 125, 100)
state_vars <- pine_thinning_from_above_1 |> setup_statevars(init_areas)
state_vars
# Initialize with subphase wise initial areas
# Assume, we are afforesting 1000 ha, so all area has to be initially in
# the first subphase of the first stand development phase
n_sub <- sum(pine_thinning_from_above_1$growth_and_yield$n_subphases)
init_areas <- rep(0, n_sub)
init_areas[1] <- 1000
state_vars <- setup_statevars(pine_thinning_from_above_1,
init_areas,
detailed = TRUE)
state_vars
Run the code above in your browser using DataLab