Skip to content

Commit

Permalink
Remove superSampleFactor from FMI model description
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Sep 25, 2017
1 parent 79caae6 commit 5c6d6e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Compiler/Template/CodegenFMUCommon.tpl
Expand Up @@ -321,9 +321,8 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
case SUBPARTITION(subClock=SUBCLOCK(factor=RATIONAL(nom=fsub, denom=fsuper), shift=RATIONAL(nom=snom, denom=sres))) then
<<
<Clock><Periodic
baseInterval="<%bi%>"
baseInterval="<%realDiv(bi, intReal(fsuper))%>"
<%if intGt(fsub, 1) then 'subSampleFactor="'+fsub+'"'%>
<%if intGt(fsuper, 1) then 'superSampleFactor="'+fsuper+'"'%>
<%if intGt(snom, 0) then 'shiftCounter="'+snom+'"'%>
<%if intGt(sres, 1) then 'resolution="'+sres+'"'%>
/></Clock>
Expand All @@ -337,9 +336,8 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
<Clock><Periodic
intervalCounter="<%intMul(bic, sres)%>"
<%if intGt(fsub, 1) then 'subSampleFactor="'+fsub+'"'%>
<%if intGt(fsuper, 1) then 'superSampleFactor="'+fsuper+'"'%>
<%if intGt(snom, 0) then 'shiftCounter="'+snom+'"'%>
resolution="<%intMul(resi, sres)%>"
<%if intGt(intMul(snom, fsuper), 0) then 'shiftCounter="'+intMul(snom, fsuper)+'"'%>
resolution="<%intMul(intMul(resi, sres), fsuper)%>"
/></Clock>
>>
; separator="\n")
Expand Down
5 changes: 5 additions & 0 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -104,6 +104,11 @@ package builtin
output Boolean b;
end intLt;

function intReal
input Integer i;
output Real r;
end intReal;

function realInt
input Real r;
output Integer i;
Expand Down

0 comments on commit 5c6d6e3

Please sign in to comment.