View source: R/workflow_rcpp.R
| simulation | R Documentation |
this script takes flows data, distance matrix, and a reference beta parameter and finds the optimal beta value for the model, runs it, and returns the result and the beta of best fit.
currently only the exp value is accepted for the cost_fun parameter.
simulation(flows_matrix, dist_matrix, beta_offset = 0.25)
flows_matrix |
a integer matrix of flows |
dist_matrix |
a distance matrix containing numeric values in kilometers |
beta_offset |
an offset from 0 from which to start looking for the best fit value. |
creates a folder based on the run_name parameter to which images and files are written. The file run_name_best_fit.rds contain the matrices with values from the model , and the quality of fit values for the beta values.
data(flows_test)
data(distance_test)
model <- simulation(flows_test,distance_test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.