LADAC
                                
                                
                                
                                    LADAC copied to clipboard
                            
                            
                            
                        Report a bug
Is the file complete?
I run the check_ladac.m, but unfortunately MATLAB errors are reported as following
fuselageUnitTest/fuselageExampleScriptTest and fuselageUnitTest/fuselageLibTest have errors and has not finished running.
正在运行 TestWidth
.
已完成 TestWidth
__________
正在运行 ladacUnitTest
.
已完成 ladacUnitTest
__________
正在运行 actuatorsUnitTest
.
已完成 actuatorsUnitTest
__________
正在运行 airfoilAnalytic0515UnitTest
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum found.
Optimization completed because the size of the gradient is less than
the value of the optimality tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum found.
Optimization completed because the size of the gradient is less than
the value of the optimality tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
.
已完成 airfoilAnalytic0515UnitTest
__________
正在运行 airfoilAnalytic9090UnitTest
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than
the value of the step size tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than
the value of the step size tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
.
已完成 airfoilAnalytic9090UnitTest
__________
正在运行 airfoilAnalyticBlAlUnitTest
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum found.
Optimization completed because the size of the gradient is less than
the value of the optimality tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum found.
Optimization completed because the size of the gradient is less than
the value of the optimality tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to 
its initial value is less than the value of the function tolerance.
<stopping criteria details>
.
已完成 airfoilAnalyticBlAlUnitTest
__________
正在运行 airfoilAnalyticSimpleUnitTest
.
已完成 airfoilAnalyticSimpleUnitTest
__________
正在运行 fuselageUnitTest
================================================================================
fuselageUnitTest/fuselageExampleScriptTest 中出现错误并且未运行完毕。
    --------
    错误 ID:
    --------
    'MATLAB:minrhs'
    -----------
    错误详细信息:
    -----------
    输入参数的数目不足。
    出错 width (第 10 行)
    W = size(X,2);
    出错 fuselageSetParams (第 27 行)
    fuselage.params.width(:) = width;
    出错 fuselageCreate (第 67 行)
    fuselage = fuselageSetParams( fuselage, filename );
    出错 fuselage_example (第 11 行)
    fuselage = fuselageCreate('fuselage_params_default',5,30);
    出错 run (第 91 行)
    evalin('caller', strcat(script, ';'));
    出错 fuselageUnitTest>fuselageExampleScriptTest (第 33 行)
    run('fuselage_example');
================================================================================
.
================================================================================
fuselageUnitTest/fuselageLibTest 中出现错误并且未运行完毕。
    --------
    错误 ID:
    --------
    'MATLAB:minrhs'
    -----------
    错误详细信息:
    -----------
    输入参数的数目不足。
    出错 width (第 10 行)
    W = size(X,2);
    出错 fuselageSetParams (第 27 行)
    fuselage.params.width(:) = width;
    出错 fuselageCreate (第 67 行)
    fuselage = fuselageSetParams( fuselage, filename );
    出错 fuselage_lib_example_init (第 11 行)
    fuselage = fuselageCreate('fuselage_params_default',5,20);
    出错 run (第 91 行)
    evalin('caller', strcat(script, ';'));
    出错 fuselageUnitTest>fuselageLibTest (第 40 行)
    run('fuselage_lib_example_init')
================================================================================
.
已完成 fuselageUnitTest
__________
正在运行 inducedVelocityUnitTest
...
已完成 inducedVelocityUnitTest
__________
正在运行 simpleFuselageUnitTest
.
已完成 simpleFuselageUnitTest
__________
正在运行 batteryUnitTest
.
已完成 batteryUnitTest
__________
正在运行 quatUnitTest
..........
已完成 quatUnitTest
__________
失败摘要:
     Name                                        Failed  Incomplete  原因
    =======================================================================
     fuselageUnitTest/fuselageExampleScriptTest    X         X       出错。
    -----------------------------------------------------------------------
     fuselageUnitTest/fuselageLibTest              X         X       出错。
rt =
  24×6 table
                                      Name                                      Passed    Failed    Incomplete    Duration       Details   
    ________________________________________________________________________    ______    ______    __________    _________    ____________
    {'TestWidth/TestWidth'                                                 }    true      false       false        0.034523    {1×1 struct}
    {'ladacUnitTest/Test_all_library_links_resolved'                       }    true      false       false          18.233    {1×1 struct}
    {'actuatorsUnitTest/actuatorsLibExampleTest'                           }    true      false       false          0.2171    {1×1 struct}
    {'airfoilAnalytic0515UnitTest/airfoilAnalytic0515AlExampleScriptTest'  }    true      false       false          1.6437    {1×1 struct}
    {'airfoilAnalytic9090UnitTest/airfoilAnalytic9090ExampleScriptTest'    }    true      false       false          2.4375    {1×1 struct}
    {'airfoilAnalyticBlAlUnitTest/airfoilAnalyticBlAlExampleScriptTest'    }    true      false       false           2.163    {1×1 struct}
    {'airfoilAnalyticSimpleUnitTest/airfoilAnalyticSimpleExampleScriptTest'}    true      false       false           0.103    {1×1 struct}
    {'fuselageUnitTest/fuselageExampleScriptTest'                          }    false     true        true         0.028166    {1×1 struct}
    {'fuselageUnitTest/fuselageLibTest'                                    }    false     true        true         0.011417    {1×1 struct}
    {'inducedVelocityUnitTest/Test_Vx_Vz_equal_Zero'                       }    true      false       false       0.0039576    {1×1 struct}
    {'inducedVelocityUnitTest/Test_Vertical_Decent_Slow'                   }    true      false       false        0.003024    {1×1 struct}
    {'inducedVelocityUnitTest/Test_Vertical_Decent_Fast'                   }    true      false       false       0.0024349    {1×1 struct}
    {'simpleFuselageUnitTest/fuselageExampleScriptTest'                    }    true      false       false         0.73661    {1×1 struct}
    {'batteryUnitTest/batteryExampleScriptTest'                            }    true      false       false         0.29308    {1×1 struct}
    {'quatUnitTest/Test_quatMultiply'                                      }    true      false       false        0.074671    {1×1 struct}
    {'quatUnitTest/Test_quatConj'                                          }    true      false       false          0.1076    {1×1 struct}
    {'quatUnitTest/Test_quatInv'                                           }    true      false       false         0.10452    {1×1 struct}
    {'quatUnitTest/Test_quatDivide'                                        }    true      false       false        0.079949    {1×1 struct}
    {'quatUnitTest/Test_quatNormalize'                                     }    true      false       false        0.084691    {1×1 struct}
    {'quatUnitTest/Test_quatNorm'                                          }    true      false       false        0.078588    {1×1 struct}
    {'quatUnitTest/Test_quatLog'                                           }    true      false       false        0.079613    {1×1 struct}
    {'quatUnitTest/Test_quatExp'                                           }    true      false       false        0.090167    {1×1 struct}
    {'quatUnitTest/Test_quatIntegration'                                   }    true      false       false        0.031214    {1×1 struct}
    {'quatUnitTest/Test_quatLogDivide'                                     }    true      false       false        0.079631    {1×1 struct}
历时 36.998017 秒。
                                    
                                    
                                    
                                
Hi, thank you very much for the bug report.
I do not experience the problem. I suspect that the error occurs from Matlab version 2020b (I use 2018b).
I suspect that the error occurs because a variable was named like the Matlab function width.
I have changed that in the LADAC main branch.
Could you update LADAC and check if the error has been fixed?
Thanks a lot and best regards.
I'm glad to hear from you, This to me extremely important! But there are still errors
fuselageUnitTest/fuselageLibTest 中出现错误并且未运行完毕。
    --------
    错误 ID:
    --------
    'MATLAB:MException:MultipleErrors'
    -----------
    错误详细信息:
    -----------
    错误使用 fuselage_lib_example_init (第 22 行)
    Error due to multiple causes.
    出错 run (第 91 行)
    evalin('caller', strcat(script, ';'));
    出错 fuselageUnitTest>fuselageLibTest (第 40 行)
    run('fuselage_lib_example_init')
    原因:
        错误使用 fuselage_lib_example_init (第 22 行)
        Simulink cannot determine sizes and/or types of the outputs for block 'fuselage_lib_example/fuselage rigid/Fuselage
        Core1/Fuselage Core' due to errors in the block body, or limitations of the underlying analysis. The errors might be
        inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
    
    
        错误使用 fuselage_lib_example_init (第 22 行)
        Error in port widths or dimensions. '输出端口 1' of 'fuselage_lib_example/fuselage rigid/Fuselage Core1/Fuselage
        Core/atmosphere' is a one dimensional vector with 1 elements.
                                    
                                    
                                    
                                
I suspect that the error comes from the fact that in file fuselage_lib_example instead of the LADAC Atmosphere block the Atmosphere block from the Aerospace Blockset (both are called "ISA Atmosphere Model") is used.
Actually, it should not be a problem that both blocks have the same name, because the Simulink file also stores the origin of the block.
Could you run again the check_ladac function, then open the Simulink model fuselage_lib_example (aerodynamics/fuselage/fuselage_lib_example) and send a screenshot of the model?