Skip to content

Commit

Permalink
- Relaxed type requirements of Util.listGetMemberOnTrue to make it mo…
Browse files Browse the repository at this point in the history
…re versatile.

- Added Util.listRemoveFirstOnTrue.
- Implemented inStream and actualStream for one-to-one stream connections.


git-svn-id: https://openmodelica.org/svn/OpenModelica/branches/sjoelund-functiontree@6910 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Nov 8, 2010
1 parent 730b4a3 commit 55e542f
Show file tree
Hide file tree
Showing 11 changed files with 975 additions and 293 deletions.
2 changes: 2 additions & 0 deletions Compiler/ComponentReference.mo
Expand Up @@ -56,6 +56,8 @@ protected import System;
protected import Util;


public constant DAE.ComponentRef DUMMY = DAE.CREF_IDENT("dummy", DAE.ET_OTHER(), {});

/***************************************************/
/* generate a ComponentRef */
/***************************************************/
Expand Down
12 changes: 10 additions & 2 deletions Compiler/Connect.mo
Expand Up @@ -62,7 +62,14 @@ end Face;

type EquSetElement = tuple<DAE.ComponentRef, DAE.ElementSource>;
type FlowSetElement = tuple<DAE.ComponentRef, Face, DAE.ElementSource>;
type StreamSetElement = tuple<DAE.ComponentRef, Option<DAE.ComponentRef>, Face, DAE.ElementSource>;
type StreamSetElement = tuple<DAE.ComponentRef, DAE.ComponentRef, Face, DAE.ElementSource>;

// FlowStreamConnect models an association between a stream variable and a flow
// variable, which is needed to implement the stream operators. The Sets type
// have a list of these associations that are added when a connector is
// instantiated, and when two streams are connected their associated flow
// variables are looked up in that list.
type StreamFlowConnect = tuple<DAE.ComponentRef, DAE.ComponentRef>;

public
uniontype Set "A connection set is represented using the Set type."
Expand Down Expand Up @@ -99,6 +106,7 @@ uniontype Sets "The connection \'Sets\' contains
It is registered in env by Inst.addConnnectionSetToEnv.";
list<DAE.ComponentRef> deletedComponents "list of components with conditional declaration = false";
list<OuterConnect> outerConnects "connect statements to propagate upwards";
list<StreamFlowConnect> streamFlowConnects "list of stream-flow associations.";
end SETS;
end Sets;

Expand All @@ -115,7 +123,7 @@ uniontype OuterConnect
end OUTERCONNECT;
end OuterConnect;

public constant Sets emptySet=SETS({},{},{},{});
public constant Sets emptySet=SETS({},{},{},{},{});

end Connect;

0 comments on commit 55e542f

Please sign in to comment.