You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm having an issue when connecting an ideal diode in my circuit. When I connect the diode in Modia, I get an error about the number of equations and unknowns/states. Without the diode, the simulation runs and the voltage and current sensors for both Matlab and Modia agree quite well. I am translating a circuit from Matlab/Simscape to Modia.
The number of equations and the number of unknowns/states does not match.
Number of equations: 130
Number of variables: 146
Number of continuous states: 17
Note: Number of equations - Number of variables + Number of continuous states must be zero.
It might be that 1 states must be defined to be non-states
(note, Modia does not yet support automatic state selection).
error(::String, ::String, ::Int64, ::String, ::Int64, ::String, ::Int64, ::String, ::String) at error.jl:42
macro expansion at show.jl:555 [inlined]
analyzeStructurally(::Array{Any,1}, ::OrderedCollections.OrderedDict{Symbol,Any}, ::Dict{Symbol,Int64}, ::Array{Any,1}, ::Array{Symbol,1}, ::Array{Int64,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Int64, ::Array{Any,1}, ::typeof(Modia.StructuralTransform.findIncidence!), ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::OrderedCollections.OrderedDict{Symbol,Any}, ::Bool) at BasicStructuralTransform.jl:1015
transformStructurally(::Modia.Instantiation.Instance) at StructuralTransform.jl:845
elaborateModel(::Modia.Instantiation.Instance) at ModelElaboration.jl:120
#simulateModelWithOptions#7(::Base.Iterators.Pairs{Symbol,Real,NTuple{4,Symbol},NamedTuple{(:logTiming, :logTranslation, :removeSingularities, :relTol),Tuple{Bool,Bool,Bool,Float64}}}, ::Function, ::Modia.Instantiation.Model, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}) at ModelElaboration.jl:347
#simulateModelWithOptions at none:0 [inlined]
#simulateModel#8 at ModelElaboration.jl:421 [inlined]
#simulateModel at none:0 [inlined]
SimulateHeartModel(::Float64, ::Float64) at ModiaDE.jl:186
top-level scope at none:0
The text was updated successfully, but these errors were encountered:
I'm trying to use IdealDiode and IdealDiode2 from the link above. The Matlab circuit uses a piece-wise linear diode.
When I try using IdealDiode, I get the above error.
When I try using IdealDiode2 I get an UndefVarError: IdealDiode2.s not defined.
Hi, I'm having an issue when connecting an ideal diode in my circuit. When I connect the diode in Modia, I get an error about the number of equations and unknowns/states. Without the diode, the simulation runs and the voltage and current sensors for both Matlab and Modia agree quite well. I am translating a circuit from Matlab/Simscape to Modia.
The number of equations and the number of unknowns/states does not match.
Number of equations: 130
Number of variables: 146
Number of continuous states: 17
Note: Number of equations - Number of variables + Number of continuous states must be zero.
It might be that 1 states must be defined to be non-states
(note, Modia does not yet support automatic state selection).
error(::String, ::String, ::Int64, ::String, ::Int64, ::String, ::Int64, ::String, ::String) at error.jl:42
macro expansion at show.jl:555 [inlined]
analyzeStructurally(::Array{Any,1}, ::OrderedCollections.OrderedDict{Symbol,Any}, ::Dict{Symbol,Int64}, ::Array{Any,1}, ::Array{Symbol,1}, ::Array{Int64,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Int64, ::Array{Any,1}, ::typeof(Modia.StructuralTransform.findIncidence!), ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::OrderedCollections.OrderedDict{Symbol,Any}, ::Bool) at BasicStructuralTransform.jl:1015
transformStructurally(::Modia.Instantiation.Instance) at StructuralTransform.jl:845
elaborateModel(::Modia.Instantiation.Instance) at ModelElaboration.jl:120
#simulateModelWithOptions#7(::Base.Iterators.Pairs{Symbol,Real,NTuple{4,Symbol},NamedTuple{(:logTiming, :logTranslation, :removeSingularities, :relTol),Tuple{Bool,Bool,Bool,Float64}}}, ::Function, ::Modia.Instantiation.Model, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}) at ModelElaboration.jl:347
#simulateModelWithOptions at none:0 [inlined]
#simulateModel#8 at ModelElaboration.jl:421 [inlined]
#simulateModel at none:0 [inlined]
SimulateHeartModel(::Float64, ::Float64) at ModiaDE.jl:186
top-level scope at none:0
The text was updated successfully, but these errors were encountered: