Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
Additional change:
- Skipped changes to SimulationRuntime

commit d40c51142e56d487703ae6a61e2c54b1fe8981cb
Merge: a996a90 9300fd4
Author: Martin Sjölund <martin.sjolund@liu.se>
Date:   Sat Jun 13 08:37:30 2015 +0200

    Merge branch 'master' into gossenpull-5-cleanup

    Conflicts:
    	Compiler/BackEnd/DynamicOptimization.mo

commit a996a90eb2a53b6153df0266484b5505e5586557
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed Jun 3 19:25:15 2015 +0300

    Refine documentation for DAEUtil.verifyEquationsDAE function

commit 9c3b89f746c6d3852a497ff16cb06257e118cf63
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon Jun 1 21:44:41 2015 +0300

    Rename function verifyDAE to verifyEquationsDAE in DAEUtil.mo and add documentation for it

commit 56e9a7f2ddd06837a089307b5012c879f7ae7a3e
Merge: dc8140e 4715552
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon Jun 1 21:27:26 2015 +0300

    Merge branch 'upstream'

    Conflicts:
    	Compiler/Template/CodegenCpp.tpl
    	SimulationRuntime/cpp/Include/Core/Solver/FactoryExport.h

commit dc8140e54e2536fb3bf0b411a112411fbbc13def
Author: gossen <maximov@techno-com.ru>
Date:   Thu May 28 10:47:11 2015 +0300

    Fix typo

commit 459659a929c20b26bec4191971820ff1a8506fd8
Author: gossen <maximov@techno-com.ru>
Date:   Thu May 28 10:38:01 2015 +0300

    Fix typo in comments

commit 4e67dd0b17309d2775404c73ba42f71685442101
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 21:38:03 2015 +0300

    Remove debug messages

commit 1cabda5a8afc20a2723b86dd6065e90ac05b08ae
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 21:16:41 2015 +0300

    Change default partition kind to UNKNOWN_PARTITION

commit cc20af9162a517e133571ff175df6240cbe33077
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 21:09:03 2015 +0300

    Restore old synchronous dump format

commit 430811fcd63937257a1f8084079a398720a064ac
Merge: 2ab8393 1eb6ca8
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 21:07:10 2015 +0300

    Merge branch 'upstream'

    Conflicts:
    	Compiler/BackEnd/HpcOmScheduler.mo
    	Compiler/FrontEnd/Expression.mo
    	Compiler/SimCode/HpcOmSimCodeMain.mo
    	Compiler/SimCode/SimCodeUtil.mo

commit 2ab8393baf3a1e89fbc2c4cb2c936d141367b440
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 19:48:53 2015 +0300

    Add partitions count in synchronous debug info

commit a70638e5d70ba107dadde5126c0f97888628cb17
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 27 19:27:09 2015 +0300

    Make new partitioning algorithm backward-compatible with old one

    Some tests produce different results ( Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot,
                                           ThermoSysPro.Examples.SimpleExamples.TestIdealCheckValve )
    and others have mismatched output due to equation reordering.
    So restore compiler old behavior for continuous systems.

commit 6099375345919e495641ee7f209b6a6cc871f398
Merge: d2b8a39 cc6a016
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 24 23:14:27 2015 +0300

    Merge branch 'upstream' into sync

    Conflicts:
    	Compiler/BackEnd/BackendDAEUtil.mo

commit d2b8a3936a5ea8e3f2cfba73055006aca56ae441
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 24 19:03:34 2015 +0300

    Fix removed parameter binding equations

commit 3c5963cf692eeb3a23fbf750050700577cad3d6d
Author: gossen <maksimov.io@yandex.ru>
Date:   Sat May 23 16:38:46 2015 +0300

    Fix discrete partitions zero-crossings

commit 0345ffdd69e41e15bf84d5690f721d161e456327
Author: Maximov Timur <maximov@techno-com.ru>
Date:   Fri May 22 15:28:31 2015 +0300

    Asserts in parameter bindings should be in removed equations section in BackendDAE

commit 72c8a5e2f23018af7ea6a0ecfea1534364123fd2
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 20 23:00:18 2015 +0300

    Fix merge errors

commit 14ec9a2511d1adf006807f4c4ce0f4804eca93ae
Merge: fbd89b4 3ede179
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 20 22:48:30 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit fbd89b4c387203ca23561e7a233c7831ab03c6f9
Merge: e1e1efc bf6ce68
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 20 01:28:12 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit e1e1efcfa4b79dadce9c3d982ef46efbceaf3169
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 20 01:28:01 2015 +0300

    Fix typo

commit ad19eaa2c984181d55b0ddb1583b4a6700880437
Merge: 04973aa 60c93f5
Author: gossen <maksimov.io@yandex.ru>
Date:   Tue May 19 19:56:07 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit 04973aabffe56c3fc1f415650a9c445a8fdc710c
Merge: 78d2dd3 0d42956
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon May 18 19:16:10 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit 78d2dd33244cf30d0e0f05c7f763be1436c8b008
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon May 18 19:15:09 2015 +0300

    Add comments to SynchronousFeatures.mo

commit 9f62ef9164830c8baa478947e05184f12e698a66
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon May 18 00:35:11 2015 +0300

    More fixes

commit 69028127770fb0fa216f6babaa62d9f85c2307b6
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon May 18 00:00:59 2015 +0300

    Fix factor and shift inferencing errors

commit a4466403c9156bc910f08223512fd0593f4e942f
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 17 19:53:41 2015 +0300

    Revert base clocks dumping in print function for BackendDAE.Shared because of some tests failure

commit b4333b880dccc96381afe7aa31bdfffe07a61257
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 17 14:14:54 2015 +0300

    No zero crossings for clocked discrete partitions

commit 990dfb0285fe209dc5f3a193149c00c16210fca8
Merge: 230f349 348b22c
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 17 13:26:54 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

    Conflicts:
    	Compiler/BackEnd/BackendQSS.mo
    	Compiler/BackEnd/HpcOmScheduler.mo
    	Compiler/SimCode/HpcOmSimCodeMain.mo
    	Compiler/SimCode/SimCodeUtil.mo
    	SimulationRuntime/c/util/CMakeLists.txt

commit 230f349559bceae2d3df8edeb1a39c8c710faa19
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 17 13:20:07 2015 +0300

    Revert Synchronous support in C simulation runtime.

commit a9954e8263456efc77cede1c57fe2a9eeea41667
Author: gossen <maksimov.io@yandex.ru>
Date:   Sun May 17 13:16:47 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit da9219766e4444dadce5579f6e2bd3b25727bcc4
Author: gossen <maksimov.io@yandex.ru>
Date:   Sat May 16 13:02:02 2015 +0300

    Add rational module to CMakeLists

commit 92dfa97f962dbc77f04bcc83ad3ce19ae53d481e
Author: gossen <maksimov.io@yandex.ru>
Date:   Wed May 13 02:12:04 2015 +0300

    Add rational number support in SimulationRuntime-C.

commit 70ec35aa8bc3e911fa0e0f1a3055a612b33418a3
Merge: acf5306 ff139a3
Author: gossen <maksimov.io@yandex.ru>
Date:   Mon May 11 23:04:52 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit acf5306708d425c0f6fd9f04bb1de24c5eee6b56
Merge: b6feb53 66346e3
Author: Timur Maksimov <maksimov.io@yandex.ru>
Date:   Fri May 8 00:35:47 2015 +0300

    Merge branch 'master' of github.com:OpenModelica/OMCompiler

commit b6feb5375b2e96bf2519e32a0f1298ee46b11432
Author: Timur Maksimov <maksimov.io@yandex.ru>
Date:   Fri May 8 00:33:38 2015 +0300

    Import from svn and merging with upstream.
    Improved support for Modelica synchronous features.
  • Loading branch information
sjoelund committed Jun 13, 2015
1 parent 9300fd4 commit db90b5d
Show file tree
Hide file tree
Showing 38 changed files with 2,756 additions and 1,071 deletions.
53 changes: 32 additions & 21 deletions Compiler/BackEnd/BackendDAE.mo
Expand Up @@ -44,6 +44,7 @@ public import SCode;
public import Values;
public import HashTable3;
public import HashTableCG;
public import MMath;

public
type Type = .DAE.Type
Expand Down Expand Up @@ -79,25 +80,27 @@ uniontype EqSystem "An independent system of equations (and their corresponding
end EQSYSTEM;
end EqSystem;

public uniontype SubClock
record SUBCLOCK
MMath.Rational factor;
MMath.Rational shift;
Option<String> solver;
end SUBCLOCK;
end SubClock;

public
uniontype BaseClockPartitionKind
record UNKNOWN_PARTITION end UNKNOWN_PARTITION;
record CLOCKED_PARTITION
.DAE.ClockKind clockKind;
// array<SubClockPartitions> subClockPartitions;
Integer baseClock;
SubClock subClock;
Boolean holdEvents;
end CLOCKED_PARTITION;
record CONTINUOUS_TIME_PARTITION end CONTINUOUS_TIME_PARTITION;
record UNSPECIFIED_PARTITION "treated as CONTINUOUS_TIME_PARTITION" end UNSPECIFIED_PARTITION;
end BaseClockPartitionKind;

public
uniontype SubClockPartition
record SubClockPartition
Integer factor "subSample/superSample";
//Integer counter "shiftSample/backSample";
//Integer resolution "shiftSample/backSample";
end SubClockPartition;
end SubClockPartition;


public
uniontype Shared "Data shared for all equation-systems"
Expand Down Expand Up @@ -244,26 +247,33 @@ public uniontype TearingSelect
record ALWAYS end ALWAYS;
end TearingSelect;

public constant String WHENCLK_PRREFIX = "$whenclk";
public uniontype EquationKind "equation kind"
record BINDING_EQUATION end BINDING_EQUATION;
record DYNAMIC_EQUATION end DYNAMIC_EQUATION;
record INITIAL_EQUATION end INITIAL_EQUATION;
record UNKNOWN_EQUATION_KIND end UNKNOWN_EQUATION_KIND;
record BINDING_EQUATION
end BINDING_EQUATION;
record DYNAMIC_EQUATION
end DYNAMIC_EQUATION;
record INITIAL_EQUATION
end INITIAL_EQUATION;
record CLOCKED_EQUATION
Integer clk;
end CLOCKED_EQUATION;
record UNKNOWN_EQUATION_KIND
end UNKNOWN_EQUATION_KIND;
end EquationKind;

public uniontype EquationAttributes
record EQUATION_ATTRIBUTES
Boolean differentiated "true if the equation was differentiated, and should not differentiated again to avoid equal equations";
EquationKind kind;
Integer subPartitionIndex;
LoopInfo loopInfo;
end EQUATION_ATTRIBUTES;
end EquationAttributes;

public constant EquationAttributes EQ_ATTR_DEFAULT_DYNAMIC = EQUATION_ATTRIBUTES(false, DYNAMIC_EQUATION(), 0, NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_BINDING = EQUATION_ATTRIBUTES(false, BINDING_EQUATION(), 0, NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_INITIAL = EQUATION_ATTRIBUTES(false, INITIAL_EQUATION(), 0, NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_UNKNOWN = EQUATION_ATTRIBUTES(false, UNKNOWN_EQUATION_KIND(), 0, NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_DYNAMIC = EQUATION_ATTRIBUTES(false, DYNAMIC_EQUATION(), NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_BINDING = EQUATION_ATTRIBUTES(false, BINDING_EQUATION(), NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_INITIAL = EQUATION_ATTRIBUTES(false, INITIAL_EQUATION(), NO_LOOP());
public constant EquationAttributes EQ_ATTR_DEFAULT_UNKNOWN = EQUATION_ATTRIBUTES(false, UNKNOWN_EQUATION_KIND(), NO_LOOP());

public uniontype LoopInfo "is this equation part of a for-loop"
record NO_LOOP
Expand Down Expand Up @@ -526,6 +536,7 @@ uniontype EventInfo
list<ZeroCrossing> sampleLst "[deprecated] list of sample as before, only used by cpp runtime (TODO: REMOVE ME)";
list<ZeroCrossing> relationsLst "list of zero crossing function as before";
Integer numberMathEvents "stores the number of math function that trigger events e.g. floor, ceil, integer, ...";
array<.DAE.ClockKind> clocks;
end EVENT_INFO;
end EventInfo;

Expand Down Expand Up @@ -645,8 +656,8 @@ uniontype IndexType
record ABSOLUTE "incidence matrix with absolute indexes" end ABSOLUTE;
record NORMAL "incidence matrix with positive/negative indexes" end NORMAL;
record SOLVABLE "incidence matrix with only solvable entries, for example {a,b,c}[d] then d is skipped" end SOLVABLE;
record BASECLOCK "incidence matrix for base-clock partitioning" end BASECLOCK;
record SUBCLOCK "incidence matrix for sub-clock partitioning" end SUBCLOCK;
record BASECLOCK_IDX "incidence matrix for base-clock partitioning" end BASECLOCK_IDX;
record SUBCLOCK_IDX "incidence matrix for sub-clock partitioning" end SUBCLOCK_IDX;
record SPARSE "incidence matrix as normal, but add for inputs also a value" end SPARSE;
end IndexType;

Expand Down

0 comments on commit db90b5d

Please sign in to comment.