You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Formula composition is now done by composing FormulaEngine instances.
Automatic formulas from the logical meter and *pools, are now properties, and return FormulaEngine instances, which can be composed further, or can provide a receiver to fetch values.
This allows controlling the granularity of the samples to be stored in the underlying buffer.
Note that the parameter sampling_period has been renamed to input_sampling_period to better distinguish it from the sampling period parameter in the resampler_config.
Rename the constructor argument window_alignment to align_to and change the default to UNIX_EPOCH. This is to make it more consistent with the ResamplerConfig.
Resampler
The ResamplerConfig class is now publicly available in the frequenz.sdk.timeseries package.
The ResamplerConfig now takes the resampling period as a timedelta. The configuration was renamed from resampling_period_s to resampling_period accordingly.
The SourceProperties of the resampler now uses a timedelta for the input sampling period. The attribute was renamed from sampling_period_s to sampling_period accordingly.
The periods are now aligned to the UNIX_EPOCH by default.
To use the old behaviour (aligning to the time the resampler was created), pass align_to=None to the ResamplerConfig.
Update the ordered ring buffer used by the MovingWindow to fix the len() function so that it returns a value equal to or greater than zero, as expected (Fix len() of the OrderedRingBuffer #274)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Release Notes
Summary
Upgrading
Battery power is no longer available through the
LogicalMeter, but through theBatteryPool(Addpowerformula toBatteryPool#338)Formulas composition has changed (Make FormulaEngine instances composable, instead of FormulaReceivers #327)
FormulaEngineinstances, which can be composed further, or can provide a receiver to fetch values.Update
BatteryStatusto mark battery with unknown capacity as not working (Check battery capacity in BatteryStatus #263)The channels dependency was updated to v0.14.0 (Update SDK dependency of channels to the new release 0.14 #292)
Some properties for
PowerDistributingActorresults were renamed to be more consistent betweenSuccessandPartialFailure:Success.used_batteriesproperty was renamed tosucceeded_batteries.PartialFailure.success_batteriesproperty was renamed tosucceeded_batteries.succeed_powerproperty was renamed tosucceeded_powerfor bothSuccessandPartialFailure.MovingWindowThe class is now publicly available in the
frequenz.sdk.timeseriespackage.Accept the
sizeparameter astimedeltainstead ofint(Add resampler to MovingWindow #269).This change allows users to define the time span of the moving window more intuitively, representing the duration over which samples will be stored.
The input data will be resampled if a
resampler_configis passed (Add resampler to MovingWindow #269).This allows controlling the granularity of the samples to be stored in the underlying buffer.
Note that the parameter
sampling_periodhas been renamed toinput_sampling_periodto better distinguish it from the sampling period parameter in theresampler_config.Rename the constructor argument
window_alignmenttoalign_toand change the default toUNIX_EPOCH. This is to make it more consistent with theResamplerConfig.ResamplerThe
ResamplerConfigclass is now publicly available in thefrequenz.sdk.timeseriespackage.The
ResamplerConfignow takes the resampling period as atimedelta. The configuration was renamed fromresampling_period_storesampling_periodaccordingly.The
SourcePropertiesof the resampler now uses atimedeltafor the input sampling period. The attribute was renamed fromsampling_period_stosampling_periodaccordingly.The periods are now aligned to the
UNIX_EPOCHby default.To use the old behaviour (aligning to the time the resampler was created), pass
align_to=Noneto theResamplerConfig.New Features
The core data-pipeline actors are now created automatically (Add a
DataPipelineimplementation #270).This eliminates a lot of boiler plate code and makes it much simpler to deploy apps.
For example:
The
Resultclass (and subclasses) for thePowerDistributingActorare nowdataclasses, so logging them will produce a more detailed output.The
Resamplercan now can align the resampling period to an arbitrarydatetime.This can be configured via the new
align_tooption in theResamplerConfig. By default the resampling period is aligned to theUNIX_EPOCH.Bug Fixes
Change
PowerDistributorto use all batteries when none are working (Use all batteries when none are working in PowerDistributor #258)Update the ordered ring buffer used by the
MovingWindowto fix thelen()function so that it returns a value equal to or greater than zero, as expected (Fix len() of the OrderedRingBuffer #274)What's Changed
DataPipelineimplementation by @shsms in Add aDataPipelineimplementation #270Results by @leandro-lucarella-frequenz in Refactor power distributor'sResults #305component_datamethod to EVChargerPool by @shsms in Addcomponent_datamethod to EVChargerPool #266EVChargerPool.set_boundsmethod for setting current bounds by @shsms in Add aEVChargerPool.set_boundsmethod for setting current bounds #297sdk.microgridby @sahas-subramanian-frequenz in Expose BatteryPool and PowerDistributingHandle fromsdk.microgrid#323BatteryPooltests, examples to usemicrogrid.battery_pool()by @sahas-subramanian-frequenz in UpdateBatteryPooltests, examples to usemicrogrid.battery_pool()#336powerformula toBatteryPoolby @sahas-subramanian-frequenz in Addpowerformula toBatteryPool#338_loggerby @sahas-subramanian-frequenz in Rename custom loggers to_logger#347align_toand make them default toUNIX_EPOCHby @leandro-lucarella-frequenz in Rename alignment arguments toalign_toand make them default toUNIX_EPOCH#349MovingWindowpublic and remove public mentions to theRingBufferby @leandro-lucarella-frequenz in Make theMovingWindowpublic and remove public mentions to theRingBuffer#355New Contributors
Full Changelog: v0.19.0...v0.20.0
This discussion was created from the release v0.20.0.
Beta Was this translation helpful? Give feedback.
All reactions