Skip to content

Commit

Permalink
Added the possibility to output DEFINE as EQUATION
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@437 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x97davka committed Sep 22, 1998
1 parent 6aa3f44 commit cf1be90
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions modeq/dae.rml
Expand Up @@ -43,14 +43,24 @@ end

(*!ignorecode*)

with "rtopts.rml"

(** relation: dump
**
** This relation prints the DAE in the standard outpur format.
** This relation prints the DAE in the standard output format.
**)

relation dump: DAElist => () =

rule print "fclass " & print n & print "\n" &
rule RTOpts.modelica_output => false &
print "fclass " & print n & print "\n" &
dump(l) &
print "end " & print n & print ";\n"
-----------------------------------
dump DAE([COMP(n,l)])

rule RTOpts.modelica_output => true &
print "class " & print n & print "\n" &
dump(l) &
print "end " & print n & print ";\n"
-----------------------------------
Expand Down Expand Up @@ -117,7 +127,14 @@ relation dump_element: Element => () =
--------------------------------------
dump_element(EQUATION(e1, e2))

rule print " " & Exp.print_component_ref c &
rule RTOpts.modelica_output => false &
print " " & Exp.print_component_ref c &
print " ::= " & Exp.print_exp e & print ";\n"
--------------------------------------
dump_element(DEFINE(c, e))

rule RTOpts.modelica_output => true &
print " " & Exp.print_component_ref c &
print " ::= " & Exp.print_exp e & print ";\n"
--------------------------------------
dump_element(DEFINE(c, e))
Expand Down

0 comments on commit cf1be90

Please sign in to comment.