Opened 10 years ago

Last modified 9 years ago

#2927 closed defect

Wrong zero crossing function generation — at Initial Version

Reported by: Niklas Worschech Owned by: somebody
Priority: blocker Milestone: 1.9.4
Component: Backend Version: trunk
Keywords: zero crossings Cc: Willi Braun

Description

For this model:

model miniModel

PARAMETERS
parameter Integer nZ = 5;

VARIABLES
Integer lowerZrow;
Real zIn = 4.3;
Real[nZ] rowZ = {1,2,3,4,5};

algorithm

Finde zIndex
lowerZrow := 0 "Reset Index";
for i in 2:nZ loop

if (i == nZ) then

lowerZrow := i - 1;
break;

end if;
if zIn < rowZ[i] then

lowerZrow := i-1;
break;

end if;

end for;


end miniModel;

The omc generate 4 zero crossing functions which is not correct

Change History (0)

Note: See TracTickets for help on using tickets.