﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3223	Check error when using ComplexBlocks.Sources.ComplexConstant	Christian Kral <dr.christian.kral@…>	somebody	"I used an instance of {{{ComplexBlocks.Sources.ComplexConstant}}} in an example (see attachment) and changed the constant {{{k}}} to {{{Complex(1,0)}}}. When I check the model a couple errors occur:

{{{
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)1 DAE.PROP(Integer, C_CONST), value: 1}  and  = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)0 DAE.PROP(Integer, C_CONST), value: 0}  and  = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)1 DAE.PROP(Integer, C_CONST), value: 1}  and  = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.
Error: Duplicate modification of element  {start  = (typed)0 DAE.PROP(Integer, C_CONST), value: 0}  and  = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.
}}}

When I simulate the model, I get the same errors again:

{{{
[1] 16:29:29 Translation Error
Duplicate modification of element {start = (typed)0 DAE.PROP(Integer, C_CONST), value: 0} and = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.

[2] 16:29:29 Translation Error
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo: 2056:11-2056:79]: Variable const.k: Duplicate modification of element {start = (typed)1 DAE.PROP(Integer, C_CONST), value: 1} and = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.

[3] 16:29:29 Translation Error
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo: 2056:11-2056:79]: Variable const.k: Duplicate modification of element {start = (typed)0 DAE.PROP(Integer, C_CONST), value: 0} and = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.
}}}

However, the simulation works OK with no obvious problems. "	defect	closed	high	never	*unknown*	trunk	duplicate		
