FMUComplianceChecker icon indicating copy to clipboard operation
FMUComplianceChecker copied to clipboard

eventInfo flags ignored during event iteration

Open modelica-trac-importer opened this issue 7 years ago • 0 comments

Reported by ottot on 5 Feb 2016 07:59 UTC The compliance checker ignores the nominalsOfContinuousStatesChanged and valuesOfContinuousStatesChanged eventInfo flags except for the last call during event iteration. See the following code:

fmi2_status_t do_event_iteration(fmi2_import_t *fmu, fmi2_event_info_t *eventInfo)
{
	fmi2_status_t fmistatus = fmi2_status_ok;
	eventInfo->newDiscreteStatesNeeded = fmi2_true;
	eventInfo->terminateSimulation     = fmi2_false;
	while (eventInfo->newDiscreteStatesNeeded && !eventInfo->terminateSimulation) {
		fmistatus = fmi2_import_new_discrete_states(fmu, eventInfo);
	}
	return fmistatus;
}

We have the following fragments from the specification.

If valuesOfContinuousStatesChanged = fmi2True then at least one element of the
continuous state vector has changed its value due to the function call.
If no element of the continuous state vector has changed its value, valuesOfContinuousStatesChanged must return fmi2False. [if

The end effect of this is that the compliance checker ignores all nominalsOfContinuousStatesChanged and valuesOfContinuousStatesChanged flags returned from fmi2NewDiscreteStates expect the ones returned from the last call.

Tested with 2.0.1.


Migrated-From: https://trac.fmi-standard.org/ticket/368

modelica-trac-importer avatar Feb 08 '18 18:02 modelica-trac-importer