Skip to content

Commit

Permalink
Implemented BLT sorting using dummy derivative index reduction techni…
Browse files Browse the repository at this point in the history
…que, accessed by giving the flag +d=blt and possibly bltdump.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1196 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Jun 18, 2004
1 parent ff32697 commit f2fab7b
Show file tree
Hide file tree
Showing 10 changed files with 2,678 additions and 14 deletions.
4 changes: 3 additions & 1 deletion modeq/Makefile.in
Expand Up @@ -37,7 +37,7 @@ LDFLAGS = -L$(RMLHOME)/lib/plain $(ANTLR_LIBP) -lrml -lm -lantlr $(LIBSOCKET) \
PROG = modeq
AST = absyn_builder/absyn_builder.a
RTOBJ = runtime/systemimpl.o ../c_runtime/libc_runtime.a runtime/rtopts.o runtime/socketimpl.o \
runtime/printimpl.o runtime/cacheimpl.o runtime/ptolemyio.o $(CORBAOBJ)
runtime/printimpl.o runtime/cacheimpl.o runtime/ptolemyio.o runtime/daeext.o $(CORBAOBJ)

SRCRML= absyn.rml \
algorithm.rml \
Expand All @@ -48,6 +48,8 @@ SRCRML= absyn.rml \
codegen.rml \
connect.rml \
dae.rml \
daelow.rml \
derive.rml \
debug.rml \
dump.rml \
dumpgraphviz.rml \
Expand Down
2 changes: 1 addition & 1 deletion modeq/connect.rml
Expand Up @@ -141,7 +141,7 @@ relation equ_equations : Exp.ComponentRef list => DAE.Element list =

axiom equ_equations [_] => []

rule equ_equations y::cs => eq
rule equ_equations (y::cs) => eq
------------------------
equ_equations x::y::cs
=> DAE.EQUATION(Exp.CREF(x,Exp.OTHER), Exp.CREF(y,Exp.OTHER))::eq
Expand Down
63 changes: 63 additions & 0 deletions modeq/daeext.rml
@@ -0,0 +1,63 @@
(*
Copyright PELAB, Linkoping University

This file is part of Open Source Modelica (OSM).

OSM is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

OSM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

*)

(**
** file: daelow.rml
** module: DAELow
** description: DAELow a lower form of DAE including sparse matrises for
** BLT decomposition, etc.
**
** RCS: %W% %E%
**
**)

(** - Module header *)

module DAEEXT:


relation init_marks: (int,int) => () (* sets v_mark(i), e_mark(i) to false *)
relation e_mark: (int) => () (* sets e_mark(i) to true *)
relation get_e_mark: (int) => bool (* returns e_mark(i) *)
relation v_mark: (int) => () (* sets v_mark(i) to true *)
relation get_v_mark: (int) => bool (* returns e_mark(i) *)
relation dump_marked_equations: (int) => ()
relation dump_marked_variables: (int) => ()

relation init_lowlink: int => ()
relation init_number: int => ()
relation set_lowlink: (int,int) => ()
relation get_lowlink: (int) => int
relation set_number: (int,int) => ()
relation get_number: (int) => int

relation init_v: (int) => ()
relation init_f: (int) => ()
relation set_v: (int,int) => ()
relation get_v: (int) => (int)

relation set_f: (int,int) => ()
relation get_f: (int) => (int)

relation vector_setnth: (int vector,int,int) => ()

end

0 comments on commit f2fab7b

Please sign in to comment.