﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4429	Builtin function cardinality is not implemented in Ceval.cevalBuiltinHandler	Patrick Täuber	Adrian Pop	"


This leads to problems, e.g. if the binding of a structural parameter contains cardinality.

To reproduce such a case please use the ThermoSysPro model `ThermoSysPro.Examples.SimpleExamples.TestCentrifugalPump5.mo`.

In the current version of the library there is a workaround, so please remove `annotation(Evaluate=true)` for
{{{#!mo
parameter Boolean dyn_mech_equation=((cardinality(M) <> 0) and dynamic_mech_equation);
}}}
in `ThermoSysPro.WaterSteam.Machines.CentrifugalPump.mo`.

Since the structural parameter `centrifugalPump.dyn_mech_equation` cannot be evaluated in the frontend due to cardinality function, no branch for the conditional initial equation can be chosen:
{{{#!mo
Initial Equations (4, 3)
========================================
1/1 (0): 
if centrifugalPump.dyn_mech_equation then
  der(centrifugalPump.w) = 0.0
end if   [unknown]
...
}}}

Thus, during initialization this equation is not considered and removed in ""Simple Equations"". In consequence `$DER.centrifugalPump.w` is solved in another equation which inevitably leads to a division by zero and the model fails.


"	defect	new	high	Future	Backend			cardinality. ThermoSysPro	
