Skip to content

Commit

Permalink
Progress on #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Apr 16, 2022
1 parent 84cdecf commit c6b63ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions vignettes/si.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,25 @@ head(od_sim, 2)

Note that the output has duplicate columns: `si_to_od()` joins data from the origin and destination objects into the resulting OD object.

# Running an unconstrained SIM

A simplistic SIM can be created just based on the distance between points:

```{r unconstrained1}
si_power = function(od, beta) {
(od[["distance_euclidean"]] / 1000)^beta
}
od_model = si_model(od_sim, fun = si_power, beta = -0.8)
plot(od_model["res"], logz = TRUE)
```

This approach, ignoring all variables at the level of trip origins and destinations, results in flow estimates with no units.
Before learning how to run constrained SIMs in the next section, let's add estimates of each zone's population to the model:

```{r}
# Todo
```



# References

0 comments on commit c6b63ce

Please sign in to comment.