control-toolbox / control-toolbox/CTParser.jl

[Dev] semantic tests during cost parsing

Open
#31 2 comments 0 reactions 1 assignee Claimed by @ocots View on GitHub
internal dev
Dominant language
Julia
Stars
3
Forks
0
Avg merge
4h 22m
Merged PRs (30d)
2

Description

@ocots the semantic test below, currently done in `onepass.jl` during the (syntaxic) pattern matching, should be deferred to `p_lagrange!`. i'm changing it unless you remember why you or me put it here. same thing for other kinds of costs.

NB. no need to make a fix in CTBase, i'm updating it directly in CTParser.onepass

```julia
# lagrange cost
:(∫($e1) → min) => p_lagrange!(p, ocp, e1, :min; log)
:(-∫($e1) → min) => p_lagrange!(p, ocp, :(-$e1), :min; log)
:($e1 * ∫($e2) → min) => if has(e1, p.t)
(return __throw("time $(p.t) must not appear in $e1", p.lnum, p.line))
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.