Can't tell if EnergyPlusToFMU Examples are working
Hi,
I've been having some trouble with running EnergyPlus as an FMU. Hi,
For some reason I haven't been able to install PyFMI on my system, and have been trying to using FMPy. After some initial trouble, I've managed to run the examples that come with EnergyPlusToFMU.
My issue now, is that setting the input variables does not seem to change the simulation output at all. Since none of the examples provide all the files necessary to generate the FMU or document the expected output from running them, I have no idea what the results should be.
Has anyone else successfully run the examples? If so, what .epw did you use, and how does changing the input variables to the examples change the outputs?
Edit: Here's the python code I'm using to run the example.
#!/usr/bin/python3
import fmpy
# FMU compiled with:
# - E+ v9.0.1
# - EnergyPlusToFMU v2.1.0
# - EnergyPlusToFMU-v2.1.0/Examples/Actuator/_fmu-export-actuator.idf
# - EnergyPlus-9-0-1/WeatherData/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw
fmu = '_fmu_export_actuator.fmu'
# prints a description of the FMU.
fmpy.dump(fmu)
# Runs the model.
# Needs this patch to be applied:
# https://github.com/CATIA-Systems/FMPy/commit/75fb978a55fdae5a800b80cde54118a2e274d2e2
result = fmpy.simulate_fmu(
filename=fmu,
start_time=0,
stop_time=86400,
output_interval=600,
start_values={"yShade":2}
)
fmpy.util.plot_result(result)
And this is the output I get, regardless of what yShade is set to.
Why couldn't you install PyFMI on your machine? Was it on Windows or on Linux. PyFMI has pre-compiled binaries that allows it to be easily installed (https://anaconda.org/chria/pyfmi).
What do you mean by been able to run the examples? The examples have one input and one output so you should be able to query the output and see what comes out. You could also modify one of the examples (e.g. Schedule) and add an output variable that tracks the input. You could then set the input and see whether the output is what you are expecting.
@Deniz Erbilgin, are you running into the same issue as me? https://github.com/lbl-srg/EnergyPlus...
@Thierry, I'm running Fedora 31. I'm not really sure why I couldn't get PyFMI to work, I ran into some pretty bizarre issues and so gave up in the end (I did try the anaconda package as well). I can run all three examples in FMPy, but: a) adjusting the the inputs does not seem to effect the outputs. b) in the absence of a more complete example, I don't know if (a) is because of a problem in the software, or because of the particular .epw I've chosen or what (I assume it's a bug but you never know).
@Jeremy that does looks similar to my problem. How did you read back yShade?
Could you share the code you are using to run the example in FMPy? I unfortunately have no experience with it though.
I've added the code and the output to the original question.