-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Open
Enhancement
Copy link
Labels
part:docsAffects the documentationAffects the documentationpart:microgridAffects the interactions with the microgridAffects the interactions with the microgridpriority:❓We need to figure out how soon this should be addressedWe need to figure out how soon this should be addressedtype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Description
What happened?
I would like to receive pv power on every update of pv power or its bounds.
I receive power status from pv_pool.power_status.new_receiver() but until I send pv_pool.propose_power, the target_power is None.
Also on every update pv status is send 2 times. I expect 1 message per update.
async def main():
await initialize_microgrid()
pv_pool = microgrid.new_pv_pool(priority=1)
pv_power = pv_pool.power.new_receiver()
pv_status = pv_pool.power_status.new_receiver()
counter = 0
async for selected in select(pv_power, pv_status):
if selected_from(selected, pv_power):
print(f"PV power: {selected.message.value}")
elif selected_from(selected, pv_status):
print(f"PV status: {selected.message}")
counter += 1
if counter % 10 == 0:
await pv_pool.propose_power(Power.from_watts(-counter))Logs:
PV status: _Report(target_power=None, _inclusion_bounds=Bounds(lower=Power(value=-30000.0, exponent=0), upper=Power(value=0.0, exponent=0)), _exclusion_bounds=Bounds(lower=Power(value=0.0, exponent=0), upper=Power(value=0.0, exponent=0)))
PV status: _Report(target_power=None, _inclusion_bounds=Bounds(lower=Power(value=-60000.0, exponent=0), upper=Power(value=0.0, exponent=0)), _exclusion_bounds=Bounds(lower=Power(value=0.0, exponent=0), upper=Power(value=0.0, exponent=0)))
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV power: -39 kW
PV status: _Report(target_power=Power(value=-10.0, exponent=0), _inclusion_bounds=Bounds(lower=Power(value=-60000.0, exponent=0), upper=Power(value=0.0, exponent=0)), _exclusion_bounds=Bounds(lower=Power(value=0.0, exponent=0), upper=Power(value=0.0, exponent=0)))
PV status: _Report(target_power=Power(value=-10.0, exponent=0), _inclusion_bounds=Bounds(lower=Power(value=-60000.0, exponent=0), upper=Power(value=0.0, exponent=0)), _exclusion_bounds=Bounds(lower=Power(value=0.0, exponent=0), upper=Power(value=0.0, exponent=0)))
What did you expect instead?
target_powerhas correct pv power since startup. (not None)- I expect 1 message per update.
Affected version(s)
v1.0.0-rc1200, v1.0.0-rc1300,
Affected part(s)
Microgrid (API, component graph, etc.) (part:microgrid)
Extra information
No response
Metadata
Metadata
Assignees
Labels
part:docsAffects the documentationAffects the documentationpart:microgridAffects the interactions with the microgridAffects the interactions with the microgridpriority:❓We need to figure out how soon this should be addressedWe need to figure out how soon this should be addressedtype:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Type
Projects
Status
To do