Skip to content

Profiling fails when cse- and pre-variables are used #55

@cbermperi

Description

@cbermperi

During the profiling of the model 'Modelica_4.0.0/files/Modelica_4.0.0_Modelica.Electrical.Analog.Examples.HeatingNPN_NORGate.err-' , in step 'Find min-max values of used variables' occurs an ArgumentError, that the auxiliary variable $cse1 is not found in the data frame.

A similar error appears for pre-variables, here is an example of the model 'Modelica_4.0.0/files/Modelica_4.0.0_Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SynchronousMachines.SMEE_LoadDump.err-':

julia> (csvFiles, fmu, profilingInfo) = main(modelName, moFiles, workdir="/home/cbermperi/workdir/NonLinearSystemNeuralNetworkFMU.jl", reuseArtifacts=true, N=1)
[ Info: Profile SMEE_LoadDump
[ Info: Slowest eq 806: ncall: 15353, time: 1.859202341, maxTime: 0.001216913 , fraction: 0.17759459928549
[ Info: Find min-max values of used varaibles
ERROR: ArgumentError: column name :$PRE.switch.closerWithArc[3].quenched not found in the data frame
Stacktrace:
 [1] lookupname
   @ ~/.julia/packages/DataFrames/a6np0/src/other/index.jl:392 [inlined]
 [2] getindex
   @ ~/.julia/packages/DataFrames/a6np0/src/other/index.jl:401 [inlined]
 [3] getindex
   @ ~/.julia/packages/DataFrames/a6np0/src/other/index.jl:402 [inlined]
 [4] getindex(df::DataFrames.DataFrame, #unused#::typeof(!), col_ind::String)
   @ DataFrames ~/.julia/packages/DataFrames/a6np0/src/dataframe/dataframe.jl:525
 [5] minMaxValues(resultFile::String, variables::Vector{String}; epsilon::Float64)
   @ NonLinearSystemNeuralNetworkFMU ~/workdir/NonLinearSystemNeuralNetworkFMU.jl/src/profiling.jl:316
 [6] minMaxValues
   @ ~/workdir/NonLinearSystemNeuralNetworkFMU.jl/src/profiling.jl:310 [inlined]
 [7] #minMaxValuesReSim#18
   @ ~/workdir/NonLinearSystemNeuralNetworkFMU.jl/src/profiling.jl:403 [inlined]
 [8] main(modelName::String, moFiles::Vector{String}; workdir::String, reuseArtifacts::Bool, N::Int64)
   @ NonLinearSystemNeuralNetworkFMU ~/workdir/NonLinearSystemNeuralNetworkFMU.jl/src/main.jl:78
 [9] top-level scope
   @ REPL[9]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions