Commit e53dc99d authored by Benoit Barbot's avatar Benoit Barbot
Browse files

jsonify

parent 5bf546ef
Pipeline #2217 passed with stages
in 2 minutes and 15 seconds
......@@ -176,18 +176,20 @@ struct
( snd
@@ List.nth accl
(min (int_of_float (u1 *. float n)) (n - 1)) ))
|> StringMap.iter (fun _ v ->
match v with
| Some (tr, (low, up, _, time)) ->
let target =
rgpoly.statelist.((List.hd tr.ZoneGraph.miniedge)
.target)
in
fprintf f
"{\"label\":\"%s\",@ \"min_time\": %g,@ \
\"max_time\":%g,@ \"time\":%g,@ \"target\":\"%s\"},@,"
tr.ZoneGraph.action low up time target.name
| None -> ()))
|> (fun m ->
StringMap.fold
(fun _ v acc ->
match v with Some x -> x :: acc | None -> acc)
m [])
|> List.iteri (fun i (tr, (low, up, _, time)) ->
let target =
rgpoly.statelist.((List.hd tr.ZoneGraph.miniedge).target)
in
fprintf f
"%s@ {\"label\":\"%s\",@ \"min_time\": %g,@ \
\"max_time\":%g,@ \"time\":%g,@ \"target\":\"%s\"}"
(if i > 0 then "," else "")
tr.ZoneGraph.action low up time target.name))
rgpoly.ZoneGraph.statelist.(get_loc st).ZoneGraph.transition
| Debug ->
fprintf outfile "@[<h 0>%a@. @[<v 2>@[<v 0>%a@]@]@]@."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment