-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug π
The evaluator has no method for BaseModelicaString AST nodes. This occurs when a string value appears in a structural context during model evaluation (e.g., string-typed parameters or modifiers).
Failing models from the MSL:
| Model | BM Parse Log |
|---|---|
Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge |
log |
Modelica.Electrical.Batteries.Examples.SuperCapDischargeCharge |
log |
Modelica.Electrical.Analog.Examples.GenerationOfFMUs |
log |
Expected behavior
Parse the models.
Minimal Reproducible Example π
Without MRE, we would only be able to help you to a limited extent, and attention to the issue would be limited. to know more about MRE refer to wikipedia and stackoverflow.
//! base 0.1.0
package 'StringParameter'
model 'StringParameter'
parameter String 'label' = "my_label" "A string parameter";
Real 'x';
equation
'x' = 1.0;
end 'StringParameter';
end 'StringParameter';julia> parsed_model = BaseModelica.parse_basemodelica("StringParameter.bmo")Error & Stacktrace
ERROR: MethodError: no method matching eval_AST(::BaseModelica.BaseModelicaString)
The function `eval_AST` exists, but no method is defined for this combination of argument types.
Closest candidates are:
eval_AST(::BaseModelica.BaseModelicaModel)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:245
eval_AST(::BaseModelica.BaseModelicaAnnotation)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:81
eval_AST(::BaseModelica.BaseModelicaFunctionArgs)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:404
...
Stacktrace:
[1] eval_AST(model::BaseModelica.BaseModelicaModel)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:301
[2] eval_AST(package::BaseModelica.BaseModelicaPackage)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:401
[3] baseModelica_to_ModelingToolkit
@ ~/.julia/packages/BaseModelica/jc9Ua/src/evaluator.jl:442 [inlined]
[4] parse_basemodelica(filename::String; parser::Symbol)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/BaseModelica.jl:43
[5] parse_basemodelica(filename::String)
@ BaseModelica ~/.julia/packages/BaseModelica/jc9Ua/src/BaseModelica.jl:35
[6] top-level scope
@ REPL[7]:1Environment (please complete the following information):
- Output of
using Pkg; Pkg.status()
- Output of
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
- Output of
versioninfo()
Julia Version 1.12.5
Commit 5fe89b8ddc1 (2026-02-09 16:05 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 28 Γ 13th Gen Intel(R) Core(TM) i7-13850HX
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 28 virtual cores)Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working