Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

New Apt-Stable Fails to Linearize Aircraft Model

New Apt-Stable Fails to Linearize Aircraft Model

Recently the svn revision of the stable version was bumped from 12318 to 12630. The new revision fails to linearize my aircraft model even after some cleanup of obvious changes (unless I'm missing something). I also tested release/ nightly and neither work. Can stable be restored to previous version or the linearization issues fixed?

Model: (see) https://github.com/arktools/openfdm

Script

Code:


// options
setCommandLineOptions({
"+showErrorMessages",
"+preOptModules=inlineArrayEqn,partitionIndependentBlocks",
"+postOptModules=inlineArrayEqn,constantLinearSystem,removeSimpleEquations,generateSymbolicLinearization",
//"+a",
//"+noSimplify",
"+d=linearization,gendebugsymbols"
});

// this line required the project path to be appended to OPENMODELICALIBRARY
loadModel(Modelica);
loadModel(OpenFDM);
loadModel(test);
getErrorString();


// it is necessary to extract the model form all packages so the "." is not mis-read
system("rm -f linear_AerosondeModel.mo AerosondeModel.*");
loadString("
model AerosondeModel
  extends OpenFDM.Aircraft.Aerosonde.Aircraft;
end AerosondeModel;
");

// get linear model
simulate(AerosondeModel,
    stopTime=0.001,
    numberOfIntervals=1,
    measureTime=true);
//getErrorString();
system("./AerosondeModel -l 0 > log.out");
readFile("log.out");
loadFile("linear_AerosondeModel.mo");
//getErrorString();
list(linear_AerosondeModel);
//getErrorString();

// simulate non-linear model
simulate(AerosondeModel,
    stopTime=1000,
    numberOfIntervals=100000,
    measureTime=true);

plotParametric(p.r_r[1],p.agl);
system("chromium-browser $PWD/AerosondeModel_prof.html &");
//getErrorString();

Output

Code:


{"Error: Internal error BackendDAEOptimize.generateSymbolicJacobian failed", "TRANSLATION", "Error", "63"}
{"Error: Internal error BackendDAEOptimize.createJacobian failed", "TRANSLATION", "Error", "63"}
{"Error: Internal error Generation of LinearModel Matrices failed. Function: BackendDAEOpimize.createLinearModelMatrixes", "TRANSLATION", "Error", "63"}
{"Error: Internal error Optimisation Module generateSymbolicLinearization failed.", "TRANSLATION", "Error", "63"}
Warning If equations not handled propper in findZeroCrossings2
...
{"Error: Internal error createOdeSystem failed for {133:149}", "TRANSLATION", "Error", "63"}
...
{"Error: Internal error ./Compiler/BackEnd/SimCode.mo: function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]", "TRANSLATION", "Error", "63"}
record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 0.001, numberOfIntervals = 1, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'AerosondeModel', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = true, cflags = '', simflags = ''",
    messages = "Simulation failed for model: AerosondeModel
Error: Internal error BackendDAEOptimize.generateSymbolicJacobian failed
Error: Internal error BackendDAEOptimize.createJacobian failed
Error: Internal error Generation of LinearModel Matrices failed. Function: BackendDAEOpimize.createLinearModelMatrixes
Error: Internal error Optimisation Module generateSymbolicLinearization failed.
Error: Internal error createOdeSystem failed for {133:149}
Error: Internal error createEquationsForSystem1 failed
Error: Internal error createOdeSystem failed for {135:154}
Error: Internal error createEquationsForSystem1 failed
Error: Internal error createOdeSystem failed for {136:155}
Error: Internal error createEquationsForSystem1 failed
Error: Internal error createOdeSystem failed for {137:156}
Error: Internal error createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCode.mo: function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
",
    timeFrontend = 0.0,
    timeBackend = 0.0,
    timeSimCode = 0.0,
    timeTemplates = 0.0,
    timeCompile = 0.0,
    timeSimulation = 0.0,
    timeTotal = 0.0
end SimulationResult;

Re: New Apt-Stable Fails to Linearize Aircraft Model

Thanks for the report. I added a ticket here: https://trac.openmodelica.org/OpenModelica/ticket/1779
With a total model creating using setCommandLineOptions("+showAnnotations"); saveTotalSCode("total.mo",AerosondeModel);

There are 0 guests and 0 other users also viewing this topic
You are here: