feat: support for model-requested horizons
This commit is contained in:
parent
685de96eec
commit
ac4e066bf8
24 changed files with 170 additions and 93 deletions
|
|
@ -9,8 +9,7 @@ let hybrid ball (y0, y'0) = (y, y', z) where
|
|||
|
||||
let hybrid main () =
|
||||
let der t = 1.0 init 0.0 in
|
||||
let rec der p = 1.0 init -0.01 reset s -> -0.01
|
||||
and s = up(p) in
|
||||
let s = period(0.01) in
|
||||
let (y, y', z) = ball (y0, y'0) in
|
||||
present z | s -> (
|
||||
print_float t;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
(rule
|
||||
(targets ballz.ml ballz.zci)
|
||||
(targets ballz.ml ballz.zci ballz_main.ml)
|
||||
(deps
|
||||
(:zl ballz.zls))
|
||||
(action
|
||||
(run zeluc %{zl})))
|
||||
(run zeluc -s main -o ballz_main %{zl})))
|
||||
|
|
|
|||
4
exm/zelus/count/count.zls
Normal file
4
exm/zelus/count/count.zls
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
let node count () =
|
||||
let rec n = 0 -> (pre n + 1) in
|
||||
print_int n; print_newline ()
|
||||
6
exm/zelus/count/dune
Normal file
6
exm/zelus/count/dune
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(rule
|
||||
(targets count.ml count.zci)
|
||||
(deps
|
||||
(:zl count.zls))
|
||||
(action
|
||||
(run zeluc %{zl})))
|
||||
|
|
@ -1,4 +1,17 @@
|
|||
|
||||
let hybrid f () = (sin, cos) where
|
||||
let hybrid g () = (sin, cos) where
|
||||
rec der sin = cos init 0.0
|
||||
and der cos = -. sin init 1.0
|
||||
|
||||
let hybrid f () =
|
||||
let der t = 1.0 init 0.0 in
|
||||
let sin, cos = g () in
|
||||
let z = period (0.01) in
|
||||
present z -> (
|
||||
print_float t;
|
||||
print_string "\t";
|
||||
print_float sin;
|
||||
print_string "\t";
|
||||
print_float cos;
|
||||
print_newline ()
|
||||
); ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue