I am having some troubles with a the hybridization of an engine.
I have found a code used in Dynamic Programming which I unseccesfully tried to implement in ACADO tool for Matlab.
The source code used 2D and 1D maps and equations of this form:
A = 5;
B = (A>=0)x1+(A<0)x2;
For maps I used the curve fitting tool offered by Matlab and approximated them through polynoms and exponentials.
For the equations of the above form I used a properly parametrized atan function like: ((atan(A1000)2/pi) * ...
Now the error I have is the following:
"Writing c++ files...
Compiling c++ files...
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
ACADO Toolkit for Matlab - Developed by David Ariens and Rien Quirynen, 2009-2013
Support available at http://www.acadotoolkit.org/matlab
[ACADO] Error: A user-defined option has an invalid value
Code: (RET_INVALID_OPTION) "
Would it be possible that ACADO "does not like" so many atan functions? Is there a better way to define different equations beong used depending on the value of some parameters?
You should look more carefully at your problem definition:
you have 17 equations in total in your DAE even though you
have 1 differential state and 15 algebraic variables, i.e., 16
variables in total. This DAE cannot be of index 1 which is a
requirement for the ACADO code generation tool.
Best,
Rien
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your answer. You are obviously right: there was a problem of redundancy of an algebraic state. However, I just created a new one and corrected that error but still encounter the same error message.
Could you please help me once again?
It seems to work know. I was using the same equation's layout of the pendulum example applied to simulink. Strange it doesn't work. Anywhere, thank you once again.
Best,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for disturbing you again, but after having compiled everything, once the simulation starts in simulink, Matlab just crashes down reporting a "critical issue". I have tried ti on different computers with different matlab versions but is always giving the same result. Do you know what could this possibily be?
Hello ACADO users,
I am having some troubles with a the hybridization of an engine.
I have found a code used in Dynamic Programming which I unseccesfully tried to implement in ACADO tool for Matlab.
The source code used 2D and 1D maps and equations of this form:
A = 5;
B = (A>=0)x1+(A<0)x2;
For maps I used the curve fitting tool offered by Matlab and approximated them through polynoms and exponentials.
For the equations of the above form I used a properly parametrized atan function like: ((atan(A1000)2/pi) * ...
Now the error I have is the following:
"Writing c++ files...
Compiling c++ files...
Building with 'Microsoft Visual C++ 2017'.
MEX completed successfully.
ACADO Toolkit for Matlab - Developed by David Ariens and Rien Quirynen, 2009-2013
Support available at http://www.acadotoolkit.org/matlab
[ACADO] Error: A user-defined option has an invalid value
Code: (RET_INVALID_OPTION) "
Would it be possible that ACADO "does not like" so many atan functions? Is there a better way to define different equations beong used depending on the value of some parameters?
Thank you in advance for your help.
Last edit: Pandar 2018-08-13
Hi,
You should look more carefully at your problem definition:
you have 17 equations in total in your DAE even though you
have 1 differential state and 15 algebraic variables, i.e., 16
variables in total. This DAE cannot be of index 1 which is a
requirement for the ACADO code generation tool.
Best,
Rien
Hi Rien,
Thank you for your answer. You are obviously right: there was a problem of redundancy of an algebraic state. However, I just created a new one and corrected that error but still encounter the same error message.
Could you please help me once again?
You should probably define your implicit system of differential-alglebraic equations as follows, similar to the other Matlab examples:
Hi Rien,
It seems to work know. I was using the same equation's layout of the pendulum example applied to simulink. Strange it doesn't work. Anywhere, thank you once again.
Best,
Hi Rien,
Sorry for disturbing you again, but after having compiled everything, once the simulation starts in simulink, Matlab just crashes down reporting a "critical issue". I have tried ti on different computers with different matlab versions but is always giving the same result. Do you know what could this possibily be?
Thank you,
Last edit: Pandar 2018-08-15