Skip to content

Commit

Permalink
- Added dump of distribution type to the uncertainties extraction
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13570 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Leonardo Laguna committed Oct 23, 2012
1 parent 7a4eeae commit dec4a28
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 62 deletions.
17 changes: 17 additions & 0 deletions Compiler/BackEnd/BackendVariable.mo
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,23 @@ algorithm
end match;
end varDistribution;

public function varTryGetDistribution
"
author: Peter Aronsson, 2012-05
Returns Distribution record of a variable.
"
input BackendDAE.Var var;
output Option<DAE.Distribution> dout;
protected DAE.Distribution d;
algorithm
dout := match (var)
case (BackendDAE.VAR(values = SOME(DAE.VAR_ATTR_REAL(distributionOption = SOME(d))))) then SOME(d);
case (BackendDAE.VAR(values = SOME(DAE.VAR_ATTR_INT(distributionOption = SOME(d))))) then SOME(d);
case (_) then NONE();
end match;
end varTryGetDistribution;

public function varUncertainty
"
author: Peter Aronsson, 2012-05
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/MathematicaDump.mo
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ end printMmaEqnStr;

/* Printing of equations and variables on Mathematica format*/

protected function printExpMmaStr "Prints an expression on format suitable for Mathematica to a string"
public function printExpMmaStr "Prints an expression on format suitable for Mathematica to a string"
input DAE.Exp e;
input BackendDAE.Variables vars "Required since variables should be translated from a to a[t]";
input BackendDAE.Variables knvars "inputs and outputs should also have [t] suffixed";
Expand Down

0 comments on commit dec4a28

Please sign in to comment.