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.
Usage
simulation(flows_matrix, dist_matrix, beta_offset = 0.25)
Arguments
- 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.
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.
Examples
data(flows_test)
data(distance_test)
model <- simulation(flows_test,distance_test)