275275- `modelName::String`: Name of the model
276276- `getDerivatives::Function`: Function that is used to evaluate the model equations,
277277 typically generated with [`Modia.generate_getDerivatives!`].
278- - `equationInfo::ModiaBase .EquationInfo`: Information about the states and the equations.
278+ - `equationInfo::Modia .EquationInfo`: Information about the states and the equations.
279279- `x_startValues`:: Deprecated (is no longer used).
280280- `parameters`: A hierarchical NamedTuple of (key, value) pairs defining the parameter and init/start values.
281281- variableNames: A vector of variable names. A name can be a Symbol or a String.
@@ -289,8 +289,8 @@ mutable struct SimulationModel{FloatType,TimeType}
289289 cpuLast:: UInt64 # Last time from time_ns()
290290 options:: SimulationOptions{FloatType,TimeType}
291291 getDerivatives!:: Function
292- equationInfo:: ModiaBase .EquationInfo
293- linearEquations:: Vector{ModiaBase .LinearEquations{FloatType}}
292+ equationInfo:: Modia .EquationInfo
293+ linearEquations:: Vector{Modia .LinearEquations{FloatType}}
294294 eventHandler:: EventHandler{FloatType,TimeType}
295295 vSolvedWithInitValuesAndUnit:: OrderedDict{String,Any} # Dictionary of (names, init values with units) for all explicitly solved variables with init-values defined
296296
@@ -419,9 +419,9 @@ mutable struct SimulationModel{FloatType,TimeType}
419419 x_vec = [zeros (FloatType, equationInfo. x_info[i]. length) for i in equationInfo. nxFixedLength+ 1 : length (equationInfo. x_info)]
420420
421421 # Construct data structure for linear equations
422- linearEquations = ModiaBase . LinearEquations{FloatType}[]
422+ linearEquations = Modia . LinearEquations{FloatType}[]
423423 for leq in equationInfo. linearEquations
424- push! (linearEquations, ModiaBase . LinearEquations {FloatType} (leq... ))
424+ push! (linearEquations, Modia . LinearEquations {FloatType} (leq... ))
425425 end
426426
427427 # Initialize execution flags
@@ -447,9 +447,9 @@ mutable struct SimulationModel{FloatType,TimeType}
447447
448448 function SimulationModel {FloatType,TimeType} (m:: SimulationModel ) where {FloatType,TimeType}
449449 # Construct data structure for linear equations
450- linearEquations = ModiaBase . LinearEquations{FloatType}[]
450+ linearEquations = Modia . LinearEquations{FloatType}[]
451451 for leq in m. equationInfo. linearEquations
452- push! (linearEquations, ModiaBase . LinearEquations {FloatType} (leq... ))
452+ push! (linearEquations, Modia . LinearEquations {FloatType} (leq... ))
453453 end
454454
455455 # Initialize execution flags
852852
853853Return the names of the elements of the x-vector in a Vector{String}.
854854"""
855- get_xNames (m:: SimulationModel ) = ModiaBase . get_xNames (m. equationInfo)
855+ get_xNames (m:: SimulationModel ) = Modia . get_xNames (m. equationInfo)
856856
857857
858858
@@ -1512,7 +1512,7 @@ Symbol `functionName` as function name. By `eval(code)` or
15121512
15131513- `AST::Vector{Expr}`: Abstract Syntax Tree of the equations as vector of `Expr`.
15141514
1515- - `equationInfo::ModiaBase .EquationInfo`: Data structure returned by `ModiaBase .getSortedAndSolvedAST
1515+ - `equationInfo::Modia .EquationInfo`: Data structure returned by `Modia .getSortedAndSolvedAST
15161516 holding information about the states.
15171517
15181518- `parameters`: Vector of parameter names (as vector of symbols)
@@ -1528,7 +1528,7 @@ Symbol `functionName` as function name. By `eval(code)` or
15281528
15291529- `hasUnits::Bool`: = true, if variables have units. Note, the units of the state vector are defined in equationinfo.
15301530"""
1531- function generate_getDerivatives! (AST:: Vector{Expr} , equationInfo:: ModiaBase .EquationInfo ,
1531+ function generate_getDerivatives! (AST:: Vector{Expr} , equationInfo:: Modia .EquationInfo ,
15321532 parameters, variables, previousVars, preVars, holdVars, functionName:: Symbol ;
15331533 pre:: Vector{Symbol} = Symbol[], hasUnits= false )
15341534
@@ -1540,7 +1540,7 @@ function generate_getDerivatives!(AST::Vector{Expr}, equationInfo::ModiaBase.Equ
15401540
15411541 if length (x_info) == 1 && x_info[1 ]. x_name == " _dummy_x" && x_info[1 ]. der_x_name == " der(_dummy_x)"
15421542 # Explicitly solved pure algebraic variables. Introduce dummy equation
1543- push! (code_der_x, :( ModiaBase . appendVariable! (_m. der_x, - _x[1 ]) ))
1543+ push! (code_der_x, :( Modia . appendVariable! (_m. der_x, - _x[1 ]) ))
15441544 else
15451545 i1 = 1
15461546 for i in 1 : equationInfo. nxFixedLength
@@ -1562,10 +1562,10 @@ function generate_getDerivatives!(AST::Vector{Expr}, equationInfo::ModiaBase.Equ
15621562 i2 = i1 + xe. length - 1
15631563 v_length = xe. length
15641564 if ! hasUnits || xe. unit == " "
1565- push! (code_x, :( $ x_name:: ModiaBase .SVector{$v_length,_FloatType} = ModiaBase . SVector {$v_length,_FloatType} (_x[$ i1: $ i2])) )
1565+ push! (code_x, :( $ x_name:: Modia .SVector{$v_length,_FloatType} = Modia . SVector {$v_length,_FloatType} (_x[$ i1: $ i2])) )
15661566 else
15671567 x_unit = xe. unit
1568- push! (code_x, :( $ x_name = ModiaBase . SVector {$v_length,_FloatType} (_x[$ i1: $ i2]):: ModiaBase .SVector{$v_length,_FloatType}* @u_str ($ x_unit)) )
1568+ push! (code_x, :( $ x_name = Modia . SVector {$v_length,_FloatType} (_x[$ i1: $ i2]):: Modia .SVector{$v_length,_FloatType}* @u_str ($ x_unit)) )
15691569 end
15701570 i1 = i2 + 1
15711571 end
@@ -1588,9 +1588,9 @@ function generate_getDerivatives!(AST::Vector{Expr}, equationInfo::ModiaBase.Equ
15881588 for xe in equationInfo. x_info
15891589 der_x_name = xe. der_x_name_julia
15901590 if hasUnits
1591- push! (code_der_x, :( ModiaBase . appendVariable! (_m. der_x, Modia. stripUnit ( $ der_x_name )) ))
1591+ push! (code_der_x, :( Modia . appendVariable! (_m. der_x, Modia. stripUnit ( $ der_x_name )) ))
15921592 else
1593- push! (code_der_x, :( ModiaBase . appendVariable! (_m. der_x, $ der_x_name) ))
1593+ push! (code_der_x, :( Modia . appendVariable! (_m. der_x, $ der_x_name) ))
15941594 end
15951595 end
15961596 end
@@ -1654,7 +1654,7 @@ function generate_getDerivatives!(AST::Vector{Expr}, equationInfo::ModiaBase.Equ
16541654 $ (code_pre... )
16551655
16561656 if _m. storeResult
1657- ModiaBase . TimerOutputs. @timeit _m. timer " Modia addToResult!" begin
1657+ Modia . TimerOutputs. @timeit _m. timer " Modia addToResult!" begin
16581658 $ (code_copy... )
16591659 Modia. addToResult! (_m, $ (variables... ))
16601660 end
0 commit comments