-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NB] Create new package Evaluation.mo (#10384)
- Loading branch information
1 parent
9c41269
commit 8033a9c
Showing
6 changed files
with
88 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
OMCompiler/Compiler/NBackEnd/Modules/3_Post/NBEvaluation.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* This file is part of OpenModelica. | ||
* | ||
* Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), | ||
* c/o Linköpings universitet, Department of Computer and Information Science, | ||
* SE-58183 Linköping, Sweden. | ||
* | ||
* All rights reserved. | ||
* | ||
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR | ||
* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. | ||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES | ||
* RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, | ||
* ACCORDING TO RECIPIENTS CHOICE. | ||
* | ||
* The OpenModelica software and the Open Source Modelica | ||
* Consortium (OSMC) Public License (OSMC-PL) are obtained | ||
* from OSMC, either from the above address, | ||
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or | ||
* http://www.openmodelica.org, and in the OpenModelica distribution. | ||
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. | ||
* | ||
* This program is distributed WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH | ||
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. | ||
* | ||
* See the full OSMC Public License conditions for more details. | ||
* | ||
*/ | ||
encapsulated package NBEvaluation | ||
"file: NBEvaluation.mo | ||
package: NBEvaluation | ||
description: This file contains the functions to create and analyze the | ||
evaluation dependency graph. | ||
This graph is used for the different evaluation stages. | ||
" | ||
|
||
public | ||
import BackendDAE = NBackendDAE; | ||
import Module = NBModule; | ||
|
||
protected | ||
// Old Backend imports | ||
import OldBackendDAE = BackendDAE; | ||
|
||
public | ||
uniontype Stages | ||
record STAGES | ||
Boolean dynamicEval; | ||
Boolean algebraicEval; | ||
Boolean zerocrossEval; | ||
Boolean discreteEval; | ||
end STAGES; | ||
|
||
function convert | ||
input Stages stages; | ||
output OldBackendDAE.EvaluationStages oldEvalStages; | ||
algorithm | ||
oldEvalStages := OldBackendDAE.EVALUATION_STAGES( | ||
dynamicEval = stages.dynamicEval, | ||
algebraicEval = stages.algebraicEval, | ||
zerocrossEval = stages.zerocrossEval, | ||
discreteEval = stages.discreteEval); | ||
end convert; | ||
end Stages; | ||
|
||
constant Stages DEFAULT_STAGES = STAGES(true, true, false, true); | ||
|
||
annotation(__OpenModelica_Interface="backend"); | ||
end NBEvaluation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters