chore: update
This commit is contained in:
parent
4776edc9db
commit
416d97c513
25 changed files with 1653 additions and 283 deletions
18
exm/ballc/ball.zls
Normal file
18
exm/ballc/ball.zls
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
let g = 9.81
|
||||
let p0 = 5.0
|
||||
let v0 = 0.0
|
||||
|
||||
let hybrid ball () = (p, z) where
|
||||
rec der p = v init p0 reset z -> 0.0
|
||||
and der v = -. g init v0 reset z -> -0.8 *. (last v)
|
||||
and z = up (-. p)
|
||||
|
||||
let hybrid main () =
|
||||
let der t = 1.0 init 0.0 in
|
||||
let rec der p = 1.0 init -0.01 reset q -> -0.01
|
||||
and q = up (last p) in
|
||||
let (b, z) = ball () in
|
||||
present q | z -> (
|
||||
print_float t; print_string "\t";
|
||||
print_float b; print_newline ()
|
||||
); ()
|
||||
16
exm/ballc/dune
Normal file
16
exm/ballc/dune
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(env
|
||||
(dev
|
||||
(flags
|
||||
(:standard -w -a))))
|
||||
|
||||
(rule
|
||||
(targets ball.ml main.ml ball.zci)
|
||||
(deps
|
||||
(:zl ball.zls))
|
||||
(action
|
||||
(run zeluc -s main %{zl})))
|
||||
|
||||
(executable
|
||||
(public_name ballc.exe)
|
||||
(name main)
|
||||
(libraries hsim))
|
||||
10
exm/ballc/ztypes.ml
Normal file
10
exm/ballc/ztypes.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
include Hsim
|
||||
include Ztypes
|
||||
|
||||
module type IGNORE = sig end
|
||||
module Defaultsolver : IGNORE = struct end
|
||||
|
||||
module Zlsrun = struct
|
||||
module Make (S : IGNORE) = Runtime
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue