lbl-srg / modelica-buildings

Modelica Buildings library
254 stars 158 forks source link

Rename variables in G36 for consistency #993

Closed mwetter closed 7 years ago

mwetter commented 7 years ago

This is to rename these variables:

for ff in `find . \( -name '*.mo' -or -name '*.mos' -or -name '*.py' -or -name '*.txt' -or -name '*.svg' \)`; do
    list=(\
    ecoDamLim damLim \
    ecoEnaDis enaDis \
    ecoMod mod \
    uVOutMinSet_flow VOutMinSet_flow \
    minVOut_flow VOutMin_flow \
    desVOut_flow VOutDes_flow \
    conSigMin yMin \
    conSigMax yMax \
    minFanSpe yFanMin \
    maxFanSpe yFanMax \
    fansSpePos fanSpePos \
    curFanSpe uSupFan \
    desVOutMinFanSpePos yDam_VOutDes_minSpe \
    desVOutCurFanSpePos yDam_VOutDes_curSpe \
    desVOutMaxFanSpePos yDam_VOutDes_maxSpe \
    minVOutMinFanSpePos yDam_VOutMin_minSpe \
    minVOutCurFanSpePos yDam_VOutMin_curSpe \
    minVOutMaxFanSpePos yDam_VOutMin_maxSpe \
    )

    for ((i=0; i<${#list[@]}; i+=2)); do
      sed -e s/${list[i]}/${list[i+1]}/g -i $ff
   done

done

The rename is based on branch issue989_economizer_info which contains the first three renames already.

mwetter commented 7 years ago

@milicag : I run the above script and committed the change. Can you please update the diagram and regenerate other pngs if their svg was affected by the renaming. The branch is issue993_rename_g36_vars

milicag commented 7 years ago

@mwetter I updated the svg and the png.

mwetter commented 7 years ago

@milicag Thanks, I made a pull request