@@ -321,9 +321,10 @@ mutable struct SimulationModel{FloatType,TimeType}
321321
322322 timeName:: String
323323 w_invariant_names:: Vector{String}
324+ hideResult_names:: Vector{String} # Names of hidden variables
324325 vEliminated:: Vector{Int}
325326 vProperty:: Vector{Int}
326- var_name:: Function
327+ var_name:: Function
327328 result:: Union{Result,Missing} # Result data structure upto current time instant
328329
329330 parameters:: OrderedDict{Symbol,Any} # Parameters as provided to SimulationModel constructor
@@ -354,7 +355,7 @@ mutable struct SimulationModel{FloatType,TimeType}
354355
355356 function SimulationModel {FloatType,TimeType} (modelModule, modelName, buildDict, getDerivatives!, equationInfo,
356357 previousVars, preVars, holdVars,
357- parameterDefinition, timeName, w_invariant_names;
358+ parameterDefinition, timeName, w_invariant_names, hideResult_names ;
358359 unitless:: Bool = true ,
359360 nz:: Int = 0 ,
360361 nAfter:: Int = 0 ,
@@ -416,7 +417,7 @@ mutable struct SimulationModel{FloatType,TimeType}
416417 hold, hold_names, hold_dict,
417418 isInitial, solve_leq, true , storeResult, convert (TimeType, 0 ), nGetDerivatives, nf,
418419 odeIntegrator, daeCopyInfo, algorithmName, sundials, addEventPointsDueToDEBug, success, unitless,
419- string (timeName), w_invariant_names, vEliminated, vProperty, var_name, result,
420+ string (timeName), w_invariant_names, hideResult_names, vEliminated, vProperty, var_name, result,
420421 parameters, equationInfo)
421422 end
422423
@@ -486,7 +487,9 @@ timeType(m::SimulationModel{FloatType,TimeType}) where {FloatType,TimeType} = Ti
486487
487488# The following rule is important that simulation is efficient.
488489# See, https://github.com/SciML/DiffEqBase.jl/issues/791
489- DiffEqBase. anyeltypedual (:: SimulationModel ) = Any
490+ if Base. isdefined (DiffEqBase, :anyeltypedual )
491+ DiffEqBase. anyeltypedual (:: SimulationModel ) = Any
492+ end
490493
491494positive (m:: SimulationModel , args... ; kwargs... ) = Modia. positive! (m. eventHandler, args... ; kwargs... )
492495negative (m:: SimulationModel , args... ; kwargs... ) = Modia. negative! (m. eventHandler, args... ; kwargs... )
0 commit comments