-
Notifications
You must be signed in to change notification settings - Fork 3
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
Parser: prefix functional primitives #212
Comments
Attention, une fois le julia> using OptimalControl
julia> methods(CTBase.constraint!)
ERROR: UndefVarError: `CTBase` not defined
Stacktrace:
[1] top-level scope
@ REPL[2]:1
julia> methods(OptimalControl.constraint!)
# 1 method for generic function "constraint!" from CTBase:
[1] constraint!(ocp::CTBase.OptimalControlModel{T, V}, type::Symbol; rg, f, lb, ub, label) where {T<:CTBase.TimeDependence, V<:CTBase.VariableDependence}
@ ~/.julia/packages/CTBase/fDnnG/src/model.jl:550
julia> using CTBase
│ Package CTBase not found, but a package named CTBase is available from a registry.
│ Install package?
│ (@v1.10) pkg> add CTBase
└ (y/n/o) [y]: y
Resolving package versions...
Updating `~/.julia/environments/v1.10/Project.toml`
[54762871] + CTBase v0.11.3
No Changes to `~/.julia/environments/v1.10/Manifest.toml`
julia> methods(CTBase.constraint!)
# 1 method for generic function "constraint!" from CTBase:
[1] constraint!(ocp::OptimalControlModel{T, V}, type::Symbol; rg, f, lb, ub, label) where {T<:TimeDependence, V<:VariableDependence}
@ ~/.julia/packages/CTBase/fDnnG/src/model.jl:550
(@v1.10) pkg> rm CTBase
Updating `~/.julia/environments/v1.10/Project.toml`
[54762871] - CTBase v0.11.3
No Changes to `~/.julia/environments/v1.10/Manifest.toml`
(@v1.10) pkg> |
✅ @ocots right. prefix by OptimalControl (functional primitives are exported, until now). |
@ocots second thoughts: what is the good solution here?
Bref. Is it OK to |
This is the problem. I think that it won't work :-( |
@ocots two ways?
NB.
|
For OptimalControl.jl its here: https://github.com/control-toolbox/OptimalControl.jl/blob/main/src%2FOptimalControl.jl#L55 |
To avoid conflicts with other packages (ex. ExaModels), prefix before macro expansion: e.g.
OptimalControl.constraint!(...)
The text was updated successfully, but these errors were encountered: