Skip to content
Snippets Groups Projects
README.md 949 B
Newer Older
Martin Lange's avatar
Martin Lange committed
# Literate NetLogo

This is an example project to demonstrate Literate Programming to create [NetLogo](https://ccl.northwestern.edu/netlogo/) models from ODD+C protocols. 

Martin Lange's avatar
Martin Lange committed
## Rabies model - ODD protocol

### Purpose



### Entities, state variables, and scales

### Process overview and scheduling
Martin Lange's avatar
Martin Lange committed

```netlogo
Martin Lange's avatar
Martin Lange committed
;- file:Code.nls
; ==> Setup.
; ==> Go.
```

```netlogo
;- Go
to go
  tick
end
```

Martin Lange's avatar
Martin Lange committed
### Design concepts
Martin Lange's avatar
Martin Lange committed
### Initialization
Martin Lange's avatar
Martin Lange committed
;- Setup
to setup
  reset-ticks
end
Martin Lange's avatar
Martin Lange committed
### Input data

### Submodels

## Appendix

### NetLogo file

In the main `nlogo` file, we only "include" an `nls` file to allow for the reverse mode.
The file `Model.nlogo` is simply copied from the `nlogo` directory via option `code_files` in the `[paths]` section of the `Yarner.toml`.

This separation of model code and user interface also allows to edit the model's UI elements in NetLogo's GUI builder tool, while using Literate Programming for the code.