Repository navigation
What's new
CityLearn 3.9.3 is a scientific-hardening patch release resolving two consecutive rounds of independent zero-prior-information blind adversarial audits across physical conservation, occupants and HVAC/LSTM thermal dynamics, shared thermal devices, InventoryBattery asymmetric limits, EV chargers and non-monotonic efficiency curves, three-phase electrical-service allocation, deferrable appliances, escalators, step_many() wrappers and robustness fault accounting, dynamic topology lifecycles, evaluate_v2() KPIs, reward functions, reference controllers and English/Portuguese documentation:
- Runtime physics invariants & balance audit (
#554): ExtendedPhysicsInvariantServiceandIndependentBalanceAuditto enforce asymmetricInventoryBatterycharge/discharge power limits andmax_socupper bounds, deduplicate sharedElectricDeviceinstances acrosscooling_device,heating_deviceanddhw_device, verify battery standby-loss conservation and per-step power/duty shares on batteries and thermal tanks, checkEscalatorpower bounds and islanded outage non-export (net_electricity_consumption == 0), and verify EV away-from-home SOC drift external ledger events. - Occupants, thermal dynamics, batteries, EVs & electrical allocation (
#554): Prevented simultaneous heating/cooling overrides inLogisticRegressionOccupantInteractionfrom invertingheating_set_point <= cooling_set_point, respectedignore_occupant=Trueacross allhvac_modebranches and cleared delta summaries onreset(); deduplicated shared thermalElectricDevicestepping and metering onBuildingwhile preserving float32 addition order across NumPy 1.x and 2.x; decoupled post-warm-upLSTMDynamicsBuildingoutage counterfactuals from agent actions; prevented severe battery discharge degradation from droppingdegraded_capacitybelow remaining stored energy while preserving sub-reserve arrival conservation (#179); fixed non-monotonicChargerefficiency-curve optimization and bracketed bisection (ChargingConstraintReplay/evaluate_v2()), V2G near-DoD bottom-off feasibility, per-charger mixed 0-based/1-based countdown detection,last_charged_dc_kwhone-way efficiency accounting, double-booked charger exclusion,disjointboundary departures and inactive dynamic-topology buildings underev_soc_carryover, and JSON-safeCharger/ElectricVehicleend-of-simulation rendering; and stabilizedallocate_electrical_service()under opposing three-phase and single-phase controls while reportingsoc_limitaccurately onInventoryBatteryvia_step_share_power(). - Escalators, deferrables, wrappers, robustness, dynamic topology & KPIs (
#554): BoundEscalatorruntime attributes across dynamic-topology activations, slicedEscalatorCSV loads bysimulation_start_time_step, zeroed out-of-service (available == 0) escalator demand without masking'availability'with'outage', and reported settledt - 1service_metfor uncontrolled escalators; fixedDeferrableAppliancelast_started_local_time_stepaction feedback and flat schedule helper keys; implementedstep_many()delegation across Gymnasium and RLlib wrappers, unwrapped_GymWrapperchains inDiscreteObservationWrapper, and supported multi-discreteTabularQLearningWrapperspaces; matchedstep_many(return_substeps=False)step-by-step understuckobservation faults, propagatedassetunavailablefaults across child entity tables and linkedcharger <-> evchannels, scoped per-building-1.0entity sentinel masking strictly to explicitinactive_observations, rejected non-finite entity action tables withValueError, validatedagent_observation_contractat construction even whenrobustness.enabledisFalse, and fixed terminal-stepN - 1EV swaps; excluded zero-executed-step dynamic-topology members from unweighted district equity/comfort averages while retaining0.0inventory/cost rows, preserved BESS lineage SOH acrossremove_member -> add_memberrejoins, masked outage thermal service expectations consistently, refinedElectric_Vehicles_Reward_Function,ComfortReward,SolarPenaltyAndComfortReward,CostFunction.normalized_unserved_energy(),MARLISA,TabularQLearningand RBC controllers, and synchronized EN/PT documentation and localized migration anchors.
Validation
- Passed the full 20-job CI matrix across Python 3.10 to 3.14 (NumPy 2), Python 3.10 (NumPy 1), Windows, macOS, dataset/entity-contract/physics/runtime audits, notebooks and Sphinx documentation build.
- Added 30 multi-scenario regression tests (
tests/test_post_392_blind_audit.pyandtests/test_post_392_round2_blind_audit.py), verifiedscripts/audit/run_full_audit.py --strict(0unknownunits,16/16physics checks,0parity diffs), and verified wheel build,twine checkand out-of-tree installed export smoke. - See docs/releases.md and docs/pt/releases.md for the full release notes in English and Portuguese.
Contributors
- Tiago Fonseca (@calofonseca): #554.
Full Changelog: v3.9.2...v3.9.3