Skip to content

Commit 1e55f38

Browse files
committed
minor test corrections; completed all dynamics (and error instead of warning if not defined / incomplete)
1 parent f396de6 commit 1e55f38

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/onepass.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# - currently "t ∈ [ 0+0, 1 ], time" is allowed, and compels to declare "x(0+0) == ..."
1212
# - exa: generated function forbids to use kwarg names (grid_size...) in expressions; could either (i) replace such names in the user code (e.g. prefixing by a gensym...), but not so readable; (ii) throw an explicit error ("grid_size etc. are reserved names")
1313
# - exa: x = ExaModels.variable($p_ocp, $n / 1:$n...) ?
14-
# - exa: what about expressons with x(t), not indexed but used as a scalar? should be x[:, ...] in ExaModels? does it occur (sum(x(t)...))
14+
# - exa: what about expressions with x(t), not indexed but used as a scalar? should be x[:, ...] in ExaModels? does it occur (sum(x(t)...))
1515

1616
# Defaults
1717

@@ -990,7 +990,7 @@ function def_exa(e, log=false)
990990
p_ocp = gensym() # ExaModel name (this is the pre OCP, here)
991991
p = ParsingInfo()
992992
code = parse!(p, p_ocp, e; log = log)
993-
dyn_check = quote # debug: error, not just warning (then update all tests...)
993+
dyn_check = quote
994994
!isempty($(p.dyn_coords)) || throw($e_pref.ParsingError("dynamics not defined"))
995995
sort($(p.dyn_coords)) == 1:$(p.dim_x) || throw($e_pref.ParsingError("some coordinates of dynamics undefined"))
996996
end

src/utils.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# utils
2+
# todo: check todo's in source
23

34
"""
45
$(TYPEDSIGNATURES)
@@ -136,7 +137,7 @@ julia> subs4(e, :xf, :xf, 1)
136137
:(v[1:2:d] * (2 * xf[1]))
137138
```
138139
"""
139-
function subs4(e, x, y, i) # debug: remove since unused (check)
140+
function subs4(e, x, y, i) # todo: remove since unused (check)
140141
foo(x, y, i) = (h, args...) -> begin
141142
f = Expr(h, args...)
142143
@match f begin

0 commit comments

Comments
 (0)