Skip to content

Commit

Permalink
Updated test for BOM (#3029)
Browse files Browse the repository at this point in the history
* Updated test for BOM

This is for #3028
  • Loading branch information
mwetter authored May 24, 2022
1 parent 79f20f2 commit d11d749
Show file tree
Hide file tree
Showing 29 changed files with 35 additions and 31 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
- name: "Install BuildingsPy"
run: pip3 install git+https://github.com/lbl-srg/[email protected]

- name: Check for UTF-8 BOM
run : |
for ff in `grep -rlI --exclude="ffd.vcxproj" --exclude-dir="\.git" $'^\xEF\xBB\xBF' .`; do
echo "::error file=${ff}:: Found BOM in ${ff}."
done;
test -z "${ff}"
- name: "Test html syntax"
run : ../bin/runUnitTests.py --validate-html-only

Expand Down Expand Up @@ -75,9 +82,6 @@ jobs:
python Buildings/Resources/src/Controls/OBC/UnitConversions/unit_converters.py
git diff --exit-code Buildings
- name: Check for UTF-8 BOM
run: "! find . -name '*.mo' -print0 | xargs -0 grep -l $'^\\xEF\\xBB\\xBF' | grep ."

- name: Check for file permissions
run : |
set -o noglob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Air.Systems.SingleZone.VAV.BaseClasses.Validation.ControllerChillerDXHeatingEconomizer", stopTime=172800, tolerance=1e-06, resultFile="ControllerChillerDXHeatingEconomizer");
simulateModel("Buildings.Air.Systems.SingleZone.VAV.BaseClasses.Validation.ControllerChillerDXHeatingEconomizer", stopTime=172800, tolerance=1e-06, resultFile="ControllerChillerDXHeatingEconomizer");
createPlot(id=1, position={0, 0, 1316, 720}, y={"con.TSetRooCoo", "con.TSetRooHea", "con.TRoo"}, range={0.0, 175000.0, 10.0, 35.0}, grid=true, colors={{28,108,200}, {238,46,47}, {0,140,72}}, displayUnits={"degC", "degC", "degC"});
createPlot(id=1, position={0, 0, 1316, 720}, y={"con.yFan", "con.yHea", "con.yCooCoiVal"}, range={0.0, 175000.0, -0.5, 1.5}, grid=true, subPlot=102, colors={{28,108,200}, {238,46,47}, {0,140,72}}, displayUnits={"1", "1", "1"});
createPlot(id=1, position={0, 0, 1316, 720}, y={"con.TSup", "con.TSetSupAir"}, range={0.0, 175000.0, 5.0, 25.0}, grid=true, subPlot=103, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
simulateModel("Buildings.Airflow.Multizone.Examples.TrickleVent", stopTime=2592000, numberOfIntervals=0, outputInterval=600, tolerance=1e-06, resultFile="TrickleVent");
simulateModel("Buildings.Airflow.Multizone.Examples.TrickleVent", stopTime=2592000, numberOfIntervals=0, outputInterval=600, tolerance=1e-06, resultFile="TrickleVent");
createPlot(id=1, position={55, 55, 584, 361}, y={"tabDat_m_flow.m_flow", "tabDat_V_flow.V_flow"}, range={0.0, 2600000.0, -0.08, 0.039999999999999994}, grid=true, filename="TrickleVent.mat", colors={{28,108,200}, {0,0,0}}, displayUnits={"kg/s", "m3/s"});
createPlot(id=1, position={55, 55, 584, 361}, x="tabDat_m_flow.dp", y={"tabDat_V_flow.V_flow", "tabDat_m_flow.m_flow"}, range={-35.0, 45.0, -0.08, 0.039999999999999994}, grid=true, subPlot=102, colors={{238,46,47}, {28,108,200}}, patterns={LinePattern.None, LinePattern.None}, markers={MarkerStyle.Cross, MarkerStyle.Cross}, timeUnit="Pa", displayUnits={"m3/s", "kg/s"});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.CorrectedConvection", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="CorrectedConvection");
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.CorrectedConvection", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="CorrectedConvection");
createPlot(id=1,
position={16, 11, 592, 372},
y={"TSoi[1].T", "TSoi[2].T", "TSoi[3].T", "TSoi[4].T"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.CorrectedNFactors", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="CorrectedNFactors");
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.CorrectedNFactors", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="CorrectedNFactors");
createPlot(id=1,
position={16, 11, 592, 372},
y={"TSoi[1].T", "TSoi[2].T", "TSoi[3].T", "TSoi[4].T"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.UndisturbedSoilTemperature", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="UndisturbedSoilTemperature");
simulateModel("Buildings.BoundaryConditions.GroundTemperature.Examples.UndisturbedSoilTemperature", tolerance=1e-6, stopTime=31536000, method="Cvode", resultFile="UndisturbedSoilTemperature");
createPlot(id=1,
position={16, 11, 592, 372},
y={"TSoi[1].T", "TSoi[2].T", "TSoi[3].T", "TSoi[4].T"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.Controller", method="Cvode", outputInterval=300, stopTime=86400, tolerance=1e-06, resultFile="conVAV");
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.Controller", method="Cvode", outputInterval=300, stopTime=86400, tolerance=1e-06, resultFile="conVAV");
createPlot(id=1, position={35, 30, 592, 427}, y={"conVAV.TSup", "conVAV.setPoiVAV.TSupHeaEco", "conVAV.setPoiVAV.TSupCoo"}, range={0.0, 90000.0, 0.0, 40.0}, grid=true, colors={{0,140,72}, {162,29,33}, {244,125,35}}, displayUnits={"degC", "degC", "degC"});
createPlot(id=1, position={35, 30, 592, 104}, y={"conVAV.yRetDamPos", "conVAV.yOutDamPos", "conVAV.yFan","conVAV.yHeaCoi"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}});
createPlot(id=1, position={35, 30, 592, 103}, y={"conVAV.uOcc"}, range={0.0, 90000.0, -2.0, 2.0}, grid=true, subPlot=3, colors={{28,108,200}});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.CoolingCoil", method="Cvode", outputInterval=300, stopTime=28000, tolerance=1e-06, resultFile="CoolingCoil");
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.CoolingCoil", method="Cvode", outputInterval=300, stopTime=28000, tolerance=1e-06, resultFile="CoolingCoil");
createPlot(id=1, position={0, 0, 1532, 791}, y={"cooCoi.yCooCoi"}, range={0.0, 28000.0, -0.2, 1.2000000000000002}, grid=true, colors={{28,108,200}});
createPlot(id=1, position={0, 0, 1532, 393}, y={"TSupSet", "TSup.y"}, range={0.0, 28000.0, 15.5, 20.0}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}}, displayUnits={"degC", "degC"});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.ZoneState", method="Cvode", stopTime=3, tolerance=1e-06, resultFile="ZoneStatePoints");
simulateModel("Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.SingleZone.VAV.Validation.ZoneState", method="Cvode", stopTime=3, tolerance=1e-06, resultFile="ZoneStatePoints");
createPlot(id=1, position={55, 50, 592, 427}, y={"zonSta.yZonSta"}, range={0.0, 3.0, 0.0, 4.0}, grid=true, colors={{28,108,200}});
createPlot(id=1, position={55, 50, 592, 211}, y={"zonSta.uHea", "zonSta.uCoo"}, range={0.0, 3.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}, {238,46,47}});

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling", stopTime=2419200, method="Cvode", tolerance=1e-06, resultFile="OptimalStartNoHeatingNoCooling");
simulateModel("Buildings.Controls.OBC.Utilities.Validation.OptimalStartNoHeatingNoCooling", stopTime=2419200, method="Cvode", tolerance=1e-06, resultFile="OptimalStartNoHeatingNoCooling");
createPlot(id=1, position={10, 9, 1161, 1054},subPlot=1, y={"optSta.tOpt"}, range={0.0, 28.0, -1.5, 1.5}, grid=true, colors={{28,108,200}});
createPlot(id=1, position={10, 9, 1161, 346},subPlot=2, y={"optSta.optOn"}, range={0.0, 2500000.0, -1.5, 1.5}, grid=true, colors={{28,108,200}});
createPlot(id=1, position={10, 9, 1161, 346},subPlot=3, y={"TSetHea.y","TSetCoo.y","optSta.TZon"}, range={0.0, 2500000.0, 10.0, 35.0}, grid=true, colors={{238,46,47},{0,140,72},{28,108,200}});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
simulateModel("Buildings.Examples.VAVReheat.Validation.TraceSubstance", startTime=4492800, stopTime=4665600, numberOfIntervals=0, outputInterval=900, method="Cvode", tolerance=1e-06, resultFile="TraceSubstance");
simulateModel("Buildings.Examples.VAVReheat.Validation.TraceSubstance", startTime=4492800, stopTime=4665600, numberOfIntervals=0, outputInterval=900, method="Cvode", tolerance=1e-06, resultFile="TraceSubstance");
createPlot(id=1, position={0, 0, 1537, 628}, y={"hvac.VOut1.V_flow", "hvac.senSupFlo.V_flow"}, range={3500000.0, 4650000.0, -0.5, 3.0}, grid=true, colors={{28,108,200}, {238,46,47}}, displayUnits={"m3/s", "m3/s"});
createPlot(id=1, position={0, 0, 1537, 628}, y={"flo.cor.air.vol.C[1]", "flo.sou.air.vol.C[1]", "flo.eas.air.vol.C[1]", "flo.nor.air.vol.C[1]", "flo.wes.air.vol.C[1]"}, range={3500000.0, 4650000.0, -0.0005, 0.0015}, grid=true, subPlot=102, colors={{28,108,200}, {238,46,47}, {0,140,72}, {217,67,180}, {0,0,0}});
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
translateModel("Buildings.Fluid.FixedResistances.Examples.PlugFlowPipe");
translateModel("Buildings.Fluid.FixedResistances.Examples.PlugFlowPipe");
simulateModel("Buildings.Fluid.FixedResistances.Examples.PlugFlowPipe", stopTime=1000, method="CVode", tolerance=1e-006, resultFile="PlugFlowPipe");
createPlot(id=1, position={15, 10, 584, 397}, y={"senTemIn.T", "senTemInNoMix.T", "senTemOutNoMix.T", "senTemOut.T"}, range={0.0, 1000.0, 45.0, 75.0}, grid=true, colors={{28,108,200}, {0,140,72}, {217,67,180}, {238,46,47}}, timeUnit="s", displayUnits={"degC", "degC", "degC", "degC"});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.DiscretizedBuriedPipe", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="DiscretizedBuriedPipe");
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.DiscretizedBuriedPipe", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="DiscretizedBuriedPipe");
createPlot(
id=1,
position={55, 55, 1192, 772},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.SingleBuriedPipe", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="SingleBuriedPipe");
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.SingleBuriedPipe", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="SingleBuriedPipe");
createPlot(
id=1,
position={55, 55, 1192, 772},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.TwoBuriedPipes", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="TwoBuriedPipes");
simulateModel("Buildings.Fluid.Geothermal.BuriedPipes.Examples.TwoBuriedPipes", stopTime=63072000, method="Cvode", tolerance=1e-06, resultFile="TwoBuriedPipes");
createPlot(id=1,
position={0, 0, 1534, 469},
y={"senTemChWIn.T", "senTemChWOut.T", "senTemHotWIn.T", "senTemHotWOut.T", "gro.soi.T"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simulate
// Simulate
simulateModel("Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.Validation.EquivalentHeatCapacity", startTime=10, stopTime=20, method="CVode", tolerance=1e-6, resultFile="EquivalentHeatCapacity");
// Plot commands
removePlots(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.HeatExchangers.CoolingTowers.Examples.FixedApproachDryBulb",
simulateModel("Buildings.Fluid.HeatExchangers.CoolingTowers.Examples.FixedApproachDryBulb",
startTime=15552000, stopTime=15984000, tolerance=1e-06,
method="CVode", resultFile="FixedApproachDryBulb");
removePlots();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simulate
// Simulate
simulateModel("Buildings.Fluid.HeatExchangers.CoolingTowers.Validation.MerkelEnergyPlus", stopTime=172800, tolerance=1E-6, method="CVode", resultFile="MerkelEnergyPlus");
// Plot commands
removePlots(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU",
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU",
stopTime=1000,
method="cvode",
tolerance=1e-6,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow",
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow",
stopTime=1000,
method="cvode",
tolerance=1e-6,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating",
simulateModel("Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating",
stopTime=1000,
method="cvode",
tolerance=1e-6,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.Sources.Examples.Outside_CpData", startTime=1.728e+07, stopTime=1.78848e+07, method="CVode", tolerance=1e-6, resultFile="Outside_CpData");
simulateModel("Buildings.Fluid.Sources.Examples.Outside_CpData", startTime=1.728e+07, stopTime=1.78848e+07, method="CVode", tolerance=1e-6, resultFile="Outside_CpData");
createPlot(id = 3,
position = {55, 24, 679, 513},
y = {"weaDat.weaBus.winDir"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Fluid.Sources.Examples.Outside_CpData_Angles", startTime=0, stopTime=20, method="CVode", tolerance=1e-6, resultFile="Outside_CpData_Angles");
simulateModel("Buildings.Fluid.Sources.Examples.Outside_CpData_Angles", startTime=0, stopTime=20, method="CVode", tolerance=1e-6, resultFile="Outside_CpData_Angles");
createPlot(id = 3,
position = {55, 24, 679, 513},
y = {"weaDat.weaBus.winDir"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Media.Examples.SteamDerivativeCheck", startTime=0, stopTime=1, tolerance=1E-10, method="dassl", resultFile="MediaExamplesSteamDerivativeCheck");
simulateModel("Buildings.Media.Examples.SteamDerivativeCheck", startTime=0, stopTime=1, tolerance=1E-10, method="dassl", resultFile="MediaExamplesSteamDerivativeCheck");
createPlot(id=1,
position={34, 26, 626, 458},
y={"der(hVapSym)", "der(hVapCod)"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Media.Examples.SteamProperties", method="dassl", startTime=0, stopTime=1.0, tolerance=1e-06, resultFile="SteamProperties");
simulateModel("Buildings.Media.Examples.SteamProperties", method="dassl", startTime=0, stopTime=1.0, tolerance=1e-06, resultFile="SteamProperties");
createPlot(
id = 1,
x = "T_degC",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Media.Examples.SteamSaturationConsistencyCheck", method="dassl", startTime=0, stopTime=1.0, tolerance=1e-06, resultFile="SteamSaturationConsistencyCheck");
simulateModel("Buildings.Media.Examples.SteamSaturationConsistencyCheck", method="dassl", startTime=0, stopTime=1.0, tolerance=1e-06, resultFile="SteamSaturationConsistencyCheck");
createPlot(id=1, position={15, 10, 498, 544},
x="TSat_degC",
y={"TSat0", "TSat"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
simulateModel("Buildings.Media.Examples.SteamTemperatureEnthalpyInversion", method="dassl", tolerance=1e-6, stopTime=1.0, resultFile="MediaExamplesSteamTemperatureEnthalpyInversion");
simulateModel("Buildings.Media.Examples.SteamTemperatureEnthalpyInversion", method="dassl", tolerance=1e-6, stopTime=1.0, resultFile="MediaExamplesSteamTemperatureEnthalpyInversion");
createPlot(id = 1,
position = {31, 30, 400, 280},
y = {"T"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Script generated by Dymola Fri Feb 12 13:47:08 2021
// Script generated by Dymola Fri Feb 12 13:47:08 2021
// Simulate commands
simulateModel("Buildings.Obsolete.Examples.VAVReheat.Validation.VAVBranch", stopTime=25200, method="Cvode", tolerance=1e-06, resultFile="VAVBranch");
// Plot commands
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
simulateModel("Buildings.Utilities.IO.SignalExchange.Examples.FirstOrder", stopTime=150, tolerance=1e-6, method="CVode", resultFile="FirstOrder");
simulateModel("Buildings.Utilities.IO.SignalExchange.Examples.FirstOrder", stopTime=150, tolerance=1e-6, method="CVode", resultFile="FirstOrder");
createPlot(id=1, position={55, 50, 592, 427}, y={"expMod.oveWriSet_u", "expMod.oveWriAct_u", "expMod.rea"}, range={0.0, 150.0, -2.0, 4.0}, grid=true, colors={{28,108,200}, {238,46,47}, {0,140,72}});
createPlot(id=1, position={55, 50, 592, 211}, y={"expMod.oveWriSet_activate", "expMod.oveWriAct_activate"}, range={0.0, 150.0, -0.5, 1.5}, grid=true, subPlot=2, colors={{28,108,200}, {28,108,200}});

0 comments on commit d11d749

Please sign in to comment.