Closed trevorhardy closed 3 years ago
I've been doing some digging the past day or so and have found the following:
substation1b.log
is showing an error in helpers.parse_fncs_magnitude
:
parse_fncs_magnitude does not understand pypower
That method is being called in substation.py
in the fncs_substation_loop
and only in one spot. The value it should be receiving is the LMP via FNCS but somehow pypower
is getting put in. PYPOWER is the sender of the message and full topic name is pypower/LMP_B7
. I'm going to keep digging.
As part of adding HELICS support, to publish the LMP fncsPYPOWER.py
is checking for variable (pub_lmp
) that was only being set by the HELICS portion of the code but not the FNCS portion. A test was made on that variable's existence to determine if the LMP should be published; due to FNCS not setting the variable the LMP was never getting published. Checking a fix now.
Well, my fix didn't work. Hoping to dig into it later.
I think I was wrong about my conclusion on the bug. I think the HELICS iteration is using pub_lmp
as a flag for HELICS use.
The FNCS publication is never happening, though so I'm going to keep digging.
OK; I got fooled by that lack of flushing to file of Python print()
commands I was using for debugging.
FNCS publication is being reached by PYPOWER and I just hooked up the fncs_tracer
and verified that pypower/LMP_B7
is getting onto the FNCS message bus.
For some reason fncs.get_values("LMP")
(the key for pypower/LMP_B7
) in substation.py
is returning pypower
. The key "LMP" is what is returned a line or two before by fncs.get_events()
.
I'm in the trenches of debugging confusion and have to go on to something else so I'll leave with this summary:
fncs_tracer
shows that pypower/LMP_B7
is a numerical value (well, string since we're using FNCS).substation.py
show that even by the very first time step, fncs.get_value("LMP")
returns pypower
. The only time I see a reasonable value returned by this call is when I ask for on the first time step right after being granted a time, prior to the traditional method of fncs.get_events()
to determine which keys need to be used to get new values.Resolved with Tom's patch.
Still other issues with the controller being very price responsive during the first day. I'll open another issue for that.
The v1.0.0 implementation of the SGIP1 example shows oscillations in the power system load but not price. These oscillations are only present in the transactive case and are more dominant in the first day of the two-day simulation prior to the outage on day two that drives prices higher.
The energy storage devices show these oscillations as well but are in load-following mode within GridLAB-D and its unclear if these devices are the cause or another indication of a broader problem.