Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration vignette #124

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: odin2
Title: Next generation odin
Version: 0.3.6
Version: 0.3.7
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "rich.fitzjohn@gmail.com"),
person("Wes", "Hinsley", role = "aut"),
Expand Down
4 changes: 2 additions & 2 deletions vignettes/functions.Rmd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: "odin functions"
title: "Supported Functions"
author: "Rich FitzJohn"
date: "`r Sys.Date()`"
output:
rmarkdown::html_vignette:
toc: true
vignette: >
%\VignetteIndexEntry{odin functions}
%\VignetteIndexEntry{Supported functions}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down
12 changes: 5 additions & 7 deletions vignettes/migrating.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,17 @@ Some of these features were present in versions of `odin.dust` and many derive f

## Planned

* Optional array bounds checking, both during compilation and during runtime (in the latter case with a performance penalty once enabled).
* Optional array bounds checking, during runtime (in the latter case with a performance penalty once enabled).

## Hoped

* Support for multinomial samples and other vector-valued functions

# Missing features

This list is incomplete, and we'll expand it as we work through the tests. We're not currently quite at MVP stage yet, so expect that most things don't work!

Things we do plan on implementing:

* Delay differential equations, e.g. `y_lag <- delay(y, tau)` (`mrc-5434`)
* Complete delay differential equations (currently delayed *variables* are supported but not fully delayed expressions)
* Compile-time parameter substitution (`mrc-5575`)
* Compilation to JavaScript
* Compilation to GPU
Expand All @@ -59,13 +57,13 @@ Things that we plan to drop in this version

* Many details in `config()` and `options`

Note that many errors are not caught as odin errors, and invalid odin code will be accepted and generate C++ code that fails to compile.
Note that some errors are still not caught as odin errors, and invalid odin code will be accepted and generate C++ code that fails to compile. Please send us code that causes this to happen.

# Changes in syntax

## `user()` becomes `parameter()`

This might be the largest user-visible change, and we'll add a translation system for this.
This might be the largest user-visible change, and can be automatically migrated.

Previously, to support parameters you might write

Expand Down Expand Up @@ -200,7 +198,7 @@ to have some quantity that took different values every `freq` steps, where `freq
a <- if (time * dt / m == 0) b else c
```

## The name of the time variable in discrete time models has changed
## The name of the time variable in continuous time models has changed

Previously, time was `t` but we have moved this to `time` to be a little more explicit. We can automatically migrate your code in many cases, unless you have defined a variable `time` already.

Expand Down