Skip to content

Commit

Permalink
Simulation working. Example: test_codegen/simtest.mo
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1557 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
levsa committed Mar 4, 2005
1 parent 8c206db commit 4955743
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions c_runtime/modelica.h
Expand Up @@ -44,6 +44,8 @@ typedef modelica_string_t modelica_string;
typedef modelica_integer size_real_array_rettype;
typedef modelica_integer size_integer_array_rettype;

#define time (*t)

#if defined(__cplusplus)
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions modeq/test_codegen/simtest.mo
Expand Up @@ -2,7 +2,7 @@ function foo
input Real x;
output Real y;
algorithm
y:=14+x*2.0;
y:=14+x*4.0;
end foo;


Expand All @@ -11,5 +11,5 @@ model mo
Real y(start=5);
equation
der(y)=x;
x=foo(sin(time));
x=sin(foo(time));
end mo;

0 comments on commit 4955743

Please sign in to comment.