Changelog¶
3.1.7 - 2026-04-24¶
Authors: Nicole Tometich
- Other bug fixes due to polars type behaviour. Guess: Some update on polars.
- Bug fix on
FeatureCalcSolarUnclippedPower_compute() method. - Bug fix on
SolarEnergyLossResourcecalculate() method.
3.1.6 - 2026-04-24¶
Authors: Nicole Tometich
- Bug fix in
SolarEnergyLossTrackercalculate() method, to correctly deal in case all numbers are null. - Minor fix on
JobBazeInsertAllocon _run_step() method to try to avoid duplicaded inserts, when possibly two process are running an allocation at the same time.
3.1.5 - 2026-04-18¶
Authors: Bruno Macedo
- Internal refactoring and minor bug fixes.
- Added
join_on_timestampandfreq_to_polars_intervalhelpers to_polars_utils.py; deduplicated all inline join loops and the ad-hocfreq.replacecall infeature_calc_core. CalculationRequirement._bazeis now a lazy property, avoiding unnecessary Bazefield connections on init.- Added
_parse_period_parameters()helper toJobInstanceto remove duplicated datetime-parsing boilerplate from every subclass. - Several small bug fixes:
AlarmCalculatorsettings guard (and→or),JobHandler._get_jobsreadingself.job_idsbefore it was set,fut.result()called twice inJobHandler.run().
3.1.4 - 2026-04-17¶
Authors: Enzo Tonelli
- Potential bugfix on
FeatureCalcSolarResourceMet. Null timestamps of "NebulaState_5min.AVG" are filled with previous values, avoiding incorrect invalidations
3.1.3 - 2026-04-17¶
Authors: Enzo Tonelli
- Change on
FeatureCalcSolarResourceMet. Small data gaps (<=15min) are now interpolated. Larger gaps are kept null.
3.1.2 - 2026-04-16¶
Authors: Enzo Tonelli
FeatureCalcSolarResourceMetimprovement. Now the calculated values are inserted automatically in Bazefield as a custom point tags
3.1.1 - 2026-04-16¶
Authors: Enzo Tonelli
- Fixing an error with last version commit - init module was importing a not implemented class
3.1.0 - 2026-04-15¶
Authors: Enzo Tonelli
- Added a new class
FeatureCalcSolarResourceMetto validate solar resource as a feature, to optimize monthly closing process
3.0.4 - 2026-04-14¶
Authors: Nicole Tometich
- Change on
JobBazeInsertAlloccreate_step() method to deal with dataframe input for allocations insert -> to use a new feature from echo-baze that allows it, making the insert by threads - Bug fix on
RequiredFeaturesdo_check() method to properly check the existence of bazefield and postgres features
3.0.3 - 2026-04-10¶
Authors: Nicole Tometich
- Bug fix on
SolarEnergyLossStringscalculate() method to avoid errors when data is null
3.0.2 - 2026-04-06¶
Authors: Bruno Macedo
- Bug fix for
FeatureCalcPowerCP— optionalRequiredFeatureswith no data no longer raises a false "not queried" error. - Added
fetchedattribute toCalculationRequirementto distinguish "never fetched" from "fetched but returned no data".
3.0.1 - 2026-04-06¶
Authors: Bruno Macedo
Summary: Bug fixes for CalculationHandler parallel execution — resolves deadlocks observed in Airflow Celery workers caused by concurrent echo-postgres access and GIL + Rayon thread-pool contention. Default max_workers changed to 1 (sequential) for safety.
Bug Fixes¶
CalculationHandler — parallel execution deadlocks¶
Extensive debugging via py-spy identified several deadlock mechanisms when max_workers > 1 was used inside Airflow Celery workers (forked processes with POLARS_MAX_THREADS=1). All root causes trace back to echo-postgres having class-level shared DataFrame state that is not thread-safe, combined with GIL + Rayon thread-pool contention in Polars.
Fixes applied:
-
FeatureCalculator.__init__moved to main thread._create_feature_calc()now pre-creates allFeatureCalculatorinstances sequentially on the main thread before submitting work toThreadPoolExecutor. Previously,__init__calledecho-postgres(features.definitions.get,objects.instances.get) from worker threads simultaneously, deadlocking on shared class-level cached DataFrames. -
FeatureCalcEvalExpression._computeecho-postgres calls moved to__init__.get_features_in_expressionandreplace_object_attributes_in_expression(which callecho-postgresinternally) were being invoked from worker threads inside_compute. These are now resolved in__init__(main thread) and stored as_required_features,_eval_expression_resolved, and_round_timestamps. TheRequiredFeaturesrequirement is also registered in__init__;_computeonly calls_fetch_requirements(period=...)for time-series data. -
_merge_resultdeferred until afterexecutor.shutdown(). Previously,_merge_resultwas called inside theas_completedloop while worker threads were still running._merge_resulttriggers Polars operations (filter,concat) and DB saves (insert→cast_attributes→to_pandas). The main thread doingto_pandas(which releases the GIL and enters the Rayon pool) while workers also call Polars creates a GIL + Rayon circular wait. Results are now collected duringas_completedand processed after all workers have exited. -
self._features.filter()removed from worker threads. Three occurrences of filtering the sharedself._featuresDataFrame inside_calculate_single_objectwere eliminated: the logging setup (now uses pre-computedselected_objects/obj_modelslists passed as parameters) and the extra-features deduplication (now deferred to_merge_resulton the main thread). -
CalculationRequirementcache changed from class-level to per-thread. The_cachedict and_cache_lockinCalculationRequirement.__init_subclass__have been replaced with athreading.localinstance (_cache_local). Each thread now gets its own isolated cache dict, eliminating all cross-thread DataFrame sharing in requirement checks. No locking is required. -
Thread-local
_perfdbinCalculationHandler. The single sharedPerfDBinstance inCalculationHandler.__init__has been replaced with a lazily-created, per-thread instance viathreading.local. This ensures each worker thread has its own database connection and its ownecho-postgresinstance-level state.
CalculationHandler.calculate — max_workers default and guards¶
-
Default changed from
4to1(sequential). The previous default caused silent deadlocks in Airflow Celery workers.max_workers > 1remains available as an explicit opt-in for non-forked environments where no eval-expression features callecho-postgresat compute time. -
Fork detection improved. The previous PID-comparison approach (
_MODULE_PID = os.getpid()) failed silently whenecho-energycalcwas imported after the fork (which is exactly what Airflow Celery workers do). Replaced withos.register_at_fork(after_in_child=...), which fires reliably at fork time regardless of import order. -
POLARS_MAX_THREADS > 1guard retained. With multiple Rayon threads, a Rayon worker executing on behalf of one Python thread can steal a Python-callable task from another thread'sPOOL.install()scope and deadlock onPyGILState_Ensure. IncreasingPOLARS_MAX_THREADSdoes not fix this — Rayon work-stealing is non-deterministic and the deadlock probability is never zero.POLARS_MAX_THREADS=1is the only safe configuration formax_workers > 1.
feature_calc_core.py — error message fix¶
- Fixed a minor bug in
_requirement_data("RequiredFeatures")where the error message referencedrequirement.feature(which does not exist on the base class) instead ofrequirement(the__repr__of the requirement object).
Known Limitations¶
max_workers > 1 remains unsafe when any of the calculated features have server_calc_type = "expression_evaluation" and their expression strings call echo-postgres functions through helpers such as filters.power_curve_offset_filter. These calls happen inside exec() at compute time and cannot be pre-fetched on the main thread. The root fix requires echo-postgres to make its class-level DataFrame caches thread-safe (see the open issue filed against echo-postgres).
3.0.0 - 2026-04-06¶
Authors: Bruno Macedo
Summary: Major refactor migrating the internal data model from pandas to Polars, introducing auto-registration for all calculator and job types, and decomposing CalculationHandler into composable mixins. This release contains breaking API changes.
Breaking Changes¶
Pandas → Polars migration¶
FeatureCalculator.resultnow returnspl.DataFrame | Noneinstead ofpd.Series | pd.DataFrame | None.- All feature calculators must return a Polars DataFrame from
_compute(). - Result DataFrames must contain a
"timestamp"column; feature value columns use bare names (e.g."wind_speed").
- All feature calculators must return a Polars DataFrame from
CalculationHandlercached data uses a flat Polars DataFrame with"object@feature"column naming convention instead of a pandas MultiIndex DataFrame._get_cached_data()returnspl.DataFrame._remove_cached_data()accepts the same column-name contract.
AlarmCalcThreshold._compute()cached_dataparameter is nowdict[str, pl.DataFrame]instead of a pandas dict.
FeatureCalculator subclass contract changed¶
- Subclasses must implement
_compute()instead of overridingcalculate().calculate()is now a non-overridable template that calls_compute(), stores the result and triggers save.
_get_required_data()renamed to_fetch_requirements()._get_requirement_data()renamed to_requirement_data().resultproperty type is nowpl.DataFrame | None(see above).
CalculationRequirement subclass contract changed¶
- Subclasses must implement
_do_check()instead ofcheck().check()is now a concrete template method with built-in caching and thread-safety logic.
- Three new optional hooks for class-level caching:
_check_cache_key(),_get_cache_value(),_set_from_cache().
CalculationHandler decomposed into mixins¶
CalculationHandleris now assembled from three focused mixins:_FeatureEnumeratorMixin— discovers which features to calculate for which objects._ResultCacheMixin— manages in-memory calculation results (Polars-based)._ResultPersisterMixin— saves results to performance_db.
__init__now calls_enumerate_features()and_init_cache()explicitly; previous monolithic logic is gone.
Removed: feature_calc_common.py¶
FeatureCalcEvalExpression,FeatureCalcObjectAggregation, andFeatureCalcSpeAggregationhave been moved to their own dedicated modules and are still exported from the top-level package.
constants.py no longer requires manual registration¶
FEATURE_CALC_CLASS_MAPPINGandJOB_TYPE_CLASS_MAPPINGare now auto-populated from subclass registries.- All previous explicit imports of concrete classes in
constants.pyhave been removed. - Adding a new calculator requires only defining
_nameon the class — no edits toconstants.py.
New Features¶
Auto-registration system¶
FeatureCalculator,JobInstance, andCalculationRequirementsubclasses now self-register via__init_subclass__().- Defining a
_nameclass attribute automatically adds the class to the corresponding_registrydict. constants.pyusespkgutil.iter_modules()to auto-import all modules matching prefixesfeature_calc_*,solar_energy_loss_*,job_instance_*,alarm_calc_*at startup.
New modules (split out from feature_calc_common.py)¶
feature_calc_eval_expression.py—FeatureCalcEvalExpression: evaluates mathematical expressions in an isolated namespace.feature_calc_object_aggregation.py—FeatureCalcObjectAggregation: aggregates features from multiple objects with optional scaling; supportsavg,sum,max,min,median,std,var,count,feature_eval_expression.feature_calc_spe_aggregation.py—FeatureCalcSpeAggregation: aggregates child-object features within an SPE, discovering children automatically from thespe_namerelationship.
New utility modules¶
feature_calc_utils.py— shared utilities exported from the package:apply_aggregation(): common aggregation logic used by object/SPE aggregation calculators.nan_span(): finds theDateTimeRangespanning null values in a series.
_polars_utils.py— internal pandas↔Polars conversion helpers:pandas_mi_to_polars(): converts MultiIndex DataFrames to flat Polars with"object@feature"column names.polars_to_pandas_mi(): inverse conversion.
solar_energy_loss_calc.py—SolarEnergyLossCalculator: new base class for all solar energy loss calculators, providing shared model-loading logic (_setup_model_from_feature_options()).feature_calc_power_theoretical_base.py— new base class extracting shared logic from the power-theoretical family of calculators.
Thread-safe requirement caching¶
- Each
CalculationRequirementsubclass now has a class-level_cachedict and_cache_lock. - Static (period-independent) data is fetched once per process and reused across parallel threads, eliminating redundant DB queries.
New constants¶
MAX_RELATIVE_WIND_DIRECTION_DEG(= 30°): maximum yaw deviation considered valid for power curve prediction.TURBINE_MAST_FEATURE_CONVERSION: mapping from turbine feature names to their met-mast equivalents, used when falling back to mast data in power-theoretical calculations.
Night-mask utility on FeatureCalculator¶
- New static method
_get_night_mask(timestamps, latitude, longitude, utc_offset_hours)returns a boolean Polars Series masking nighttime timestamps. Used internally by solar calculators.
Environment-variable configuration¶
MAX_MEMORY_USAGEcan now be overridden at deployment time via theECHO_ENERGYCALC_MAX_MEMORY_MBenvironment variable (defaults to 1024 MB).
Improvements & Refactoring¶
CalculationHandlerfeature enumeration now issues a single batched DB query for all object models instead of one query per model, then uses a Polars join to expand results per object.- Result caching uses Polars
join(..., how="full", coalesce=True)instead of pandas outer merge, reducing memory overhead. AlarmCalcThresholdrefactored to use Polars lazy evaluation throughout; fixed long-standing variable name typo inthreshold_type.feature_calc_core.pydocstring completely rewritten with a numbered subclass contract, data-convention section, and a minimal working example.calculation_requirements_core.pydocstring expanded to document caching strategy, thread-safety guarantees, and the validation-vs-data-fetch separation.constants.pymodule docstring explains the auto-discovery mechanism and how to add new calculator types without editing the file.- Added
_adjust_features()hook onFeatureCalculatorfor subclasses to post-process results before they are stored.
New Files¶
| File | Description |
|---|---|
echo_energycalc/_polars_utils.py |
Internal pandas↔Polars conversion utilities |
echo_energycalc/feature_calc_eval_expression.py |
FeatureCalcEvalExpression (moved from feature_calc_common) |
echo_energycalc/feature_calc_object_aggregation.py |
FeatureCalcObjectAggregation (moved from feature_calc_common) |
echo_energycalc/feature_calc_spe_aggregation.py |
FeatureCalcSpeAggregation (moved from feature_calc_common) |
echo_energycalc/feature_calc_utils.py |
apply_aggregation, nan_span utilities |
echo_energycalc/feature_calc_power_theoretical_base.py |
Base class for power-theoretical calculator family |
echo_energycalc/solar_energy_loss_calc.py |
SolarEnergyLossCalculator base class |
docs/developer_guide.md |
Architecture and contribution guidelines |
CLAUDE.md |
Project context for Claude Code |
.github/ |
GitHub Actions CI/CD workflows |
Removed Files¶
| File | Reason |
|---|---|
echo_energycalc/feature_calc_common.py |
Contents split into dedicated modules (see above) |
Migration Guide¶
- Custom
FeatureCalculatorsubclasses: - Rename
calculate()→_compute(). - Return
pl.DataFramewith a"timestamp"column and bare feature-name columns. -
Replace
_get_required_data(...)calls with_fetch_requirements(...). -
Custom
CalculationRequirementsubclasses: - Rename
check()→_do_check(). -
Optionally implement
_check_cache_key()/_get_cache_value()/_set_from_cache()for static data caching. -
Custom
AlarmCalculatorsubclasses: - Rename
calculate()→_compute(). -
Update
cached_datahandling to usepl.DataFramewith"object@feature"columns. -
constants.py/ class registration: - Remove any manual entries from
FEATURE_CALC_CLASS_MAPPINGorJOB_TYPE_CLASS_MAPPING. -
Ensure your module name starts with one of the discovery prefixes and the class defines
_name. -
Cached data access:
- Replace MultiIndex pandas column access (
df[("object", "feature")]) with flat Polars column access (df["object@feature"]).
2.22.2 - 2026-03-30¶
Authors: Bruno Macedo
Changes:
- Minor changes in
JobBazeInsertAlloc.- Now uses
job_step_intervalfrombaze_allocation_insertsection. - Changed default comment for the allocation to "Allocation created by Performance Server Job" instead of "Synced from BoP allocation (Performance API)".
- Now uses
2.22.1 - 2026-03-25¶
Authors: Nicole Tometich
Changes:
- Minor bug on
JobBazeInsertAllocwhen only "parent" is defined on object_filter to create jobs
2.22.0 - 2026-03-25¶
Authors: Nicole Tometich
Changes:
- Added a new class
JobBazeInsertAllocto create new job instances with Bazefield Insert Allocation type
2.21.12 - 2026-03-24¶
Authors: Bruno Macedo
Changes:
- Minor bug fixes.
2.21.11 - 2026-03-24¶
Authors: Nicole Oska
Changes:
- Minor adjustments on
Yawto fix the bug due numpy version. - Adjustments on get_area_and_pc_df to don't generate empty data frames.
2.21.10 - 2026-03-19¶
Authors: Nicole Tometich
Changes:
- Minor adjustments on
SolarEnergyLossStringsandFeatureCalcSolarUnclippedPowerto prevent bugs on daily recalculation - Adjustment on RBG soiling logic to be more precise
2.21.9 - 2026-02-11¶
Authors: Enzo Tonelli
Changes:
- Another adjustment to fix the same bug on
SolarEnergyLossStringsdue to Pandas 3.0.0.
2.21.8 - 2026-02-11¶
Authors: Enzo Tonelli
Changes:
- Minor bug adjustment on
SolarEnergyLossStringsdue to Pandas 3.0.0.
2.21.7 - 2026-02-05¶
Authors: Nicole Oska
Changes:
- Minor bug adjustment on
calc_ge_contractual_curtailment_loss.
2.21.6 - 2026-01-29¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on
FeatureCalcEvalExpressiondue to Pandas new version.
2.21.5 - 2026-01-26¶
Authors: Nicole Tometich
Changes:
- Change in the
SolarEnergyLossStringsclass, now it has a second verification for frozen values (in case CommunicationState_5min.REP is not reflecting the reality)
2.21.4 - 2026-01-21¶
Authors: Nicole Oska
Changes:
- Change in the
PowerCurve- update_power_curves() to plot trained data, instead raw data.
2.21.3 - 2026-01-09¶
Authors: Nicole Tometich
Changes:
- Change on
SolarEnergyLossTrackercalculate() to avoid index error when we have missing timestamps
2.21.2 - 2026-01-08¶
Authors: Nicole Tometich
Changes:
- Change on
SolarEnergyLossResourcecalculate() method to consider different PXX values through years
2.21.1 - 2026-01-08¶
Authors: Nicole Tometich
Changes:
- Minor change in
SolarEnergyLossSoilingcalculate() method to correctly calculate soiling tendency throughout the months
2.21.0 - 2025-12-22¶
Authors: Bruno Macedo
Changes:
- Upgraded to Python 3.13.
2.20.26 - 2025-12-16¶
Authors: Nicole Tometich
Changes:
- Now
SolarEnergyLossResourceapplies the expected solar_irradiance_poa from target P50 in the predictive model. That way we compare the same bases and varies only the resource, achieving a reasonable value of loss/gain of energy. - Minor change on
calc_retroactive_unclipped_power, changing how the function deal with periods below the 90 regression days.
2.20.25 - 2025-12-12¶
Authors: Nicole Tometich
Changes:
- Important changes in
SolarEnergyLossStringsto prevent negative losses.
2.20.24 - 2025-12-11¶
Authors: Nicole Tometich
Changes:
- Change in
FeatureCalcSolarClippingStatecalculate method for ClippingState_5min.REP to consider Theoretical Active Power instead of ActivePower.MAX during periods of curtailment (CurtailmentState =1) and/or stopped inverter (IEC-OperationState = 1). - Also minor changes in documentation.
2.20.23 - 2025-12-10¶
Authors: Nicole Tometich
Changes:
SolarEnergyLossSoilingclass now deletes historical data before upload the new SR results. Also a turnaround is done whenever we loose data from the soiling stations for more than 3 days.- Unclipped Active Power Calculation:
- calc_unclipped_pwr_regression now consider all range of irradiance from 0W/m2 to 850 W/m2.
- calc_retroactive_unclipped_power considers a date range of 40 days instead of 15 to increase data availability.
- regression does not have a constant, so the linear regression is y=coef*x This is done so that the linear regression passes through 0.
- adjustments done in
FeatureCalcSolarUnclippedPowerto consider the new linear regression coefficients.
2.20.22 - 2025-12-03¶
Authors: Nicole Tometich
Changes:
- Another minor adjustment in solar_unclipped_regression.py calc_unclipped_pwr_regression() method to not consider for the regression periods where the inverter is on the majority of time stopped/no communication.
2.20.21 - 2025-12-03¶
Authors: Nicole Tometich
Changes:
- Adjustment in solar_unclipped_regression.py calc_unclipped_pwr_regression() method to not consider for the regression periods where the inverter is 100% stopped/no communication.
2.20.20 - 2025-12-02¶
Authors: Nicole Tometich
Changes:
- Another adjustment in solar_unclipped_regression.py to restrict the regression to only high irradiance levels, since the previous profile were not corresponding to the expected relation between irradiance and Unclipped Power (when comparing with PVSyst simulation)
- Also, prevented the Unclipped Regression to have negative values
2.20.19 - 2025-12-01¶
Authors: Nicole Tometich
Changes:
- Adjustment in solar_unclipped_regression.py considering a similar methodology that was used in "pós-op" calculations. Also an adjustment in calc_retroactive_unclipped_power
2.20.18 - 2025-11-26¶
Authors: Nicole Tometich
Changes:
- Adjustment in
FeatureCalcSolarClippingStatecalculate() method to consider possible clipping during curtailment times as well.
2.20.17 - 2025-11-23¶
Authors: Bruno Macedo
Changes:
- Removed deprecated functionality related to gamesa blade gap sensors.
2.20.16 - 2025-11-19¶
Authors: Nicole Tometich
Changes:
- Adjustments in
SolarEnergyLossResourceandSolarEnergyLossModuleTemperaturelogic. Also, both logics set loss/gain to zero during night times acoording to pvlib coordinates. - Now
SolarEnergyLossModuleTemperaturereturns a value in daily kWmed. - Now
SolarEnergyLossResourcereturns a value in daily kWmed. - Bug fix in
SolarEnergyLossStringswhen dealing with strings that are open during the whole day.
2.20.15 - 2025-11-17¶
Authors: Nicole Tometich
Changes:
- Adjustments in
SolarEnergyLossResourceandSolarEnergyLossModuleTemperaturelogic. - Now
SolarEnergyLossModuleTemperaturepredctive model returns a temperature loss factor that is multiplied by the theoretical power to get temperature loss. - Adjustment on how the target energy is gathered
SolarEnergyLossResource.
2.20.14 - 2025-11-12¶
Authors: Bruno Macedo
Changes:
- Bug fix in
AlarmCalcThresholddue to changes inperfdb.features.values.whenatcondition.
2.20.13 - 2025-11-11¶
Authors: Nicole Tometich
Changes:
- Bug fix in
SolarEnergyLossStringslogic to correctly make the conversion from dc_loss to ac_loss. Now the AC power is clipped according to ActivePowerPercent on each timestamp. - Redundant logic on
SolarEnergyLossResourceto avoid errors regarding list-like indexes that randomly happened when launching calc on airflow containers.
2.20.12 - 2025-10-27¶
Authors: Nicole Oska
Changes:
- Adjustment in
FeatureCalcPowerTheoreticalVestasto return a DataFrame with "ActivePowerTheoreticalContractual_10min.AVG" and "ActivePowerTheoreticalContractualStep_10min.REP" features.
2.20.11 - 2025-10-17¶
Authors: Nicole Oska
Changes:
- Adjustment in
ge_power_upto handle turbines without data in the period.
2.20.10 - 2025-10-15¶
Authors: Enzo Tonelli
Changes:
- Adjustment in
SolarEnergyLossStringsto not disconsider curtailment timestamps when calculating shading and underperf losses
2.20.9 - 2025-10-14¶
Authors: Nicole Oska
Changes:
- Adjustment in
feature_calc_power_theoreticalto only consider data on step 2 when there is no curtailment.
2.20.8 - 2025-10-13¶
Authors: Nicole Tometich
Changes:
- Adjustment in
SolarEnergyLossStringsandSolarEnergyLossTrackerto zero the losses whenever the inverter is stopped (IEC-OperationState_5min.REP < 2)
2.20.7 - 2025-10-13¶
Authors: Enzo Tonelli
Changes:
- Changes in
SolarEnergyLossStrings: Solar open strings loss now calculates all kinds of string losses (Open strings + Underperformance + Shading)
2.20.6 - 2025-10-10¶
Authors: Nicole Oska
Changes:
- Small adjustment in
filters.flatline_filter, to also consider a variation equal to and not just smaller than the thresh for n consecutive periods.
2.20.5 - 2025-10-09¶
Authors: Nicole Oska
Changes:
filters.flatline_filteradapted to handle polar type df as input
2.20.4 - 2025-10-09¶
Authors: Bruno Macedo
Changes:
- Improvements in
JobBazeTagDelete
2.20.3 - 2025-10-08¶
Authors: Bruno Macedo
Changes:
- Bug fixes in
JobHandler.
2.20.2 - 2025-10-03¶
Authors: Nicole Tometich
Changes:
- Adjustment on
SolarEnergyLossSoilingto correctly calculate soiling loss for RBG site
2.20.1 - 2025-10-03¶
Authors: Nicole Oska
Changes:
- Small bug fixed due to Echo-Baze library update
2.20.0 - 2025-10-01¶
Authors: Nicole Tometich
Changes:
- Added
SolarEnergyLossSoilingclass to calculate soiling losses on solar sites.
2.19.1 - 2025-09-30¶
Authors: Enzo Tonelli
Changes:
- Fix to
SolarEnergyLossTracker: When all neighbor inverters are misaligned, the reference power is the max power among them.
2.19.0 - 2025-09-28¶
Authors: Bruno Macedo
Changes:
- Added
JobBazeTagDeleteclass to delete Bazefield tags from Bazefield historian and database. - Improvement on jobs documentation.
- Better organized test files.
2.18.0 - 2025-09-15¶
Authors: Enzo Tonelli
Changes:
- Added
SolarEnergyLossTrackerclass to calculate the solar energy gain / loss due to tracker misalignment - Minor fix to strings losses markdown text
2.17.2 - 2025-09-11¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on
SolarEnergyLossModuleTemperatureto not clip negative values as 0. Since, we want to capture gains due to module temperature as well.
2.17.1 - 2025-09-11¶
Authors: Bruno Macedo
Changes:
- Minor fix to remove pandas deprecation warning in Calculation Handler.
2.17.0 - 2025-09-10¶
Authors: Nicole Tometich
Changes:
- Adjustment on
SolarEnergyLossResourceto use only IrradiancePOA as model input - Added
SolarEnergyLossModuleTemperatureclass to calculate the solar energy gain / loss due to Module Temperature
2.16.6 - 2025-09-03¶
Authors: Nicole Tometich
Changes:
- Improvement on
FeatureCalcPowerTheoreticalSolarto deal with moments that we have missing values and 0 on IrradiancePOACommOK
2.16.5 - 2025-09-01¶
Authors: Nicole Tometich
Changes:
- Improvement on
SolarEnergyLossStringslogic. Now we attribute 0 energy loss when we have Communication problem in an inverter.
2.16.4 - 2025-08-27¶
Authors: Nicole Tometich
Changes:
- Improvement on
SolarEnergyLossStringslogic. Now the average mean is explicitly excluding 0 values from the operational string mean power.
2.16.3 - 2025-08-27¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on
SolarEnergyLossStringsdata treatment. Adjustment made to correctly deal with missing timestamps due to current TOTALIZER behaviour.
2.16.2 - 2025-08-26¶
Authors: Nicole Tometich
Changes:
- Added a mahalanobis filter on solar_unclipped_regression to filter remain outliers.
- Improvement of filters when getting regression coefficients.
2.16.1 - 2025-08-22¶
Authors: Nicole Tometich
Changes:
- Added statsmodels as library dependency.
2.16.0 - 2025-08-22¶
Authors: Nicole Tometich
Changes:
- Added
FeatureCalcSolarUnclippedPowerclass to calculate ActivePowerUnclipped based on linear regression saved on inverter attributeunclipped_pwr_regression - Added
solar_unclipped_regressionfile with methods to calculate linear regression for current period and for retrival periods. - Adjustment on
FeatureCalcEvalExpressionto define round_timestamps parameters when acquiring a tag from bazefield.
2.15.3 - 2025-08-21¶
Authors: Bruno Macedo
Changes:
- Minor bug fix in data types of
std_filterto avoid errors.
2.15.2 - 2025-08-14¶
Authors: Bruno Macedo
Changes:
- Added nominal power clipping in
FeatureCalcPowerTheoretical.
2.15.1 - 2025-08-07¶
Authors: Nicole Tometich
Changes:
- Adjustment on constants so the CalculationHandler can recognize the FeatureCalcSolarClippingState logic.
2.15.0 - 2025-08-07¶
Authors: Nicole Tometich
Changes:
- Implementation of a new subclass
FeatureCalcSolarClippingStateto calculate the feature ClippingState_5min.REP for the inverters.
2.14.4 - 2025-08-05¶
Authors: Nicole Tometich
Changes:
- Improvement on
SolarEnergyLossStringslogic to always consider the period starting at 00:00 and ending at 23:59 to perform the calculation of down daily strings correctly.
2.14.3 - 2025-07-23¶
Authors: Nicole Tometich
Changes:
- Improvement on
SolarEnergyLossStringslogic to avoid having negative energy loss values.
2.14.2 - 2025-07-22¶
Authors: Nicole Tometich
Changes:
- Improvement on
SolarEnergyLossStringslogic to optimize calculation performance.
2.14.1 - 2025-07-22¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on mkdocs documentation.
2.14.0 - 2025-07-22¶
Authors: Nicole Tometich
Changes:
- Implementation of a new subclass:
SolarEnergyLossStringsto calculate the loss due to open strings.
2.13.9 - 2025-07-14¶
Authors: Nicole Oska
Changes:
- Minnor bug fixed on ge_power_up.
2.13.8 - 2025-07-14¶
Authors: Bruno Macedo
Changes:
- Added option to ignore calculation of certain features per object based on
disabled_calculationsobject attribute.
2.13.7 - 2025-07-12¶
Authors: Bruno Macedo
Changes:
- Changed build backend to
uv_buildfor better packaging and deployment.
2.13.6 - 2025-07-09¶
Authors: Bruno Macedo
Changes:
- Removed more dependencies on echo-postgres and echo-baze < 2.0.
2.13.5 - 2025-07-06¶
Authors: Bruno Macedo
Changes:
- Removed
FEATURE_ORDERfromCalculationHandlerand moved it to database settings. - Added support for predictive models that output multiple features in
FeatureCalcPredictiveModel.
2.13.4 - 2025-07-01¶
Authors: Nicole Tometich
Changes:
- Implementation of two new classes regarding Advanced Solar Monitoring project:
SolarEnergyLossCalculatorandSolarEnergyLossResource SolarEnergyLossCalculatoris empty for now. But it will be useful in the future to implement similar logic to different losses typesSolarEnergyLossResourcehas all the logic to calculate and save loss/gain related to the irradiance and module temperature during the requested period.
2.13.3 - 2025-06-17¶
Authors: Bruno Macedo
Changes:
- Bug fix related to creation of distributed generation SPEs.
Version 2.13.2 - 2025-06-08¶
Authors: Bruno Macedo
Changes:
- Fixes due to removal of
methodkey inround_timestamps.
Version 2.13.1 - 2025-06-06¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on echo-baze point.series.get() function on 'feature_calc_power_theoretical_solar'
Version 2.13.0 - 2025-06-05¶
Authors: bruno Macedo
Changes:
- Added
FeatureCalcTimeseriesAmplitudeclass to calculate the amplitude of a timeseries.
Version 2.12.2 - 2025-06-04¶
Authors: Nicole Tometich
Changes:
- Adjustment on how data in treated when there is no ReactivePower_5min.AVG on 'feature_calc_power_theoretical_solar'.
Version 2.12.1 - 2025-05-22¶
Authors: Nicole Tometich
Changes:
- Minor adjustment on documentation format
Version 2.12.0 - 2025-05-22¶
Authors: Nicole Tometich
Changes:
- Implementation of FeatureCalcPowerTheoreticalSolar class to calculate solar power production using the trained predictive model.
- Adjustments on feature_calc_core and calculation_requirement_features to get the correct bazefield features / objects
Version 2.11.15 - 2025-04-22¶
Authors: Bruno Macedo
Changes:
- Minor bug fixes.
Version 2.11.14 - 2025-04-21¶
Authors: Bruno Macedo
Changes:
- Allows for Numpy 2.0.
Version 2.11.13 - 2025-04-08¶
Authors: Bruno Macedo
Changes:
- Optimizations when getting attributes of features and objects, reducing load on database and overhead on calculations.
JobInstancesnow allow to skip test jobs (ones withtestin it's description).
Version 2.11.12 - 2025-03-18¶
Authors: Bruno Macedo
Changes:
- Removed version specifier for kaleido as it was rewritten and current version works well.
Version 2.11.11 - 2025-02-19¶
Authors: Bruno Macedo
Changes:
- Added
TeleassistCommOk_5min.MODto default calculated features.
Version 2.11.10 - 2025-01-29¶
Authors: Bruno Macedo
Changes:
- Fixes related to feature name changes in the database to match Bazefield feature names.
Version 2.11.9 - 2024-01-22¶
Authors: Nicole Tometich
Changes:
- Minor bug fix in 'calculation_requirement_features.py'
Version 2.11.8 - 2024-01-21¶
Authors: Nicole Tometich
Changes:
- Included documentation regarding Bazefield tags defined on eval expression as "_b#"
- Included a turn around when a dataframe is nearly empty after curtailment filter on yaw analysis
- Included a condition to disconsider periods when points are concentrated only in a wind speed range during the selected period on yaw analysis
- Minor changes on yaw misalignment logic.
Version 2.11.7 - 2024-01-10¶
Authors: Nicole Tometich
Changes:
- Major changes in yaw.py
- Added filter on pitch range depending on wind turbine model range defined on perfdb
- Adjustment on power curve fit to "smoother" curve
- Adjustment on echo_postgres and echo_baze functions from legacy version to the new one
Version 2.11.6 - 2024-01-08¶
Authors: Nicole Tometich
Changes:
- Minor change on yaw.py regarding tag nomenclature in bazefield. From "WindDirection" to "WindDirectionRelative"
Version 2.11.5 - 2024-01-07¶
Authors: Nicole Tometich
Changes:
- Added resources on calculation_requirement_features to perform calculations using bazefield features. It has to be defined as 'bazefield_feature_b#' syntax on evaluating expression.
Version 2.11.4 - 2024-12-10¶
Authors: Bruno Macedo
Changes:
- Added
pdback tofeature_calc_commonto avoid break expression evaluation. - Fixed typo of aggregation in
FeatureCalcObjectAggregation.
Version 2.11.3 - 2024-12-10¶
Authors: Bruno Macedo
Changes:
- Minor bug fixes in alarm calculators related to Polars concatenation and end date handling.
Version 2.11.2 - 2024-12-09¶
Authors: Bruno Macedo
Changes:
AlarmCalculatornow raises an error if it's trying to insert alarms with zero duration.- Added option to return on
CalculationHandlerper object.
Version 2.11.1 - 2024-12-09¶
Authors: Bruno Macedo
Changes:
- Forced
AlarmCalculatorto delete alarms before inserting.
Version 2.11.0 - 2024-12-09¶
Authors: Bruno Macedo
Changes:
- Added
AlarmCalculatorbase class for handling alarms calculated in the server and implementedAlarmCalcThresholdfor alarms based on thresholds. - Added
JobInstancebase class for handling jobs and implementedJobAlarmCalcfor jobs related to alarms. - Added
JobHandlerclass to handle job calculations from multipleJobInstanceclasses. - Added
polarsas a dependency for faster data manipulation. - Documentation pending for the new classes.
Version 2.10.1 - 2024-11-22¶
Authors: Bruno Macedo
Changes:
- Minor bug fix in
CalculationHandlerregarding regex matching.
Version 2.10.0 - 2024-11-20¶
Authors: Bruno Macedo
Changes:
- Splitted
CalculationRequirementclasses into multiple files for better organization. - Added
RequiredVibrationDataandRequiredVibrationFrequenciesclasses. - Added
FeatureCalcSpectrumAmplitudeclass. - Added support for passing features as regex to
CalculationHandler. - Changed
FEATURE_ORDERto specify features using regex. - Added vibration features (cms) to
FEATURE_ORDER.
Version 2.9.0 - 2024-11-17¶
Authors: Bruno Macedo
Changes:
- Added extensive documentation using mkdocs.
- Removed remaining references to
echo-postgres1.0 from calculation requirements and feature calculators. - Deprecated
FeatureCalcMonthlyAggregationas it was not being used anymore and has outdated code.
Version 2.8.3 - 2024-08-01¶
Authors: Nicole Oska
Changes:
- Changed predicted_feature to update power curve in bazefield due an error.
Version 2.8.1 - 2024-07-14¶
Authors: Bruno Macedo
Changes:
- Changed time columns to remove _local due to database changes.
Version 2.8.1 - 2024-07-12¶
Authors: Bruno Macedo
Changes:
- Added
lost_powerfeatures as default for SPE calculations.
Version 2.8.0 - 2024-07-09¶
Authors: Bruno Macedo
Changes:
- Upgraded to python 3.12.
- Migrated power curve functionality to
echo-calcmodels.
Version 2.7.2 - 2024-06-30¶
Authors: Bruno Macedo
Changes:
calc_electrical_losses_curvenow upgraded to remove dependency on legacyecho-postgres.FeatureCalcPowerCPupgraded to change curve attribute name fromwtg_cptoasset_cp.
Version 2.7.1 - 2024-06-25¶
Authors: Bruno Macedo
Changes:
- Changed order of default calculations for wind farm to calculate
wind_speed_turbine_avgbefore thanwind_speed_reference. - Added last source of data to
wind_speed_referenceconsideringwind_speed_turbine_avgin case met mast data was not enough.
Version 2.7.0 - 2024-06-15¶
Authors: Bruno Macedo
Changes:
- Upgraded almost entire library to use newer version of
echo-postgres. Still missing the migration of time series related queries to Bazefield. - Performance improvements.
Version 2.6.16 - 2024-06-15¶
Authors: Bruno Macedo
Changes:
- Removed lost power allocations from default wind turbine features. It is not being used anymore. Class
RequiredBazefieldAllocationswas also removed, including all its references.
Version 2.6.15 - 2024-05-23¶
Authors: Bruno Macedo
Changes:
- Changed default allocations category type in
FeatureCalcLostPowerAlloc.
Version 2.6.14 - 2024-05-15¶
Authors: Bruno Macedo
Changes:
- Bug fix in
update_power_curvesrelated to Bazefield upload and model saving. - Bug fix in
FeatureCalcWFReferenceWSrelated to pandascombine_firstbug. - Adjusted test to use new object names.
- Refactor according to ruff and sourcery suggestions.
Version 2.6.13 - 2024-05-15¶
Authors: Nicole Tometich
Changes:
- Minor bug fix in 'PcNNModel' regarding temp filepath extension.
Version 2.6.12 - 2024-05-02¶
Authors: Bruno Macedo
Changes:
- Bug fix in
FeatureCalcPowerCPrelated to SPE naming.
Version 2.6.11 - 2024-03-15¶
Authors: Nicole Tometich
Changes:
- Minor change regarding Bazefield TAG nomenclature in yaw.py
Version 2.6.10 - 2024-03-13¶
Authors: Bruno Macedo
Changes:
- Changed installation to
pyproject.toml. - Bug fix in
FeatureCalcPowerTheoreticalrelated to relative wind direction too high when turbine is stopped.
Version 2.6.9 - 2024-02-28¶
Authors: Lucas Costa
Changes:
- Convert only data involved in the filter to float in
std_filter - Index reset after deleting indexes with insufficient amount of data in function
get_binned_df
Version 2.6.8 - 2024-02-07¶
Authors: Bruno Macedo
Changes:
- Bug fix in
FeatureCalcPowerCPwhen there is no data in all CS SMFs (due to a substation shutdown, for example).
Version 2.6.7 - 2024-02-01¶
Authors: Nicole Tometich
Changes:
- Minor bug fix in
get_filtered_turbines_data()of 'ge_power_up.py' caused by recent updates in pandas and how it handles parse_dates in pd.read_sql().
Version 2.6.6 - 2024-01-23¶
Authors: Bruno Macedo
Changes:
- Bug fix in
update_power_curves()caused by changes in echo-postgres related to pyarrow and calc_models.
Version 2.6.5 - 2024-01-05¶
Authors: Bruno Macedo
Changes:
- Improvements when loading Keras model to speed up the process and avoid memory issues.
Version 2.6.4 - 2024-01-05¶
Authors: Bruno Macedo
Changes:
- More bug fixes in
CalculationHandlerrelated to freeing up memory.
Version 2.6.3 - 2023-01-04¶
Authors: Bruno Macedo
Changes:
- Minor improvements on
yaw.py. - Removed prints of freed up memory as this was taking a significative amount of time.
- Changed
FeatureCalcPredictiveModelto only calculate if the input data is not empty. otherwise return an empty result.
Version 2.6.2 - 2024-01-04¶
Authors: Bruno Macedo
Changes:
- Changes in
CalculationHandlerto reduce memory usage when doing large calculations usingsave_method="end".
Version 2.6.1 - 2024-01-03¶
Authors: Bruno Macedo
Changes:
- Changed
FeatureCalcPredictiveModelto allow for getting lagged timestamps when calculating. - Changed
RequiredFeaturesandCalculationHandlerto support getting lagged timestamps when calculating.
Version 2.6.0 - 2023-12-27¶
Authors: Bruno Macedo
Changes:
- Added
FeatureCalcPredictiveModelclass. - Moved constants like
FEATURE_CALC_CLASS_MAPPINGandFEATURE_ORDERto constants.py. - Moved some attributes of
CalculationRequirementandFeatureCalculatorto the class instead of the instance. - Changed most validation of dicts to use
jsonschema. - Added type hints to yaw.py.
Version 2.5.1 - 2023-12-22¶
Authors: Nicole Tometich
Changes:
- Fine-tune yaw misalignment calculations
- Added yaw misalignment summary function
get_yaw_misal_degrees
Version 2.5.0 - 2023-12-21¶
Authors: Nicole Tometich
Changes:
- Added yaw.py for yaw misalignment calculations
Version 2.4.24 - 2023-12-08¶
Authors: Bruno Macedo
Changes:
- Significative adjustments in
FeatureCalcObjectAggregation, allowing for resample and shift. - Added more default features to spe and ons_site object types.
Version 2.4.23 - 2023-12-01¶
Authors: Max Daniel
Changes:
- Minor fixes on feature_calc_common.py.
Version 2.4.22 - 2023-11-30¶
Authors: Max Daniel
Changes:
- Added
FeatureCalcObjectAggregationto feature_calc_common.py. This is a more generic version of theFeatureCalcSpeAggregationclass on the same file, and it can also scale features to some attribute if necessary.
Version 2.4.21 - 2023-11-24¶
Authors: Bruno Macedo
Changes:
- Changed
FeatureCalcPowerTheoreticalVestasto correctly acquire data from MetMasts, avoiding one missing timestamp in the calculation. - Changed this file to contain most recent changes on top.
Version 2.4.20 - 2023-11-17¶
Authors: Bruno Macedo
Changes:
- Changed
FeatureCalcPowerTheoreticalVestasto also consider PPC limitation as partial availability.
Version 2.4.19 - 2023-10-30¶
Authors: Nicole Tometich
Changes:
- Minor bug fix in
power_curvedue to how get_objects in echo-baze was returning the DataFrame columns. For this code to work you need to update echo-baze to 1.3.13
Version 2.4.18 - 2023-10-06¶
Authors: Bruno Macedo
Changes:
- Bug fix in
ge_power_updue to Pandas changing how dates are saved to SQLite after version 2.1.0. For this code to work after this version, you need to update Pandas to 2.1.1 or higher.
Version 2.4.17 - 2023-09-28¶
Authors: Max Daniel
Changes:
- Small hotfix that had to be made because of the Bazefield 10.1 update. The only change is the removal of any mention to the friendly_name property.
Version 2.4.16 - 2023-09-18¶
Authors: Bruno Macedo
Changes:
- Added "demand_stop_by_external_device" to FEATURE_ORDER in calculation_handler.py.
Version 2.4.15 - 2023-08-02¶
Authors: Bruno Macedo
Changes:
- Added logging of wrong timestamps to
FeatureCalcPowerCP.
Version 2.4.14 - 2023-07-26¶
Authors: Bruno Macedo
Changes:
- Bug fix in
curve_fit.py.
Version 2.4.13 - 2023-07-11¶
Authors: Bruno Macedo
Changes:
- Bug fix in
calc_ge_contractual_curtailment_lossdue to change in structure of the database.
Version 2.4.12 - 2023-07-10¶
Authors: Bruno Macedo
Changes:
- Added
feature_compare.scale_wf_to_wtg()method.
Version 2.4.11 - 2023-07-09¶
Authors: Bruno Macedo
Changes:
- Minor bug fix in
PcNNModel.predict(). - Better type hints.
- Improvements on
power_curve._calculate_metrics()to avoid absurd number when near zero. - Bug fix in
PcNNModel.train()when values where not provided as float (pyarrow issue). - Chart improvements for OSA.
Version 2.4.10 - 2023-07-07¶
Authors: Bruno Macedo
Changes:
- Added
FeatureCalcExampleto be used as an example of how to create a new feature calculator.
Version 2.4.9 - 2023-06-29¶
Authors: Bruno Macedo
Changes:
- Improvements on
calc_electrical_losses_curveto allow for calling the function passing the data as a parameter, avoiding the need to query the database. - Fixed
std_filterincompatibility with pyarrow.
Version 2.4.8 - 2023-06-26¶
Authors: Bruno Macedo
Changes:
- Minor bug fixes to solve erros related to changing parent_object hierarchy in the database.
Version 2.4.7 - 2023-06-23¶
Authors: Bruno Macedo
Changes:
- Improvements on
ge_power_up.operation_period_calc().
Version 2.4.6 - 2023-06-15¶
Authors: Bruno Macedo
Changes:
- Refactored
ge_power_up.pyto stop usingecho-sqlitepackage. All interactions with SQLite are now done usingecho-connhandlerpackage.
Version 2.4.5 - 2023-06-14¶
Authors: Bruno Macedo
Changes:
- Changed
FeatureCalcPowerCPto avoid raising an error when the power meter does not have a parent meter. This occurred for CP meters and others like the ones at the transformer in SdM. Now the code is checking for power_meter_location and will only raise an error if parent_meter is not defined and power_meter_location is "collecting substation". - Fixed error messages in
_get_requirement_data().
Version 2.4.4 - 2023-06-09¶
Authors: Bruno Macedo
Changes:
- Improvements to
flatline_filter(). - Added infer_input_shape argument to
PcNNModel.
Version 2.4.3 - 2023-06-04¶
Authors: Bruno Macedo
Changes:
- Changed
power_curve.pyto be compatible withecho-meteo2.0.0.
Version 2.4.2 - 2023-06-01¶
Authors: Bruno Macedo
Changes:
- Bug fix in
FeatureCalcPowerTheoreticalandFeatureCalcPowerTheoreticalVestas._adjust_featuresmethod was filtering curtailment data wrong.
Version 2.4.1 - 2023-05-25¶
Authors: Bruno Macedo
Changes:
- Removed lines in init that disable GPU for TensorFlow.
Version 2.4.0 - 2023-05-11¶
Authors: Bruno Macedo
Changes:
- Major refactoring use
PgSqlHandlerin a with statement to avoid connection issues.
Version 2.3.4 - 2023-05-11¶
Authors: Bruno Macedo
Changes:
- Better handling of postgresql connections, avoiding too many connections to be created.
- Major bug fixed in
CalculationHandlerthat caused it to fail if two objects of different types had the same feature mapped to different types of calculations.
Version 2.3.3 - 2023-05-10¶
Authors: Bruno Macedo
Changes:
- Added wind_farm to default calculation order in calculation_handler.py.
- Major bug fix in
FeatureCalcEvalExpressionthat caused the exec results to not be returned, making the expression useless. - Added
power_curve_offset_filterto filter data based on contractual power curve.
Version 2.3.2 - 2023-05-09¶
Authors: Bruno Macedo
Changes:
- Logging improvements.
Version 2.3.1 - 2023-05-08¶
Authors: Bruno Macedo
Changes:
- Changed
CalculationHandler.from_type_defaults()to return a list ofCalculationHandlerif "infer" is used.
Version 2.3.0 - 2023-05-07¶
Authors: Bruno Macedo
Changes:
- Added
FeatureCalcPowerCP. - Added default calculation order for power_meter object type in calculation_handler.py.
- Changed default reindex behavior of
RequiredFeatures.get_data()to "infer".
Version 2.2.0 - 2023-05-05¶
Authors: Bruno Macedo
Changes:
- Fixed major bug in
PcNNModelthat caused save and load don't work when using different python versions. Now it is using default TensorFlow save and load methods, which fix the issue. - Added train_period argument to
PcModel. - Added "infer" option to from_type_defaults in
CalculationHandler.
Version 2.1.1 - 2023-04-22¶
Authors: Bruno Macedo
Changes:
- Made
CalculationHandlerreturn None instead of raising an error when no features where specified. - Corrected bug in
CalculationHandler.from_calc_typeswhen specifying more than one calculation type. - Fixed bug in
FeatureCalcChildAggregationandFeatureCalcMonthlyAggregationwhen using feature_eval_expression.
Version 2.1.0 - 2023-04-18¶
Authors: Bruno Macedo
Changes:
- Fixed issue that caused creation of too many clients in postgresql.
- Improved error handling of
FeatureCalcLostPowerAlloc. - Added requirement class for alarms called
RequiredAlarms. - Added feature calculator class
FeatureCalcAlarmActive. - Updated FEATURE_ORDER in
CalculationHandler. - Added new class method from_calc_types to
CalculationHandler.
Version 2.0.0 - 2023-04-17¶
Authors: Bruno Macedo
Changes:
- Major refactoring of code to work with object oriented approach. Below some highlights.
- Added
FeatureCalculatorabstract class and all its subclasses, includingFeatureCalcChildAggregation,FeatureCalcEvalExpression,FeatureCalcLostPowerAlloc,FeatureCalcMonthlyAggregation,FeatureCalcPowerTheoreticalVestas,FeatureCalcPowerTheoreticalandFeatureCalcWFReferenceWS. - Added
CalculationHandlerclass to deal with all types of calculation routines. - Added
CalculationRequirementabstract class and all its subclasses, includingRequiredBazefieldAllocations,RequiredCalcModels,RequiredFeatureAttributes,RequiredFeaturesandRequiredObjectAttributes.
- Added
- Added automatic tests using pytest.
Version 1.2.3 - 2023-03-24¶
Authors: Bruno Macedo
Changes:
- Minor bug fixes in electrical losses calculations.
Version 1.2.2 - 2023-03-21¶
Authors: Bruno Macedo
Changes:
- Minor bug fix in ge_power_up, changing feature nacelle_position to nacelle_direction.
Version 1.2.1 - 2023-03-17¶
Authors: Bruno Macedo
Changes:
- Fixed bug in power_curve module that caused the power curve to yield a value of zero if it was trained with fixed conditions (happened if you used a period without some features to train).
- Fixed bug in
turbine_feature_calc.calc_active_power_theoreticalthat caused the function to fail if there was no valid timestamps for initial step.
Version 1.2.0 - 2023-02-14¶
Authors: Bruno Macedo
Changes:
- Changed calc_active_power_theoretical to use
PcNNModelinstead of simple power curve. - Changed
PcModel.load()to be a class method.
Version 1.1.4 - 2023-02-14¶
Authors: Bruno Macedo
Changes:
- Changed how curtailments are handled in
calc_active_power_theoretical_contract_vestas.
Version 1.1.3 - 2023-01-27¶
Authors: Bruno Macedo
Changes:
- Minor improvements in common_feature_calc and windfarm_feature_calc.
Version 1.1.2 - 2023-01-16¶
Authors: Bruno Macedo
Changes:
- Changed
calc_active_power_theoreticalto skip wind speeds <= 0.
Version 1.1.1 - 2023-01-11¶
Authors: Bruno Macedo
Changes:
- Changed
PcModelto be an abstract class. - update_power_curves now fills default values for x features if they are not present. This avoids errors when using the same model for different turbines that might not have some of the features. Not recommended but it's a workaround for some bugs at the moment.
Version 1.1.0 - 2022-12-21¶
Authors: Bruno Macedo
Changes:
- Removed message from
TensorFlowthat was printed whenever the package was imported. - Added power_curve.update_power_curves.
- Removed function curve_fit.fit_turbine_power_curves as its functionality is replaced by the above function.
Version 1.0.4 - 2022-12-06¶
Authors: Bruno Macedo
Changes:
- Changed version control to version.py.
- Fixed error related to timestamps with negative losses in
electrical_loss.calc_cp_power. - Updated electrical_loss to accept
DateTimeRange.
Version 1.0.3 - 2022-11-15¶
Authors: Bruno Macedo
Changes:
- Added
operation_period_calcto ge_power_up. - Added support to
DateTimeRangeto ge_power_up. - Moved version control to init.py.
Version 1.0.2 - 2022-11-02¶
Authors: Bruno Macedo
Changes:
- Fixed time percentage in
turbine_feature_calc.calc_lost_power_allocationsthat caused absurd values when allocation was shorter than 10 min.
Version 1.0.1 - 2022-10-30¶
Authors: Bruno Macedo
Changes:
- Fixed
electrical_loss.calc_cp_powerto invalidate timestamps where CP power is lower than CS power. This usually happens when there are missing Meters in performance_db.
Version 1.0.0 - 2022-10-21¶
Authors: Bruno Macedo
Changes:
- Major improvements, specially in the power curve fitting functionality.
- Created new module power_curve.
- Neural Network power curve models introduced in power_curve module.
- Removed aux_functions.
- Updated electrical_loss to consider a start of operation from each wind farm.
- Added mahalanobis_cluster_filter to filters. It's a filter that uses K means and mahalanobis distance to remove outliers, having better results than standard STD filter.
Version 0.1.21 - 2022-10-06¶
Authors: Bruno Macedo
Changes:
- Changed
FeatureCalcPowerTheoreticalVestasto also consider PPC limitation as partial availability.
Version 0.1.20 - 2022-09-28¶
Authors: Max Daniel
Changes:
- Small hotfix that had to be made because of the Bazefield 10.1 update. The only change is the removal of any mention to the friendly_name property.
Version 0.1.19 - 2022-09-18¶
Authors: Bruno Macedo
Changes:
- Added "demand_stop_by_external_device" to FEATURE_ORDER in calculation_handler.py.
Version 0.1.18 - 2022-09-06¶
Authors: Bruno Macedo
Changes:
- Bug fix in
ge_power_updue to Pandas changing how dates are saved to SQLite after version 2.1.0. For this code to work after this version, you need to update Pandas to 2.1.1 or higher.
Version 0.1.17 - 2022-07-17¶
Authors: Bruno Macedo
Changes:
- Added function_thresh_filter and timeseries_diff_filter to filters.py.
Version 0.1.16 - 2022-07-01¶
Authors: Bruno Macedo
Changes:
- Fixed bug when passing DataFrame with all NaN column to flatline_filter.
Version 0.1.15 - 2022-06-30¶
Authors: Bruno Macedo
Changes:
- Moved calc_eval_expression_feature to common_feature_calc.
- Added calc_child_aggregation_feature to common_feature_calc.
- Added module to calculate wind farm features.
Version 0.1.14 - 2022-06-29¶
Authors: Bruno Macedo
Changes:
- Added logging.
- Added Bazefield upload option to most turbine feature calculation functions.
- Fixed final check in turbine calc that warned for not calculated timestamps where they should be ignored.
Version 0.1.13 - 2022-06-15¶
Authors: Bruno Macedo
Changes:
- Added calculation of Gamesa and ge active_power_theoretical_contract.
- Added type hints to curve_fit functions.
Version 0.1.12 - 2022-06-06¶
Authors: Bruno Macedo
Changes:
- Fixed some errors in calc_active_power_theoretical and calc_active_power_theoretical_contract_vestas that made calculation skip neighbor turbines.
Version 0.1.11 - 2022-06-03¶
Authors: Bruno Macedo
Changes:
- Added verbose option in turbine feature calc.
Version 0.1.10 - 2022-05-31¶
Authors: Bruno Macedo
Changes:
- Added option to fill values on left or right side of the fitted curve in fill_value_ext on fit_curve function
Version 0.1.9 - 2022-05-25¶
Authors: Bruno Macedo
Changes:
- Added option to filter bins with a minimum of points in get_binned_df.
Version 0.1.8 - 2022-05-17¶
Authors: Bruno Macedo
Changes:
- Added option to ignore certain turbine features when calculating.
Version 0.1.7 - 2022-05-17¶
Authors: Bruno Macedo
Changes:
- Added calculation of lost_power_downtime.
Version 0.1.6 - 2022-05-04¶
Authors: Bruno Macedo
Changes:
- Fixed calc_cp_power to use SMF2 data when SMF1 is null.
Version 0.1.5 - 2022-05-01¶
Authors: Bruno Macedo
Changes:
- Added calc_lost_power_allocations.
Version 0.1.4 - 2022-05-01¶
Authors: Bruno Macedo
Changes:
- Fixed calc_lost_power_curtailment to only consider a curtailment loss if iec_operation_state > 1.
Version 0.1.3 - 2022-05-01¶
Authors: Bruno Macedo
Changes:
- Added calc_lost_power_curtailment.
Version 0.1.2 - 2022-05-01¶
Authors: Bruno Macedo
Changes:
- Added calculation of active_power_theoretical_contract_vestas and completed active_power_theoretical.
Version 0.1.1 - 2022-04-27¶
Authors: Bruno Macedo
Changes:
- Added calculation of active_power_theoretical (still some parts to finish)
Version 0.1.0 - 2022-04-26¶
Authors: Bruno Macedo
Changes:
- Added turbine_feature_calc with calculation of iec_operation_state and curtailment_state.
Version 0.0.8 - 2022-04-18¶
Authors: Bruno Macedo
Changes:
- Fixed bug where calc_electrical_losses_curve code would brake if there's no data for a specific SPE.
Version 0.0.7 - 2022-04-17¶
Authors: Bruno Macedo
Changes:
- Added option to calculate electrical losses from wtg to function calc_electrical_losses_curve.
Version 0.0.6 - 2022-03-18¶
Authors: Bruno Macedo
Changes:
- Added application names to pg connections fore better view in pgAdmin dashboards.
Version 0.0.5 - 2022-03-18¶
Authors: Bruno Macedo
Changes:
- Fixed bug caused when pg connection was not closed.
Version 0.0.4 - 2022-03-07¶
Authors: Bruno Macedo
Changes:
- Fixed bug when calculating energy @cp using electrical losses curve.
Version 0.0.3 - 2022-03-06¶
Authors: Bruno Macedo
Changes:
- Fixed bug when trying to calculate power at cp using saved loss curve for Voltalia or Elawan SPEs.
Version 0.0.2 - 2022-03-06¶
Authors: Bruno Macedo
Changes:
- Added calculation of power at connection point using electrical losses curves when there's data missing from at least one power meter.
Version 0.0.1 - 2022-03-06¶
Authors: Bruno Macedo
Changes:
- Initial release of the package. Contais main functions for calculating electrical losses. Calculation of electrical losses from WTG still needs to be implemented.