Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dev] semantic tests during cost parsing #319

Open
jbcaillau opened this issue Feb 19, 2025 · 0 comments
Open

[Dev] semantic tests during cost parsing #319

jbcaillau opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
internal dev Modification to the code is requested and should not affect user experiment

Comments

@jbcaillau
Copy link
Member

@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

        # 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))
@jbcaillau jbcaillau added the internal dev Modification to the code is requested and should not affect user experiment label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal dev Modification to the code is requested and should not affect user experiment
Projects
None yet
Development

No branches or pull requests

2 participants