- Index
- » Programming
- » Modelica Language
- » Error in Implementation of the delay...
Error in Implementation of the delay function
Error in Implementation of the delay function
Greetings!
I hope you're having a nice day! So please hear me out. I am relatively an advanced beginner in OpenModelica and I am currently working on a project for my thesis. I need to use the delay function in my code for a Real variable. However, while the function works perfectly on one of the variables I need delayed, there are multiple variables that I need delayed. When I implement this for multiple variables with the same time delay constant, I get an error. If you could help me interpret and resolve this error, it would be greatly helpful.
Code:
error: 'equationIndexes' undeclared (first use in this function)
#define DIVISION_SIM(a,b,msg,equation) (__OMC_DIV_SIM(threadData, a, b, msg, equationIndexes, data->simulationInfo->noThrowDivZero, data->localData[0]->timeValue, initial()))
note: in expansion of macro 'DIVISION_SIM'
storeDelayedExpression(data, threadData, 1, DIVISION_SIM(data->simulationInfo->realParameter[42] /* k4 PARAM */,data->localData[0]->realVars[67] /* v variable */,"v",equationIndexes), data->localData[0]->timeValue, data->simulationInfo->realParameter[78] /* tDelay PARAM */, data->simulationInfo->realParameter[78] /* tDelay PARAM */);
note: each undeclared identifier is reported only once for each function it appears in
#define DIVISION_SIM(a,b,msg,equation) (__OMC_DIV_SIM(threadData, a, b, msg, equationIndexes, data->simulationInfo->noThrowDivZero, data->localData[0]->timeValue, initial()))
note: in expansion of macro 'DIVISION_SIM'
storeDelayedExpression(data, threadData, 1, DIVISION_SIM(data->simulationInfo->realParameter[42] /* k4 PARAM */,data->localData[0]->realVars[67] /* v variable */,"v",equationIndexes), data->localData[0]->timeValue, data->simulationInfo->realParameter[78] /* tDelay PARAM */, data->simulationInfo->realParameter[78] /* tDelay PARAM */);
Compilation process failed. Exited with code 2.
I'd be thankful for any help! Thanks in advance!
Re: Error in Implementation of the delay function
That looks like a pretty clear bug, please open a ticket on our bug tracker. If you can, please include a model that can be used to replicate the issue too.
- perost
- 114 Posts
Re: Error in Implementation of the delay function
Thank you so much for the immediate response! I have already opened a ticket there already and have posted the issue here as well. This is the link : https://trac.openmodelica.org/OpenModelica/ticket/6416
- Index
- » Programming
- » Modelica Language
- » Error in Implementation of the delay...