﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6416	Error in Implementation of the delay function	Guru Charan Das M <gcharandas2@…>	Andreas Heuermann	"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.

{{{
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!"	task	assigned	blocker	1.19.0	Code Generation	1.16.5		DIVISION_SIM, macro, 'equationIndexes' undeclared, Compilation process failed, Code 2	Adrian Pop arunkumar palanisamy
