feat: lift runtime into language, start of zelus 2024 compatibility
This commit is contained in:
parent
dc8d941b84
commit
ffc583985a
37 changed files with 1154 additions and 143 deletions
|
|
@ -751,3 +751,20 @@ let hybrid ball () = y where
|
|||
and assert (y >= 0)
|
||||
```
|
||||
Is this an issue?
|
||||
|
||||
= Ideas
|
||||
|
||||
== Continuous assertions with lifted runtime
|
||||
|
||||
Given a synchronous node simulating a hybrid one :
|
||||
```zelus
|
||||
let hybrid sincos () = (sin, cos) where
|
||||
rec der sin = cos init 0.0
|
||||
and der cos = -. sin init 1.0
|
||||
|
||||
let node sincos_sim = Solve.solve_ode45 sincos
|
||||
```
|
||||
We could create a primitive `Solve.assert_continuous` which would take as input
|
||||
an `'a value` and a function `'a -> Solve.cond`, where `Solve.cond` is a
|
||||
zero-crossing expression, for instance `fun v -> Solve.up(-. v)`. This could be
|
||||
passed along to a zero-crossing solver during continuous phases.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue