Opened 16 years ago

Last modified 14 years ago

#1023 closed defect (fixed)

reinit(variable, function_call) does not generate complete code!

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone:
Component: Version:
Keywords: Cc: Adrian Pop, Adrian Pop

Description

This model flattens but the generated code is not complete (missing ExternalFunc1 in ExternalLibraries1.cpp) so it doesn't compile into an executable!

function ExternalFunc1
  output Real y;
  external y=ExternalFunc1_ext()
  annotation(Library="libExternalFunc1_ext.o",
             Include="#include\"ExternalFunc1_ext.h\""); 
end ExternalFunc1;

model ExternalLibraries1
  Real x(start=1.0);
equation
  x = -5*der(x);
  when sample(0, 0.05) then
    reinit(x, ExternalFunc1());
  end when;
end ExternalLibraries1;}}}

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

Fixed in r5896

Note: See TracTickets for help on using tickets.