chronaxis 0.1.0.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chronaxis/__init__.py +72 -0
- chronaxis/__main__.py +12 -0
- chronaxis/analysis_cli.py +181 -0
- chronaxis/batch/__init__.py +14 -0
- chronaxis/batch/api.py +46 -0
- chronaxis/batch/cli.py +48 -0
- chronaxis/batch/config.py +37 -0
- chronaxis/batch/models.py +202 -0
- chronaxis/batch/process_transport.py +149 -0
- chronaxis/batch/process_tree.py +72 -0
- chronaxis/batch/publication.py +41 -0
- chronaxis/batch/runner.py +236 -0
- chronaxis/batch/templates.py +42 -0
- chronaxis/can_dependencies.py +42 -0
- chronaxis/cli.py +193 -0
- chronaxis/configuration/__init__.py +46 -0
- chronaxis/configuration/cli.py +41 -0
- chronaxis/configuration/diagnostics.py +107 -0
- chronaxis/configuration/explanation.py +233 -0
- chronaxis/configuration/file_tools.py +140 -0
- chronaxis/configuration/imports.py +144 -0
- chronaxis/configuration/initialization.py +36 -0
- chronaxis/configuration/json_parser.py +114 -0
- chronaxis/configuration/models.py +74 -0
- chronaxis/configuration/origins.py +90 -0
- chronaxis/configuration/overrides.py +55 -0
- chronaxis/configuration/resolution.py +150 -0
- chronaxis/configuration/template_catalog.py +68 -0
- chronaxis/configuration/templates/batch/analysis-annotated.yaml +18 -0
- chronaxis/configuration/templates/batch/analysis-minimal.yaml +18 -0
- chronaxis/configuration/templates/batch/annotated.yaml +6 -0
- chronaxis/configuration/templates/batch/minimal.yaml +6 -0
- chronaxis/configuration/templates/can-asc/annotated.yaml +18 -0
- chronaxis/configuration/templates/can-asc/minimal.yaml +18 -0
- chronaxis/configuration/templates/can-blf/annotated.yaml +18 -0
- chronaxis/configuration/templates/can-blf/minimal.yaml +18 -0
- chronaxis/configuration/templates/can-export/annotated.yaml +23 -0
- chronaxis/configuration/templates/can-export/minimal.yaml +23 -0
- chronaxis/configuration/templates/catalog.json +233 -0
- chronaxis/configuration/templates/charge-session/annotated.yaml +38 -0
- chronaxis/configuration/templates/charge-session/minimal.yaml +38 -0
- chronaxis/configuration/templates/command-response/annotated.yaml +32 -0
- chronaxis/configuration/templates/command-response/minimal.yaml +36 -0
- chronaxis/configuration/templates/fault-window/annotated.yaml +25 -0
- chronaxis/configuration/templates/fault-window/minimal.yaml +27 -0
- chronaxis/configuration/templates/ini-mapping/annotated.yaml +20 -0
- chronaxis/configuration/templates/ini-mapping/minimal.yaml +20 -0
- chronaxis/configuration/templates/raw-can-csv/annotated.yaml +34 -0
- chronaxis/configuration/templates/raw-can-csv/minimal.yaml +35 -0
- chronaxis/configuration/templates/shared/charge-session.asc +5 -0
- chronaxis/configuration/templates/shared/command-response.asc +8 -0
- chronaxis/configuration/templates/shared/fault-window.asc +5 -0
- chronaxis/configuration/templates/shared/power.asc +7 -0
- chronaxis/configuration/templates/shared/sample.asc +6 -0
- chronaxis/configuration/templates/shared/sample.blf +0 -0
- chronaxis/configuration/templates/shared/sample.csv +5 -0
- chronaxis/configuration/templates/shared/sample.dbc +11 -0
- chronaxis/configuration/templates/shared/signals.csv +6 -0
- chronaxis/configuration/templates/shared/source.ini +5 -0
- chronaxis/configuration/templates/shared/stability.asc +9 -0
- chronaxis/configuration/templates/shared/teaching.dbc +27 -0
- chronaxis/configuration/templates/shared/threshold.asc +7 -0
- chronaxis/configuration/templates/signal-csv/annotated.yaml +27 -0
- chronaxis/configuration/templates/signal-csv/minimal.yaml +27 -0
- chronaxis/configuration/templates/signal-export/annotated.yaml +27 -0
- chronaxis/configuration/templates/signal-export/minimal.yaml +29 -0
- chronaxis/configuration/templates/stability/annotated.yaml +35 -0
- chronaxis/configuration/templates/stability/minimal.yaml +35 -0
- chronaxis/configuration/templates/threshold/annotated.yaml +22 -0
- chronaxis/configuration/templates/threshold/minimal.yaml +22 -0
- chronaxis/configuration/yaml_parser.py +125 -0
- chronaxis/core/__init__.py +71 -0
- chronaxis/core/binding.py +449 -0
- chronaxis/core/calculation_series_join.py +106 -0
- chronaxis/core/calculations.py +435 -0
- chronaxis/core/calculations_memory_numpy.py +136 -0
- chronaxis/core/calculations_memory_reference.py +165 -0
- chronaxis/core/calculations_numpy.py +298 -0
- chronaxis/core/calculations_reference.py +294 -0
- chronaxis/core/condition_evidence.py +182 -0
- chronaxis/core/conditional_integral_result.py +43 -0
- chronaxis/core/conditional_integral_terms.py +146 -0
- chronaxis/core/conditional_integral_terms_numpy.py +148 -0
- chronaxis/core/conditional_integral_terms_reference.py +111 -0
- chronaxis/core/conditional_time_reduction.py +118 -0
- chronaxis/core/conditional_time_reduction_numpy.py +223 -0
- chronaxis/core/conditional_time_reduction_reference.py +213 -0
- chronaxis/core/declarations.py +192 -0
- chronaxis/core/decoded_binding.py +197 -0
- chronaxis/core/direct_message.py +387 -0
- chronaxis/core/export_interpolation.py +54 -0
- chronaxis/core/expression.py +642 -0
- chronaxis/core/expression_numpy.py +314 -0
- chronaxis/core/expression_reference.py +272 -0
- chronaxis/core/integral_result.py +53 -0
- chronaxis/core/integral_sum.py +77 -0
- chronaxis/core/integral_sum_numpy.py +224 -0
- chronaxis/core/integral_sum_reference.py +148 -0
- chronaxis/core/integral_terms.py +119 -0
- chronaxis/core/integral_terms_numpy.py +127 -0
- chronaxis/core/integral_terms_reference.py +91 -0
- chronaxis/core/mean_weights_numpy.py +29 -0
- chronaxis/core/mean_weights_reference.py +27 -0
- chronaxis/core/message_binding.py +305 -0
- chronaxis/core/models.py +485 -0
- chronaxis/core/normalize_numpy.py +396 -0
- chronaxis/core/numeric.py +472 -0
- chronaxis/core/numeric_numpy.py +440 -0
- chronaxis/core/record_intervals.py +115 -0
- chronaxis/core/sample_reduction.py +161 -0
- chronaxis/core/sample_reduction_numpy.py +160 -0
- chronaxis/core/sample_reduction_reference.py +154 -0
- chronaxis/core/selection.py +74 -0
- chronaxis/core/sequence.py +160 -0
- chronaxis/core/sequence_reference.py +248 -0
- chronaxis/core/stability.py +249 -0
- chronaxis/core/start_end.py +169 -0
- chronaxis/core/state.py +494 -0
- chronaxis/core/state_numpy.py +296 -0
- chronaxis/core/temporal.py +373 -0
- chronaxis/core/temporal_clock.py +25 -0
- chronaxis/core/temporal_memory_numpy.py +163 -0
- chronaxis/core/temporal_memory_reference.py +161 -0
- chronaxis/core/temporal_numpy.py +345 -0
- chronaxis/core/temporal_reference.py +304 -0
- chronaxis/core/time_reduction.py +190 -0
- chronaxis/core/time_reduction_numpy.py +205 -0
- chronaxis/core/time_reduction_reference.py +203 -0
- chronaxis/core/types.py +105 -0
- chronaxis/core/units.py +81 -0
- chronaxis/core/validation.py +94 -0
- chronaxis/core/window_delta.py +123 -0
- chronaxis/core/window_delta_numpy.py +78 -0
- chronaxis/core/window_delta_reference.py +69 -0
- chronaxis/core/windows.py +224 -0
- chronaxis/core/windows_numpy.py +78 -0
- chronaxis/core/windows_reference.py +61 -0
- chronaxis/execution/__init__.py +6 -0
- chronaxis/execution/batch_signal_groups.py +122 -0
- chronaxis/execution/bindings.py +296 -0
- chronaxis/execution/boundaries.py +568 -0
- chronaxis/execution/calculation_blocks.py +338 -0
- chronaxis/execution/calculation_values.py +55 -0
- chronaxis/execution/can_batch_reader.py +356 -0
- chronaxis/execution/can_reader.py +948 -0
- chronaxis/execution/can_reference_template.py +61 -0
- chronaxis/execution/condition_evidence.py +370 -0
- chronaxis/execution/conditional_integral_facts.py +310 -0
- chronaxis/execution/conditional_integral_reduction.py +216 -0
- chronaxis/execution/csv_observation.py +524 -0
- chronaxis/execution/csv_reader.py +662 -0
- chronaxis/execution/current_message_calculation.py +225 -0
- chronaxis/execution/driver_expression.py +274 -0
- chronaxis/execution/expressions.py +618 -0
- chronaxis/execution/frame_capture.py +245 -0
- chronaxis/execution/groups.py +236 -0
- chronaxis/execution/historical_conditional_blocks.py +264 -0
- chronaxis/execution/historical_conditional_integral.py +226 -0
- chronaxis/execution/historical_conditional_time_calculation.py +368 -0
- chronaxis/execution/historical_integral.py +219 -0
- chronaxis/execution/historical_observation.py +372 -0
- chronaxis/execution/historical_sample_calculation.py +338 -0
- chronaxis/execution/historical_selection_rows.py +300 -0
- chronaxis/execution/historical_time_calculation.py +341 -0
- chronaxis/execution/history.py +572 -0
- chronaxis/execution/history_records.py +225 -0
- chronaxis/execution/hold.py +448 -0
- chronaxis/execution/integral_facts.py +311 -0
- chronaxis/execution/integral_reduction.py +216 -0
- chronaxis/execution/legacy_frame_samples.py +94 -0
- chronaxis/execution/memory_reader.py +247 -0
- chronaxis/execution/message_bindings.py +293 -0
- chronaxis/execution/message_delivery.py +37 -0
- chronaxis/execution/observed_ingestion.py +551 -0
- chronaxis/execution/raw_signal_groups.py +192 -0
- chronaxis/execution/record_alarm_duration.py +114 -0
- chronaxis/execution/record_delta_condition.py +167 -0
- chronaxis/execution/record_diagnostics.py +87 -0
- chronaxis/execution/record_event_durations.py +143 -0
- chronaxis/execution/record_export_samples.py +94 -0
- chronaxis/execution/record_exports.py +155 -0
- chronaxis/execution/record_integral.py +196 -0
- chronaxis/execution/record_point_buffer.py +101 -0
- chronaxis/execution/record_rule_timeline.py +344 -0
- chronaxis/execution/record_sample.py +46 -0
- chronaxis/execution/record_sample_series.py +29 -0
- chronaxis/execution/record_scope_calculations.py +290 -0
- chronaxis/execution/record_selection.py +62 -0
- chronaxis/execution/record_sequences.py +199 -0
- chronaxis/execution/record_session_calculations.py +778 -0
- chronaxis/execution/record_signal_export.py +133 -0
- chronaxis/execution/record_source_cursor.py +295 -0
- chronaxis/execution/record_time_calculation.py +322 -0
- chronaxis/execution/record_time_indexes.py +143 -0
- chronaxis/execution/record_value_history.py +160 -0
- chronaxis/execution/record_windows.py +229 -0
- chronaxis/execution/required_expression.py +52 -0
- chronaxis/execution/retained_metadata.py +71 -0
- chronaxis/execution/run_session.py +402 -0
- chronaxis/execution/scanned_signal_proof.py +550 -0
- chronaxis/execution/signal_validity.py +40 -0
- chronaxis/execution/state.py +280 -0
- chronaxis/execution/temporal_buffer.py +508 -0
- chronaxis/execution/text_can_reader.py +359 -0
- chronaxis/execution/timeline.py +309 -0
- chronaxis/execution/timeline_multi.py +415 -0
- chronaxis/execution/window_delta_events.py +220 -0
- chronaxis/execution/window_replay.py +350 -0
- chronaxis/execution/windows.py +173 -0
- chronaxis/guide/README.md +70 -0
- chronaxis/guide/api/AnalysisError.md +14 -0
- chronaxis/guide/api/AnalysisPlan.md +96 -0
- chronaxis/guide/api/AnalysisResult.md +398 -0
- chronaxis/guide/api/AnalysisRunner.md +155 -0
- chronaxis/guide/api/BatchJob.md +19 -0
- chronaxis/guide/api/BatchJobResult.md +61 -0
- chronaxis/guide/api/BatchPlan.md +48 -0
- chronaxis/guide/api/BatchReport.md +108 -0
- chronaxis/guide/api/BatchRunner.md +84 -0
- chronaxis/guide/api/OutputManifest.md +23 -0
- chronaxis/guide/api/PlanFragment.md +47 -0
- chronaxis/guide/api/PlanValidationError.md +98 -0
- chronaxis/guide/api/PresetSpec.md +63 -0
- chronaxis/guide/api/ResultClosedError.md +14 -0
- chronaxis/guide/api/RunMetadata.md +100 -0
- chronaxis/guide/api/TimeConversion.md +29 -0
- chronaxis/guide/api/TimeOverflowError.md +17 -0
- chronaxis/guide/api/build_preset.md +36 -0
- chronaxis/guide/api/checked_add_ns.md +30 -0
- chronaxis/guide/api/convert_time.md +40 -0
- chronaxis/guide/api/explain_analysis_plan.md +38 -0
- chronaxis/guide/api/index.json +185 -0
- chronaxis/guide/api/load_analysis_plan.md +34 -0
- chronaxis/guide/api/load_batch_plan.md +36 -0
- chronaxis/guide/api/parse_datetime_ns.md +35 -0
- chronaxis/guide/api/parse_duration.md +30 -0
- chronaxis/guide/api/resolve_preset_roles.md +37 -0
- chronaxis/guide/api/run_batch.md +38 -0
- chronaxis/guide/api/shift_times_reference.md +33 -0
- chronaxis/guide/api/time_deltas_reference.md +37 -0
- chronaxis/guide/api/validate_analysis_plan.md +38 -0
- chronaxis/guide/en/README.md +74 -0
- chronaxis/guide/en/api/AnalysisError.md +14 -0
- chronaxis/guide/en/api/AnalysisPlan.md +93 -0
- chronaxis/guide/en/api/AnalysisResult.md +398 -0
- chronaxis/guide/en/api/AnalysisRunner.md +191 -0
- chronaxis/guide/en/api/BatchJob.md +17 -0
- chronaxis/guide/en/api/BatchJobResult.md +43 -0
- chronaxis/guide/en/api/BatchPlan.md +37 -0
- chronaxis/guide/en/api/BatchReport.md +52 -0
- chronaxis/guide/en/api/BatchRunner.md +51 -0
- chronaxis/guide/en/api/OutputManifest.md +23 -0
- chronaxis/guide/en/api/PlanFragment.md +33 -0
- chronaxis/guide/en/api/PlanValidationError.md +58 -0
- chronaxis/guide/en/api/PresetSpec.md +51 -0
- chronaxis/guide/en/api/ResultClosedError.md +14 -0
- chronaxis/guide/en/api/RunMetadata.md +100 -0
- chronaxis/guide/en/api/TimeConversion.md +23 -0
- chronaxis/guide/en/api/TimeOverflowError.md +14 -0
- chronaxis/guide/en/api/build_preset.md +23 -0
- chronaxis/guide/en/api/checked_add_ns.md +21 -0
- chronaxis/guide/en/api/convert_time.md +25 -0
- chronaxis/guide/en/api/explain_analysis_plan.md +30 -0
- chronaxis/guide/en/api/index.json +185 -0
- chronaxis/guide/en/api/load_analysis_plan.md +27 -0
- chronaxis/guide/en/api/load_batch_plan.md +28 -0
- chronaxis/guide/en/api/parse_datetime_ns.md +23 -0
- chronaxis/guide/en/api/parse_duration.md +20 -0
- chronaxis/guide/en/api/resolve_preset_roles.md +23 -0
- chronaxis/guide/en/api/run_batch.md +39 -0
- chronaxis/guide/en/api/shift_times_reference.md +21 -0
- chronaxis/guide/en/api/time_deltas_reference.md +22 -0
- chronaxis/guide/en/api/validate_analysis_plan.md +29 -0
- chronaxis/guide/en/fields/analysis/calculations-all-1.json +345 -0
- chronaxis/guide/en/fields/analysis/calculations-all-2.json +300 -0
- chronaxis/guide/en/fields/analysis/calculations-all-3.json +84 -0
- chronaxis/guide/en/fields/analysis/config_version-all-1.json +24 -0
- chronaxis/guide/en/fields/analysis/dataset-all-1.json +344 -0
- chronaxis/guide/en/fields/analysis/derived-all-1.json +147 -0
- chronaxis/guide/en/fields/analysis/diagnostics-all-1.json +69 -0
- chronaxis/guide/en/fields/analysis/execution-all-1.json +167 -0
- chronaxis/guide/en/fields/analysis/imports-all-1.json +39 -0
- chronaxis/guide/en/fields/analysis/intervals-all-1.json +173 -0
- chronaxis/guide/en/fields/analysis/message_calculations-all-1.json +345 -0
- chronaxis/guide/en/fields/analysis/message_calculations-all-2.json +270 -0
- chronaxis/guide/en/fields/analysis/metadata-all-1.json +24 -0
- chronaxis/guide/en/fields/analysis/outputs-all-1.json +332 -0
- chronaxis/guide/en/fields/analysis/outputs-all-2.json +319 -0
- chronaxis/guide/en/fields/analysis/outputs-all-3.json +321 -0
- chronaxis/guide/en/fields/analysis/outputs-all-4.json +236 -0
- chronaxis/guide/en/fields/analysis/outputs-all-5.json +246 -0
- chronaxis/guide/en/fields/analysis/outputs-all-6.json +214 -0
- chronaxis/guide/en/fields/analysis/overrides-all-1.json +104 -0
- chronaxis/guide/en/fields/analysis/presets-charge_session-1.json +398 -0
- chronaxis/guide/en/fields/analysis/presets-charge_session-2.json +114 -0
- chronaxis/guide/en/fields/analysis/presets-command_response-1.json +376 -0
- chronaxis/guide/en/fields/analysis/presets-fault_context-1.json +285 -0
- chronaxis/guide/en/fields/analysis/presets-threshold_excursion-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-condition_duration-1.json +344 -0
- chronaxis/guide/en/fields/analysis/rules-condition_duration-2.json +27 -0
- chronaxis/guide/en/fields/analysis/rules-debounce-1.json +335 -0
- chronaxis/guide/en/fields/analysis/rules-falling_edge-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-hysteresis-1.json +334 -0
- chronaxis/guide/en/fields/analysis/rules-hysteresis-2.json +27 -0
- chronaxis/guide/en/fields/analysis/rules-rising_edge-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-start_end-1.json +333 -0
- chronaxis/guide/en/fields/analysis/rules-start_end-2.json +60 -0
- chronaxis/guide/en/fields/analysis/rules-start_only-1.json +334 -0
- chronaxis/guide/en/fields/analysis/rules-window_delta-1.json +338 -0
- chronaxis/guide/en/fields/analysis/rules-window_delta-2.json +96 -0
- chronaxis/guide/en/fields/analysis/sequences-all-1.json +378 -0
- chronaxis/guide/en/fields/analysis/sequences-all-2.json +70 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-1.json +349 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-2.json +297 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-3.json +323 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-4.json +192 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-1.json +327 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-2.json +312 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-3.json +294 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-4.json +253 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-5.json +44 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-1.json +318 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-3.json +311 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-4.json +69 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-1.json +317 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-3.json +317 -0
- chronaxis/guide/en/fields/analysis/sources-memory-1.json +332 -0
- chronaxis/guide/en/fields/analysis/sources-memory-2.json +125 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-1.json +330 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-10.json +233 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-11.json +225 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-12.json +228 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-13.json +226 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-14.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-15.json +227 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-16.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-17.json +238 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-18.json +239 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-19.json +233 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-20.json +242 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-21.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-22.json +228 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-23.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-24.json +223 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-25.json +290 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-26.json +131 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-3.json +297 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-4.json +226 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-5.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-6.json +227 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-7.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-8.json +238 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-9.json +239 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-1.json +331 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-2.json +307 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-3.json +315 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-1.json +319 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-2.json +307 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-3.json +312 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-4.json +113 -0
- chronaxis/guide/en/fields/analysis/windows-all-1.json +361 -0
- chronaxis/guide/en/fields/analysis/windows-all-2.json +187 -0
- chronaxis/guide/en/fields/batch/backend-all-1.json +26 -0
- chronaxis/guide/en/fields/batch/batch_version-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/fail_fast-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/inputs-all-1.json +161 -0
- chronaxis/guide/en/fields/batch/jobs-all-1.json +58 -0
- chronaxis/guide/en/fields/batch/process_count-all-1.json +23 -0
- chronaxis/guide/en/fields/batch/source-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/template-all-1.json +22 -0
- chronaxis/guide/en/fields/definitions/derived-all-1.json +121 -0
- chronaxis/guide/en/fields/definitions/signals-all-1.json +336 -0
- chronaxis/guide/en/fields/definitions/signals-all-2.json +307 -0
- chronaxis/guide/en/fields/definitions/signals-all-3.json +290 -0
- chronaxis/guide/en/fields/definitions/signals-all-4.json +347 -0
- chronaxis/guide/en/fields/definitions/signals-all-5.json +297 -0
- chronaxis/guide/en/fields/definitions/signals-all-6.json +259 -0
- chronaxis/guide/en/fields/definitions/signals-all-7.json +117 -0
- chronaxis/guide/en/fields/definitions/sources-all-1.json +332 -0
- chronaxis/guide/en/fields/definitions/sources-all-10.json +306 -0
- chronaxis/guide/en/fields/definitions/sources-all-11.json +294 -0
- chronaxis/guide/en/fields/definitions/sources-all-12.json +212 -0
- chronaxis/guide/en/fields/definitions/sources-all-13.json +217 -0
- chronaxis/guide/en/fields/definitions/sources-all-14.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-15.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-16.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-17.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-18.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-19.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-2.json +323 -0
- chronaxis/guide/en/fields/definitions/sources-all-20.json +217 -0
- chronaxis/guide/en/fields/definitions/sources-all-21.json +210 -0
- chronaxis/guide/en/fields/definitions/sources-all-22.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-23.json +218 -0
- chronaxis/guide/en/fields/definitions/sources-all-24.json +209 -0
- chronaxis/guide/en/fields/definitions/sources-all-25.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-26.json +218 -0
- chronaxis/guide/en/fields/definitions/sources-all-27.json +224 -0
- chronaxis/guide/en/fields/definitions/sources-all-28.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-29.json +205 -0
- chronaxis/guide/en/fields/definitions/sources-all-3.json +303 -0
- chronaxis/guide/en/fields/definitions/sources-all-30.json +298 -0
- chronaxis/guide/en/fields/definitions/sources-all-31.json +315 -0
- chronaxis/guide/en/fields/definitions/sources-all-32.json +306 -0
- chronaxis/guide/en/fields/definitions/sources-all-33.json +209 -0
- chronaxis/guide/en/fields/definitions/sources-all-4.json +336 -0
- chronaxis/guide/en/fields/definitions/sources-all-5.json +299 -0
- chronaxis/guide/en/fields/definitions/sources-all-6.json +307 -0
- chronaxis/guide/en/fields/definitions/sources-all-7.json +320 -0
- chronaxis/guide/en/fields/definitions/sources-all-8.json +303 -0
- chronaxis/guide/en/fields/definitions/sources-all-9.json +315 -0
- chronaxis/guide/en/fields/index.json +3450 -0
- chronaxis/guide/en/fields/mapping/aliases-all-1.json +91 -0
- chronaxis/guide/en/fields/mapping/analysis-all-1.json +382 -0
- chronaxis/guide/en/fields/mapping/analysis-all-10.json +301 -0
- chronaxis/guide/en/fields/mapping/analysis-all-11.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-12.json +311 -0
- chronaxis/guide/en/fields/mapping/analysis-all-13.json +314 -0
- chronaxis/guide/en/fields/mapping/analysis-all-14.json +310 -0
- chronaxis/guide/en/fields/mapping/analysis-all-15.json +297 -0
- chronaxis/guide/en/fields/mapping/analysis-all-16.json +226 -0
- chronaxis/guide/en/fields/mapping/analysis-all-17.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-18.json +227 -0
- chronaxis/guide/en/fields/mapping/analysis-all-19.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-2.json +323 -0
- chronaxis/guide/en/fields/mapping/analysis-all-20.json +221 -0
- chronaxis/guide/en/fields/mapping/analysis-all-21.json +237 -0
- chronaxis/guide/en/fields/mapping/analysis-all-22.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-23.json +222 -0
- chronaxis/guide/en/fields/mapping/analysis-all-24.json +231 -0
- chronaxis/guide/en/fields/mapping/analysis-all-25.json +225 -0
- chronaxis/guide/en/fields/mapping/analysis-all-26.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-27.json +228 -0
- chronaxis/guide/en/fields/mapping/analysis-all-28.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-29.json +223 -0
- chronaxis/guide/en/fields/mapping/analysis-all-3.json +318 -0
- chronaxis/guide/en/fields/mapping/analysis-all-30.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-31.json +218 -0
- chronaxis/guide/en/fields/mapping/analysis-all-32.json +239 -0
- chronaxis/guide/en/fields/mapping/analysis-all-33.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-34.json +225 -0
- chronaxis/guide/en/fields/mapping/analysis-all-35.json +228 -0
- chronaxis/guide/en/fields/mapping/analysis-all-36.json +226 -0
- chronaxis/guide/en/fields/mapping/analysis-all-37.json +244 -0
- chronaxis/guide/en/fields/mapping/analysis-all-38.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-39.json +299 -0
- chronaxis/guide/en/fields/mapping/analysis-all-4.json +297 -0
- chronaxis/guide/en/fields/mapping/analysis-all-40.json +311 -0
- chronaxis/guide/en/fields/mapping/analysis-all-41.json +310 -0
- chronaxis/guide/en/fields/mapping/analysis-all-42.json +346 -0
- chronaxis/guide/en/fields/mapping/analysis-all-43.json +267 -0
- chronaxis/guide/en/fields/mapping/analysis-all-44.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-45.json +279 -0
- chronaxis/guide/en/fields/mapping/analysis-all-46.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-47.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-48.json +294 -0
- chronaxis/guide/en/fields/mapping/analysis-all-49.json +253 -0
- chronaxis/guide/en/fields/mapping/analysis-all-5.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-50.json +346 -0
- chronaxis/guide/en/fields/mapping/analysis-all-51.json +324 -0
- chronaxis/guide/en/fields/mapping/analysis-all-52.json +335 -0
- chronaxis/guide/en/fields/mapping/analysis-all-53.json +317 -0
- chronaxis/guide/en/fields/mapping/analysis-all-54.json +316 -0
- chronaxis/guide/en/fields/mapping/analysis-all-55.json +302 -0
- chronaxis/guide/en/fields/mapping/analysis-all-56.json +319 -0
- chronaxis/guide/en/fields/mapping/analysis-all-57.json +334 -0
- chronaxis/guide/en/fields/mapping/analysis-all-58.json +333 -0
- chronaxis/guide/en/fields/mapping/analysis-all-59.json +359 -0
- chronaxis/guide/en/fields/mapping/analysis-all-6.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-60.json +303 -0
- chronaxis/guide/en/fields/mapping/analysis-all-61.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-62.json +301 -0
- chronaxis/guide/en/fields/mapping/analysis-all-63.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-64.json +367 -0
- chronaxis/guide/en/fields/mapping/analysis-all-65.json +334 -0
- chronaxis/guide/en/fields/mapping/analysis-all-66.json +358 -0
- chronaxis/guide/en/fields/mapping/analysis-all-67.json +349 -0
- chronaxis/guide/en/fields/mapping/analysis-all-68.json +331 -0
- chronaxis/guide/en/fields/mapping/analysis-all-69.json +304 -0
- chronaxis/guide/en/fields/mapping/analysis-all-7.json +303 -0
- chronaxis/guide/en/fields/mapping/analysis-all-70.json +349 -0
- chronaxis/guide/en/fields/mapping/analysis-all-71.json +288 -0
- chronaxis/guide/en/fields/mapping/analysis-all-72.json +316 -0
- chronaxis/guide/en/fields/mapping/analysis-all-73.json +266 -0
- chronaxis/guide/en/fields/mapping/analysis-all-74.json +227 -0
- chronaxis/guide/en/fields/mapping/analysis-all-75.json +239 -0
- chronaxis/guide/en/fields/mapping/analysis-all-76.json +274 -0
- chronaxis/guide/en/fields/mapping/analysis-all-77.json +380 -0
- chronaxis/guide/en/fields/mapping/analysis-all-78.json +313 -0
- chronaxis/guide/en/fields/mapping/analysis-all-79.json +338 -0
- chronaxis/guide/en/fields/mapping/analysis-all-8.json +292 -0
- chronaxis/guide/en/fields/mapping/analysis-all-80.json +304 -0
- chronaxis/guide/en/fields/mapping/analysis-all-81.json +140 -0
- chronaxis/guide/en/fields/mapping/analysis-all-9.json +332 -0
- chronaxis/guide/en/fields/mapping/io_policy-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/mapping_version-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/path_base-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/sections-all-1.json +402 -0
- chronaxis/guide/en/fields/mapping/sections-all-2.json +232 -0
- chronaxis/guide/en/semantics.md +70 -0
- chronaxis/guide/en/tasks.json +290 -0
- chronaxis/guide/en/workflow.md +41 -0
- chronaxis/guide/examples/analysis-imports.yaml +22 -0
- chronaxis/guide/examples/analysis.yaml +23 -0
- chronaxis/guide/examples/batch-minimal.yaml +3 -0
- chronaxis/guide/examples/conditional-energy.yaml +36 -0
- chronaxis/guide/examples/data/activity.csv +6 -0
- chronaxis/guide/examples/data/can/activity.asc +11 -0
- chronaxis/guide/examples/data/can/calculation-minimal.asc +6 -0
- chronaxis/guide/examples/data/can/conditional-energy/part-1.asc +92 -0
- chronaxis/guide/examples/data/can/conditional-energy/part-2.asc +36 -0
- chronaxis/guide/examples/data/can/conditional-energy/signals.dbc +10 -0
- chronaxis/guide/examples/data/can/execution-comparison.asc +12 -0
- chronaxis/guide/examples/data/can/execution-report.asc +4 -0
- chronaxis/guide/examples/data/can/expression-extended.asc +11 -0
- chronaxis/guide/examples/data/can/interval-actual.asc +6 -0
- chronaxis/guide/examples/data/can/preset-charge-energy.asc +15 -0
- chronaxis/guide/examples/data/can/preset-charge-minimal.asc +11 -0
- chronaxis/guide/examples/data/can/preset-command-automatic.asc +11 -0
- chronaxis/guide/examples/data/can/preset-fault-context.asc +7 -0
- chronaxis/guide/examples/data/can/preset-threshold-delay.asc +7 -0
- chronaxis/guide/examples/data/can/preset-threshold-partial.asc +7 -0
- chronaxis/guide/examples/data/can/quality.asc +6 -0
- chronaxis/guide/examples/data/can/quickstart-parts/part1.asc +4 -0
- chronaxis/guide/examples/data/can/quickstart-parts/part2.asc +3 -0
- chronaxis/guide/examples/data/can/quickstart.asc +6 -0
- chronaxis/guide/examples/data/can/rule-condition_duration-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-condition_duration-minimal.asc +19 -0
- chronaxis/guide/examples/data/can/rule-debounce-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-falling_edge-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-hysteresis-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-start_end-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-start_only-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-window_delta-extended.asc +19 -0
- chronaxis/guide/examples/data/can/sequence-outcomes.asc +19 -0
- chronaxis/guide/examples/data/can/signal-types.asc +13 -0
- chronaxis/guide/examples/data/can/start-end.asc +30 -0
- chronaxis/guide/examples/data/can/teaching-base.asc +58 -0
- chronaxis/guide/examples/data/can/teaching.dbc +53 -0
- chronaxis/guide/examples/data/joint-current.csv +5 -0
- chronaxis/guide/examples/data/joint.asc +5 -0
- chronaxis/guide/examples/data/joint.dbc +7 -0
- chronaxis/guide/examples/data/message-clean.asc +6 -0
- chronaxis/guide/examples/data/message-direction.asc +7 -0
- chronaxis/guide/examples/data/message-direction.dbc +7 -0
- chronaxis/guide/examples/data/power.blf +0 -0
- chronaxis/guide/examples/data/power.dbc +6 -0
- chronaxis/guide/examples/data/quality.csv +5 -0
- chronaxis/guide/examples/data/raw-can-example.csv +5 -0
- chronaxis/guide/examples/data/signal-types.csv +5 -0
- chronaxis/guide/examples/data/signals.csv +6 -0
- chronaxis/guide/examples/data/timing.asc +6 -0
- chronaxis/guide/examples/data/timing.dbc +11 -0
- chronaxis/guide/examples/export-can-minimal.yaml +24 -0
- chronaxis/guide/examples/input-csv-minimal.yaml +23 -0
- chronaxis/guide/examples/preset-charge-energy.yaml +41 -0
- chronaxis/guide/examples/preset-charge-minimal.yaml +31 -0
- chronaxis/guide/examples/preset-fault-context.yaml +27 -0
- chronaxis/guide/examples/quality.yaml +19 -0
- chronaxis/guide/examples/sequence-outcomes.yaml +39 -0
- chronaxis/guide/examples/shared/definitions.yaml +14 -0
- chronaxis/guide/examples/signal-enum-minimal.yaml +19 -0
- chronaxis/guide/examples/signal-number-conversion.yaml +24 -0
- chronaxis/guide/examples/window-merged.yaml +28 -0
- chronaxis/guide/fields/analysis/calculations-all-1.json +360 -0
- chronaxis/guide/fields/analysis/calculations-all-2.json +299 -0
- chronaxis/guide/fields/analysis/calculations-all-3.json +70 -0
- chronaxis/guide/fields/analysis/config_version-all-1.json +24 -0
- chronaxis/guide/fields/analysis/dataset-all-1.json +344 -0
- chronaxis/guide/fields/analysis/derived-all-1.json +147 -0
- chronaxis/guide/fields/analysis/diagnostics-all-1.json +69 -0
- chronaxis/guide/fields/analysis/execution-all-1.json +167 -0
- chronaxis/guide/fields/analysis/imports-all-1.json +39 -0
- chronaxis/guide/fields/analysis/intervals-all-1.json +173 -0
- chronaxis/guide/fields/analysis/message_calculations-all-1.json +360 -0
- chronaxis/guide/fields/analysis/message_calculations-all-2.json +255 -0
- chronaxis/guide/fields/analysis/metadata-all-1.json +24 -0
- chronaxis/guide/fields/analysis/outputs-all-1.json +349 -0
- chronaxis/guide/fields/analysis/outputs-all-2.json +302 -0
- chronaxis/guide/fields/analysis/outputs-all-3.json +321 -0
- chronaxis/guide/fields/analysis/outputs-all-4.json +253 -0
- chronaxis/guide/fields/analysis/outputs-all-5.json +244 -0
- chronaxis/guide/fields/analysis/outputs-all-6.json +199 -0
- chronaxis/guide/fields/analysis/overrides-all-1.json +104 -0
- chronaxis/guide/fields/analysis/presets-charge_session-1.json +398 -0
- chronaxis/guide/fields/analysis/presets-charge_session-2.json +114 -0
- chronaxis/guide/fields/analysis/presets-command_response-1.json +376 -0
- chronaxis/guide/fields/analysis/presets-fault_context-1.json +285 -0
- chronaxis/guide/fields/analysis/presets-threshold_excursion-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-condition_duration-1.json +344 -0
- chronaxis/guide/fields/analysis/rules-condition_duration-2.json +27 -0
- chronaxis/guide/fields/analysis/rules-debounce-1.json +335 -0
- chronaxis/guide/fields/analysis/rules-falling_edge-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-hysteresis-1.json +334 -0
- chronaxis/guide/fields/analysis/rules-hysteresis-2.json +27 -0
- chronaxis/guide/fields/analysis/rules-rising_edge-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-start_end-1.json +349 -0
- chronaxis/guide/fields/analysis/rules-start_end-2.json +44 -0
- chronaxis/guide/fields/analysis/rules-start_only-1.json +334 -0
- chronaxis/guide/fields/analysis/rules-window_delta-1.json +356 -0
- chronaxis/guide/fields/analysis/rules-window_delta-2.json +78 -0
- chronaxis/guide/fields/analysis/sequences-all-1.json +394 -0
- chronaxis/guide/fields/analysis/sequences-all-2.json +54 -0
- chronaxis/guide/fields/analysis/signals-variant-1-1.json +349 -0
- chronaxis/guide/fields/analysis/signals-variant-1-2.json +297 -0
- chronaxis/guide/fields/analysis/signals-variant-1-3.json +340 -0
- chronaxis/guide/fields/analysis/signals-variant-1-4.json +175 -0
- chronaxis/guide/fields/analysis/signals-variant-2-1.json +327 -0
- chronaxis/guide/fields/analysis/signals-variant-2-2.json +335 -0
- chronaxis/guide/fields/analysis/signals-variant-2-3.json +289 -0
- chronaxis/guide/fields/analysis/signals-variant-2-4.json +270 -0
- chronaxis/guide/fields/analysis/sources-can_asc-1.json +318 -0
- chronaxis/guide/fields/analysis/sources-can_asc-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-can_asc-3.json +311 -0
- chronaxis/guide/fields/analysis/sources-can_asc-4.json +69 -0
- chronaxis/guide/fields/analysis/sources-can_blf-1.json +317 -0
- chronaxis/guide/fields/analysis/sources-can_blf-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-can_blf-3.json +317 -0
- chronaxis/guide/fields/analysis/sources-memory-1.json +347 -0
- chronaxis/guide/fields/analysis/sources-memory-2.json +110 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-1.json +330 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-10.json +233 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-11.json +225 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-12.json +228 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-13.json +226 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-14.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-15.json +227 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-16.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-17.json +238 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-18.json +239 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-19.json +233 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-20.json +242 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-21.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-22.json +228 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-23.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-24.json +223 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-25.json +290 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-26.json +131 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-3.json +297 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-4.json +226 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-5.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-6.json +227 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-7.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-8.json +238 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-9.json +239 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-1.json +331 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-2.json +327 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-3.json +295 -0
- chronaxis/guide/fields/analysis/sources-variant-6-1.json +319 -0
- chronaxis/guide/fields/analysis/sources-variant-6-2.json +327 -0
- chronaxis/guide/fields/analysis/sources-variant-6-3.json +314 -0
- chronaxis/guide/fields/analysis/sources-variant-6-4.json +91 -0
- chronaxis/guide/fields/analysis/windows-all-1.json +361 -0
- chronaxis/guide/fields/analysis/windows-all-2.json +187 -0
- chronaxis/guide/fields/batch/backend-all-1.json +26 -0
- chronaxis/guide/fields/batch/batch_version-all-1.json +22 -0
- chronaxis/guide/fields/batch/fail_fast-all-1.json +22 -0
- chronaxis/guide/fields/batch/inputs-all-1.json +161 -0
- chronaxis/guide/fields/batch/jobs-all-1.json +58 -0
- chronaxis/guide/fields/batch/process_count-all-1.json +23 -0
- chronaxis/guide/fields/batch/source-all-1.json +22 -0
- chronaxis/guide/fields/batch/template-all-1.json +22 -0
- chronaxis/guide/fields/definitions/derived-all-1.json +121 -0
- chronaxis/guide/fields/definitions/signals-all-1.json +336 -0
- chronaxis/guide/fields/definitions/signals-all-2.json +307 -0
- chronaxis/guide/fields/definitions/signals-all-3.json +305 -0
- chronaxis/guide/fields/definitions/signals-all-4.json +352 -0
- chronaxis/guide/fields/definitions/signals-all-5.json +311 -0
- chronaxis/guide/fields/definitions/signals-all-6.json +254 -0
- chronaxis/guide/fields/definitions/signals-all-7.json +88 -0
- chronaxis/guide/fields/definitions/sources-all-1.json +332 -0
- chronaxis/guide/fields/definitions/sources-all-10.json +307 -0
- chronaxis/guide/fields/definitions/sources-all-11.json +280 -0
- chronaxis/guide/fields/definitions/sources-all-12.json +209 -0
- chronaxis/guide/fields/definitions/sources-all-13.json +219 -0
- chronaxis/guide/fields/definitions/sources-all-14.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-15.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-16.json +232 -0
- chronaxis/guide/fields/definitions/sources-all-17.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-18.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-19.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-2.json +336 -0
- chronaxis/guide/fields/definitions/sources-all-20.json +228 -0
- chronaxis/guide/fields/definitions/sources-all-21.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-22.json +232 -0
- chronaxis/guide/fields/definitions/sources-all-23.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-24.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-25.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-26.json +228 -0
- chronaxis/guide/fields/definitions/sources-all-27.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-28.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-29.json +227 -0
- chronaxis/guide/fields/definitions/sources-all-3.json +306 -0
- chronaxis/guide/fields/definitions/sources-all-30.json +333 -0
- chronaxis/guide/fields/definitions/sources-all-31.json +302 -0
- chronaxis/guide/fields/definitions/sources-all-32.json +319 -0
- chronaxis/guide/fields/definitions/sources-all-33.json +89 -0
- chronaxis/guide/fields/definitions/sources-all-4.json +336 -0
- chronaxis/guide/fields/definitions/sources-all-5.json +313 -0
- chronaxis/guide/fields/definitions/sources-all-6.json +292 -0
- chronaxis/guide/fields/definitions/sources-all-7.json +319 -0
- chronaxis/guide/fields/definitions/sources-all-8.json +315 -0
- chronaxis/guide/fields/definitions/sources-all-9.json +318 -0
- chronaxis/guide/fields/index.json +3432 -0
- chronaxis/guide/fields/mapping/aliases-all-1.json +91 -0
- chronaxis/guide/fields/mapping/analysis-all-1.json +382 -0
- chronaxis/guide/fields/mapping/analysis-all-10.json +307 -0
- chronaxis/guide/fields/mapping/analysis-all-11.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-12.json +329 -0
- chronaxis/guide/fields/mapping/analysis-all-13.json +294 -0
- chronaxis/guide/fields/mapping/analysis-all-14.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-15.json +280 -0
- chronaxis/guide/fields/mapping/analysis-all-16.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-17.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-18.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-19.json +237 -0
- chronaxis/guide/fields/mapping/analysis-all-2.json +342 -0
- chronaxis/guide/fields/mapping/analysis-all-20.json +233 -0
- chronaxis/guide/fields/mapping/analysis-all-21.json +244 -0
- chronaxis/guide/fields/mapping/analysis-all-22.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-23.json +226 -0
- chronaxis/guide/fields/mapping/analysis-all-24.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-25.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-26.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-27.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-28.json +237 -0
- chronaxis/guide/fields/mapping/analysis-all-29.json +233 -0
- chronaxis/guide/fields/mapping/analysis-all-3.json +322 -0
- chronaxis/guide/fields/mapping/analysis-all-30.json +244 -0
- chronaxis/guide/fields/mapping/analysis-all-31.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-32.json +226 -0
- chronaxis/guide/fields/mapping/analysis-all-33.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-34.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-35.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-36.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-37.json +291 -0
- chronaxis/guide/fields/mapping/analysis-all-38.json +315 -0
- chronaxis/guide/fields/mapping/analysis-all-39.json +304 -0
- chronaxis/guide/fields/mapping/analysis-all-4.json +312 -0
- chronaxis/guide/fields/mapping/analysis-all-40.json +307 -0
- chronaxis/guide/fields/mapping/analysis-all-41.json +292 -0
- chronaxis/guide/fields/mapping/analysis-all-42.json +333 -0
- chronaxis/guide/fields/mapping/analysis-all-43.json +296 -0
- chronaxis/guide/fields/mapping/analysis-all-44.json +322 -0
- chronaxis/guide/fields/mapping/analysis-all-45.json +298 -0
- chronaxis/guide/fields/mapping/analysis-all-46.json +347 -0
- chronaxis/guide/fields/mapping/analysis-all-47.json +302 -0
- chronaxis/guide/fields/mapping/analysis-all-48.json +263 -0
- chronaxis/guide/fields/mapping/analysis-all-49.json +301 -0
- chronaxis/guide/fields/mapping/analysis-all-5.json +313 -0
- chronaxis/guide/fields/mapping/analysis-all-50.json +336 -0
- chronaxis/guide/fields/mapping/analysis-all-51.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-52.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-53.json +334 -0
- chronaxis/guide/fields/mapping/analysis-all-54.json +339 -0
- chronaxis/guide/fields/mapping/analysis-all-55.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-56.json +336 -0
- chronaxis/guide/fields/mapping/analysis-all-57.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-58.json +333 -0
- chronaxis/guide/fields/mapping/analysis-all-59.json +325 -0
- chronaxis/guide/fields/mapping/analysis-all-6.json +323 -0
- chronaxis/guide/fields/mapping/analysis-all-60.json +334 -0
- chronaxis/guide/fields/mapping/analysis-all-61.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-62.json +289 -0
- chronaxis/guide/fields/mapping/analysis-all-63.json +383 -0
- chronaxis/guide/fields/mapping/analysis-all-64.json +357 -0
- chronaxis/guide/fields/mapping/analysis-all-65.json +375 -0
- chronaxis/guide/fields/mapping/analysis-all-66.json +351 -0
- chronaxis/guide/fields/mapping/analysis-all-67.json +346 -0
- chronaxis/guide/fields/mapping/analysis-all-68.json +317 -0
- chronaxis/guide/fields/mapping/analysis-all-69.json +313 -0
- chronaxis/guide/fields/mapping/analysis-all-7.json +306 -0
- chronaxis/guide/fields/mapping/analysis-all-70.json +326 -0
- chronaxis/guide/fields/mapping/analysis-all-71.json +316 -0
- chronaxis/guide/fields/mapping/analysis-all-72.json +264 -0
- chronaxis/guide/fields/mapping/analysis-all-73.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-74.json +241 -0
- chronaxis/guide/fields/mapping/analysis-all-75.json +273 -0
- chronaxis/guide/fields/mapping/analysis-all-76.json +382 -0
- chronaxis/guide/fields/mapping/analysis-all-77.json +328 -0
- chronaxis/guide/fields/mapping/analysis-all-78.json +338 -0
- chronaxis/guide/fields/mapping/analysis-all-79.json +304 -0
- chronaxis/guide/fields/mapping/analysis-all-8.json +309 -0
- chronaxis/guide/fields/mapping/analysis-all-80.json +140 -0
- chronaxis/guide/fields/mapping/analysis-all-9.json +329 -0
- chronaxis/guide/fields/mapping/io_policy-all-1.json +19 -0
- chronaxis/guide/fields/mapping/mapping_version-all-1.json +19 -0
- chronaxis/guide/fields/mapping/path_base-all-1.json +19 -0
- chronaxis/guide/fields/mapping/sections-all-1.json +402 -0
- chronaxis/guide/fields/mapping/sections-all-2.json +232 -0
- chronaxis/guide/lookup.py +90 -0
- chronaxis/guide/manifest.json +614 -0
- chronaxis/guide/run_analysis.py +34 -0
- chronaxis/guide/schemas/analysis.schema.json +8451 -0
- chronaxis/guide/schemas/batch-v1.schema.json +172 -0
- chronaxis/guide/schemas/definitions.schema.json +29 -0
- chronaxis/guide/schemas/legacy-import-v1.schema.json +143 -0
- chronaxis/guide/semantics.md +62 -0
- chronaxis/guide/tasks.json +290 -0
- chronaxis/guide/workflow.md +38 -0
- chronaxis/legacy/__init__.py +46 -0
- chronaxis/legacy/batch_read.py +412 -0
- chronaxis/legacy/batch_validation.py +134 -0
- chronaxis/legacy/batch_wire.py +264 -0
- chronaxis/legacy/batch_worker.py +417 -0
- chronaxis/legacy/binding.py +154 -0
- chronaxis/legacy/dbc_cycles.py +47 -0
- chronaxis/legacy/decode_policy.py +28 -0
- chronaxis/legacy/disjunction.py +79 -0
- chronaxis/legacy/export_worker.py +147 -0
- chronaxis/legacy/export_write.py +378 -0
- chronaxis/legacy/message_store.py +562 -0
- chronaxis/legacy/process_read.py +526 -0
- chronaxis/legacy/raw_store.py +341 -0
- chronaxis/legacy/records.py +709 -0
- chronaxis/legacy/required_records.py +122 -0
- chronaxis/legacy/sum.py +403 -0
- chronaxis/legacy/sum_numpy.py +43 -0
- chronaxis/legacy/updates.py +277 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/can_processor.py +138 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/file_processor.py +218 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/utils.py +447 -0
- chronaxis/legacy/worker.py +352 -0
- chronaxis/migration/__init__.py +11 -0
- chronaxis/migration/api.py +270 -0
- chronaxis/migration/ini.py +110 -0
- chronaxis/migration/legacy_sum.py +304 -0
- chronaxis/migration/models.py +83 -0
- chronaxis/migration/publication.py +230 -0
- chronaxis/migration/sclicer.py +241 -0
- chronaxis/migration/slope.py +78 -0
- chronaxis/migration/start_end.py +48 -0
- chronaxis/planning/__init__.py +19 -0
- chronaxis/planning/channels.py +30 -0
- chronaxis/planning/checks.py +447 -0
- chronaxis/planning/config_groups.py +215 -0
- chronaxis/planning/dbc_defaults.py +88 -0
- chronaxis/planning/export_options.py +247 -0
- chronaxis/planning/input_defaults.py +62 -0
- chronaxis/planning/input_paths.py +124 -0
- chronaxis/planning/input_requirements.py +250 -0
- chronaxis/planning/inputs.py +306 -0
- chronaxis/planning/intervals.py +242 -0
- chronaxis/planning/legacy_execution.py +38 -0
- chronaxis/planning/message_calculations.py +171 -0
- chronaxis/planning/models.py +369 -0
- chronaxis/planning/nodes.py +355 -0
- chronaxis/planning/plan.py +294 -0
- chronaxis/planning/preset_models.py +211 -0
- chronaxis/planning/record_execution.py +76 -0
- chronaxis/planning/reports.py +523 -0
- chronaxis/planning/sequences.py +91 -0
- chronaxis/planning/signal_groups.py +61 -0
- chronaxis/planning/signal_validity.py +46 -0
- chronaxis/planning/text_inputs.py +110 -0
- chronaxis/presets.py +270 -0
- chronaxis/results/__init__.py +34 -0
- chronaxis/results/analysis_outcome.py +67 -0
- chronaxis/results/artifact_exports.py +212 -0
- chronaxis/results/binding_metadata.py +54 -0
- chronaxis/results/budget.py +138 -0
- chronaxis/results/can_metadata.py +247 -0
- chronaxis/results/codec.py +246 -0
- chronaxis/results/errors.py +25 -0
- chronaxis/results/export_files.py +216 -0
- chronaxis/results/frame_exports.py +299 -0
- chronaxis/results/frame_patch.py +186 -0
- chronaxis/results/frame_rebuild.py +458 -0
- chronaxis/results/frame_sort.py +223 -0
- chronaxis/results/input_diagnostics.py +51 -0
- chronaxis/results/manifest.py +343 -0
- chronaxis/results/merge_runs.py +207 -0
- chronaxis/results/owned_directory.py +32 -0
- chronaxis/results/raw_exports.py +689 -0
- chronaxis/results/readable.py +355 -0
- chronaxis/results/readable_format.py +94 -0
- chronaxis/results/result.py +734 -0
- chronaxis/results/rows.py +57 -0
- chronaxis/results/signal_exports.py +209 -0
- chronaxis/results/signal_grid.py +219 -0
- chronaxis/results/spool.py +421 -0
- chronaxis/results/summary.py +350 -0
- chronaxis/results/text_can_metadata.py +64 -0
- chronaxis/results/threshold_metadata.py +105 -0
- chronaxis/runner.py +121 -0
- chronaxis/sources/__init__.py +23 -0
- chronaxis/sources/asc.py +412 -0
- chronaxis/sources/blf.py +101 -0
- chronaxis/sources/can_spec.py +179 -0
- chronaxis/sources/can_updates.py +160 -0
- chronaxis/sources/csv_spec.py +133 -0
- chronaxis/sources/descriptions.py +65 -0
- chronaxis/sources/memory.py +299 -0
- chronaxis/sources/models.py +497 -0
- chronaxis/sources/packing.py +170 -0
- chronaxis/sources/protocol.py +221 -0
- chronaxis/sources/raw_can.py +62 -0
- chronaxis/sources/raw_csv.py +470 -0
- chronaxis/sources/raw_csv_layout.py +310 -0
- chronaxis/sources/signal_csv.py +608 -0
- chronaxis/sources/text_can_decode.py +421 -0
- chronaxis/sources/text_can_ref.py +48 -0
- chronaxis/sources/text_can_spec.py +61 -0
- chronaxis/timebase/__init__.py +19 -0
- chronaxis/timebase/conversion.py +364 -0
- chronaxis/timebase/numpy_ops.py +104 -0
- chronaxis/user_guide.py +81 -0
- chronaxis-0.1.0.dev0.dist-info/METADATA +172 -0
- chronaxis-0.1.0.dev0.dist-info/RECORD +917 -0
- chronaxis-0.1.0.dev0.dist-info/WHEEL +5 -0
- chronaxis-0.1.0.dev0.dist-info/entry_points.txt +2 -0
- chronaxis-0.1.0.dev0.dist-info/licenses/LICENSE +21 -0
- chronaxis-0.1.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"""从有限历史块得到完整的条件时间极值、时间均值或BOOL TRUE时长。
|
|
2
|
+
|
|
3
|
+
输入是已封存的新解码历史、原保持上下文、实际绑定、值/BOOL条件编译表达式和原指标请求。
|
|
4
|
+
每次step最多消费一个有限块;时间均值先取得整窗TRUE选择内的有效总时长,再重放同一新历史。
|
|
5
|
+
两遍不再读取原来源,数值分别使用独立参考或NumPy核,最终只换一次单位。
|
|
6
|
+
observation显式限制原domain内的计算观测域,条件两路和均值两遍都传同一范围;
|
|
7
|
+
None兼容原domain及预算,不证明实际观测,不修改原context、绑定或请求窗口。
|
|
8
|
+
完整窗口事实及来源诊断动态计费,超预算明确失败,不保留全窗时间轴或数值列表。
|
|
9
|
+
自有分块者、当前块和结果由close释放;借用历史、上下文、绑定及账本保持。
|
|
10
|
+
预算为新分析层保守估算,单线程账本交接,不承诺进程RSS或旧缓冲受控。
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
# 仅组合新历史、独立纯核和既有结果政策,不改变旧来源读取或解码行为。
|
|
14
|
+
from ..core.decoded_binding import DecodedBindings
|
|
15
|
+
from ..core.expression import CompiledExpression
|
|
16
|
+
from ..core.calculations import CalculationDefinition, calculation_unit, make_calculation_result
|
|
17
|
+
from ..core.models import Interval
|
|
18
|
+
from ..core.time_reduction import TimeReductionResult
|
|
19
|
+
from ..core.conditional_time_reduction import ConditionalTimeCalculationFacts
|
|
20
|
+
from ..core.types import QualityFlag as Q
|
|
21
|
+
from ..results.errors import ResultClosedError
|
|
22
|
+
from .history import DecodedHistoryStore, _metadata_bytes
|
|
23
|
+
from .hold import HoldContext
|
|
24
|
+
from .calculation_blocks import _calculation_observation
|
|
25
|
+
from .historical_conditional_blocks import HistoricalConditionalBlocks
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _append_ranges(existing, incoming):
|
|
29
|
+
"""合并同一种未知的相邻范围,保留真实已知间隔。
|
|
30
|
+
|
|
31
|
+
参数: existing/incoming为已校验有序Interval tuple。返回: 冻结有序tuple。
|
|
32
|
+
异常: ValueError为重叠;实际分配错误传播,调用方须先预约全部候选元数据。
|
|
33
|
+
"""
|
|
34
|
+
# 元数据合并不承担数值计算;只在新范围紧接当前末段时合并。
|
|
35
|
+
result = list(existing)
|
|
36
|
+
for item in incoming:
|
|
37
|
+
if result and item.start_ns < result[-1].end_ns:
|
|
38
|
+
raise ValueError('条件时间指标未知范围重叠')
|
|
39
|
+
if result and item.start_ns == result[-1].end_ns:
|
|
40
|
+
result[-1] = Interval(result[-1].start_ns, item.end_ns)
|
|
41
|
+
else:
|
|
42
|
+
result.append(item)
|
|
43
|
+
return tuple(result)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class HistoricalConditionalTimeCalculation:
|
|
47
|
+
"""拥有有限分块与完整事实,完整EOF后才开放最终CalculationResult。
|
|
48
|
+
|
|
49
|
+
第一遍确定双覆盖与TRUE有效选择的时间均值分母;均值第二遍重新计算相同事实并核对一致。
|
|
50
|
+
失败后只可关闭,清理取消保留自有句柄及金额,不能代扣借用资源。
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
def __init__(self, history, context, bindings, compiled, spec, condition, *, backend='numpy',
|
|
54
|
+
batch_intervals=64, partial_limit=4096, observation=None):
|
|
55
|
+
"""校验输入,预留固定状态,再创建自有分块者与纯数值核。
|
|
56
|
+
|
|
57
|
+
参数: history/context/bindings/compiled为真实新历史及其原运行契约;condition为BOOL条件;spec为
|
|
58
|
+
带BOOL选择条件的min_time/max_time/time_weighted_mean/duration;backend为两实际后端之一;
|
|
59
|
+
batch_intervals限制每块正区间数,partial_limit限制浮点误差状态项数。
|
|
60
|
+
observation为原domain内已核实Interval;None兼容原domain及原预算。
|
|
61
|
+
返回: 尚未消费历史的新owner。
|
|
62
|
+
异常: 类型、能力、预算或构造错误;持续清理失败的原异常附
|
|
63
|
+
historical_conditional_time_calculation_cleanup_owner,恢复环境后可调用其close。
|
|
64
|
+
"""
|
|
65
|
+
# 所有来源身份仍由真实分块者校验;本层先拒绝错误模型和未接线能力。
|
|
66
|
+
if (not isinstance(history, DecodedHistoryStore) or not isinstance(context, HoldContext)
|
|
67
|
+
or not isinstance(bindings, DecodedBindings) or not isinstance(compiled, CompiledExpression)
|
|
68
|
+
or not isinstance(spec, CalculationDefinition) or not isinstance(condition, CompiledExpression)):
|
|
69
|
+
raise TypeError('历史时间指标需真实历史、保持上下文、运行绑定、表达式和CalculationDefinition')
|
|
70
|
+
if spec.operation not in ('min_time', 'max_time', 'time_weighted_mean', 'duration'):
|
|
71
|
+
raise ValueError('当前条件时间归约只接时间极值、均值及BOOL时长')
|
|
72
|
+
if (backend not in ('reference', 'numpy') or type(batch_intervals) is not int
|
|
73
|
+
or batch_intervals < 1 or type(partial_limit) is not int or partial_limit < 1):
|
|
74
|
+
raise ValueError('历史时间指标需合法后端、正块大小与误差项容量')
|
|
75
|
+
# TRUE选择/值覆盖均使用同一个计算域,不改变原上下文或来源同步身份。
|
|
76
|
+
observed = _calculation_observation(context, observation)
|
|
77
|
+
left = max(observed.start_ns, spec.window.start_ns)
|
|
78
|
+
right = min(observed.end_ns, spec.window.end_ns)
|
|
79
|
+
self._actual = Interval(left, right) if left <= right else None
|
|
80
|
+
self._history, self._context, self._bindings = history, context, bindings
|
|
81
|
+
self._observation = observation
|
|
82
|
+
self._compiled, self._spec, self._condition, self._backend = compiled, spec, condition, backend
|
|
83
|
+
self._batch_intervals, self._partial_limit = batch_intervals, partial_limit
|
|
84
|
+
self._budget, self._held_cost = history.budget, 0
|
|
85
|
+
self._blocks = self._current = self._reducer = self._result = self._first_facts = None
|
|
86
|
+
self._closed = self._closing = self._failed = self._finished = False
|
|
87
|
+
self._second_pass = False
|
|
88
|
+
self._fact_cost = 0
|
|
89
|
+
self._reset_facts()
|
|
90
|
+
try:
|
|
91
|
+
# 允许新旧均值核短暂重叠;动态未知/完整refs与有限数组另行先预约。
|
|
92
|
+
self._reserve(131072 + 1024 * partial_limit +
|
|
93
|
+
16 * _metadata_bytes((context, bindings.sources, compiled.identity, condition.identity, spec))
|
|
94
|
+
+ (0 if observation is None else 16 * _metadata_bytes(observation)))
|
|
95
|
+
self._reducer = self._make_reducer()
|
|
96
|
+
self._blocks = self._make_blocks()
|
|
97
|
+
except BaseException as exc:
|
|
98
|
+
# 分块构造尚未赋值时,接管其已公开的自有恢复句柄,借用历史仍不关闭。
|
|
99
|
+
child = getattr(exc, 'conditional_blocks_cleanup_owner', None)
|
|
100
|
+
if child is not None:
|
|
101
|
+
self._blocks = child
|
|
102
|
+
try:
|
|
103
|
+
self.close()
|
|
104
|
+
except BaseException as cleanup:
|
|
105
|
+
exc.add_note(f'历史时间指标构造清理失败: {type(cleanup).__name__}')
|
|
106
|
+
if not self._closed:
|
|
107
|
+
try:
|
|
108
|
+
self.close()
|
|
109
|
+
except BaseException as retry:
|
|
110
|
+
exc.add_note(f'历史时间指标构造清理重试失败: {type(retry).__name__}')
|
|
111
|
+
if not self._closed:
|
|
112
|
+
exc.historical_conditional_time_calculation_cleanup_owner = self
|
|
113
|
+
raise
|
|
114
|
+
|
|
115
|
+
def _make_reducer(self, denominator=None):
|
|
116
|
+
"""创建当前后端纯核,均值分母只来自第一遍完整事实。
|
|
117
|
+
|
|
118
|
+
参数: denominator为有效时长ns或第一遍None。返回: 对应独立TimeReduction。
|
|
119
|
+
异常: 配置、数值模型或分配错误传播。
|
|
120
|
+
"""
|
|
121
|
+
if self._backend == 'reference':
|
|
122
|
+
from ..core.conditional_time_reduction_reference import ReferenceConditionalTimeReduction
|
|
123
|
+
factory = ReferenceConditionalTimeReduction
|
|
124
|
+
else:
|
|
125
|
+
from ..core.conditional_time_reduction_numpy import NumpyConditionalTimeReduction
|
|
126
|
+
factory = NumpyConditionalTimeReduction
|
|
127
|
+
# 静态表达式已有合法dtype/单位;每个块仍须由纯核验证实际一致性。
|
|
128
|
+
return factory(self._spec, self._compiled.root.unit, self._compiled.root.dtype,
|
|
129
|
+
selected_duration_ns=denominator, partial_limit=self._partial_limit)
|
|
130
|
+
|
|
131
|
+
def _make_blocks(self):
|
|
132
|
+
"""重新回读同一封存新历史,不再次扫描原来源。
|
|
133
|
+
|
|
134
|
+
参数: 无。返回: 新HistoricalConditionalBlocks。异常: 原构造/身份/预算错误。
|
|
135
|
+
"""
|
|
136
|
+
# 含time_weighted_mean第二遍的每次新块源都保留相同显式域,两个条件输入再共同传播。
|
|
137
|
+
return HistoricalConditionalBlocks(self._history, self._context, self._bindings,
|
|
138
|
+
self._compiled, self._spec, self._condition, backend=self._backend,
|
|
139
|
+
batch_intervals=self._batch_intervals, observation=self._observation)
|
|
140
|
+
|
|
141
|
+
def _reset_facts(self):
|
|
142
|
+
"""清空本遍计数,新空tuple不复制旧未知诊断。
|
|
143
|
+
|
|
144
|
+
参数: 无。返回: None。异常: 无。
|
|
145
|
+
"""
|
|
146
|
+
self._cursor = None if self._actual is None else self._actual.start_ns
|
|
147
|
+
self._value_duration = self._selected_duration = self._sample_count = 0
|
|
148
|
+
self._unknown, self._condition_unknown, self._refs, self._quality = (), (), (), Q.NONE
|
|
149
|
+
self._known_duration = self._selected_value_unknown = self._false_duration = self._selected_false_duration = 0
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
def closed(self):
|
|
153
|
+
"""读取实际关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
154
|
+
return self._closed
|
|
155
|
+
|
|
156
|
+
@property
|
|
157
|
+
def failed(self):
|
|
158
|
+
"""读取操作失败状态。参数: 无。返回: bool。异常: 无。"""
|
|
159
|
+
return self._failed
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def finished(self):
|
|
163
|
+
"""读取完整分类状态。参数: 无。返回: bool。异常: 无。"""
|
|
164
|
+
return self._finished
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def result(self):
|
|
168
|
+
"""借出完整窗口结果,close后不再开放。
|
|
169
|
+
|
|
170
|
+
参数: 无。返回: CalculationResult。异常: 未完成/失败/关闭时拒绝。
|
|
171
|
+
"""
|
|
172
|
+
self._require_open()
|
|
173
|
+
if self._failed or not self._finished:
|
|
174
|
+
raise RuntimeError('历史时间指标尚未成功完成')
|
|
175
|
+
return self._result
|
|
176
|
+
|
|
177
|
+
def _require_open(self):
|
|
178
|
+
"""拒绝半关闭或已关闭操作。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
179
|
+
if self._closed or self._closing:
|
|
180
|
+
raise ResultClosedError('历史时间指标已关闭或正在清理')
|
|
181
|
+
|
|
182
|
+
def _reserve(self, amount):
|
|
183
|
+
"""先申请本owner费用,并按实际账本接管成功后取消。
|
|
184
|
+
|
|
185
|
+
参数: amount为bytes。返回: None。异常: 预算或取消错误。
|
|
186
|
+
"""
|
|
187
|
+
before = self._budget.ram_bytes
|
|
188
|
+
try:
|
|
189
|
+
self._budget.reserve_ram(amount)
|
|
190
|
+
finally:
|
|
191
|
+
if self._budget.ram_bytes == before + amount:
|
|
192
|
+
self._held_cost += amount
|
|
193
|
+
|
|
194
|
+
def _release(self, amount):
|
|
195
|
+
"""扣账后即更新自有金额,释放前取消保留重试。
|
|
196
|
+
|
|
197
|
+
参数: amount为bytes。返回: None。异常: 原释放/取消错误。
|
|
198
|
+
"""
|
|
199
|
+
before = self._budget.ram_bytes
|
|
200
|
+
try:
|
|
201
|
+
self._budget.release_ram(amount)
|
|
202
|
+
finally:
|
|
203
|
+
if self._budget.ram_bytes == before - amount:
|
|
204
|
+
self._held_cost -= amount
|
|
205
|
+
|
|
206
|
+
def _append_facts(self, facts):
|
|
207
|
+
"""核对连续完整划分,先计费再保存未知区间和完整来源。
|
|
208
|
+
|
|
209
|
+
参数: facts为纯核当前有限ConditionalTimeCalculationFacts。返回: None。
|
|
210
|
+
异常: 结构、身份、重复范围、预算或复制失败,此后只可关闭。
|
|
211
|
+
"""
|
|
212
|
+
if (not isinstance(facts, ConditionalTimeCalculationFacts) or not facts.ranges_retained or facts.spec != self._spec
|
|
213
|
+
or facts.input_unit != self._compiled.root.unit or facts.dtype != self._compiled.root.dtype
|
|
214
|
+
or facts.binding_identity != self._compiled.identity):
|
|
215
|
+
raise ValueError('时间指标块事实与原请求或真实表达式不同')
|
|
216
|
+
actual = facts.actual_window
|
|
217
|
+
if actual is None:
|
|
218
|
+
if self._actual is not None:
|
|
219
|
+
raise ValueError('时间指标块缺失真实交集')
|
|
220
|
+
else:
|
|
221
|
+
if self._actual is None or actual.start_ns != self._cursor or actual.end_ns > self._actual.end_ns:
|
|
222
|
+
raise ValueError('时间指标块必须按原请求真实交集连续推进')
|
|
223
|
+
unknown = sum(item.end_ns - item.start_ns for item in facts.value_unknown_ranges)
|
|
224
|
+
if unknown + facts.value_valid_duration_ns != actual.end_ns - actual.start_ns:
|
|
225
|
+
raise ValueError('时间指标块有效与未知未完整划分')
|
|
226
|
+
# 候选复制期间旧事实仍存在;保守金额含旧/新完整元数据,不靠固定64KiB容纳长诊断。
|
|
227
|
+
candidate_cost = 65536 + 16 * (_metadata_bytes((self._unknown, self._condition_unknown, self._refs)) + _metadata_bytes(facts))
|
|
228
|
+
self._reserve(candidate_cost)
|
|
229
|
+
# 两类未知分别合并,不能将值缺失与条件UNKNOWN相互覆盖或填补已知洞。
|
|
230
|
+
value_unknown = _append_ranges(self._unknown, facts.value_unknown_ranges)
|
|
231
|
+
condition_unknown = _append_ranges(self._condition_unknown, facts.condition_unknown_ranges)
|
|
232
|
+
refs = list(self._refs)
|
|
233
|
+
for item in facts.source_refs:
|
|
234
|
+
if not any(type(item) is type(previous) and item == previous for previous in refs):
|
|
235
|
+
refs.append(item)
|
|
236
|
+
# 只安装已验证候选;即便随后释放取消,本owner仍拥有足够金额并禁止交付前缀。
|
|
237
|
+
old_cost = self._fact_cost
|
|
238
|
+
self._unknown, self._condition_unknown, self._refs = value_unknown, condition_unknown, tuple(refs)
|
|
239
|
+
self._value_duration += facts.value_valid_duration_ns
|
|
240
|
+
self._selected_duration += facts.selected_duration_ns
|
|
241
|
+
self._sample_count += facts.valid_sample_count
|
|
242
|
+
self._known_duration += facts.condition_known_duration_ns
|
|
243
|
+
self._selected_value_unknown += facts.selected_value_unknown_duration_ns
|
|
244
|
+
self._false_duration += facts.false_duration_ns
|
|
245
|
+
self._selected_false_duration += facts.selected_false_duration_ns
|
|
246
|
+
self._quality |= facts.quality
|
|
247
|
+
self._cursor = None if actual is None else actual.end_ns
|
|
248
|
+
self._fact_cost = candidate_cost
|
|
249
|
+
self._release(old_cost)
|
|
250
|
+
|
|
251
|
+
def _facts_snapshot(self):
|
|
252
|
+
"""完整EOF后构造本遍事实,不能以未完前缀冒充整窗。
|
|
253
|
+
|
|
254
|
+
参数: 无。返回: ConditionalTimeCalculationFacts。异常: 完整范围或覆盖矛盾。
|
|
255
|
+
"""
|
|
256
|
+
if self._actual is not None and self._cursor != self._actual.end_ns:
|
|
257
|
+
raise ValueError('时间指标尚未完整消费真实交集')
|
|
258
|
+
duration = 0 if self._actual is None else self._actual.end_ns - self._actual.start_ns
|
|
259
|
+
if self._value_duration + sum(item.end_ns - item.start_ns for item in self._unknown) != duration:
|
|
260
|
+
raise ValueError('时间指标全窗覆盖划分不完整')
|
|
261
|
+
# 条件分区也必须覆盖全部实际域;FALSE已知,不能计入条件未知。
|
|
262
|
+
if self._known_duration + sum(item.end_ns - item.start_ns for item in self._condition_unknown) != duration:
|
|
263
|
+
raise ValueError('条件时间指标全窗条件覆盖划分不完整')
|
|
264
|
+
return ConditionalTimeCalculationFacts(self._spec, self._actual, self._value_duration,
|
|
265
|
+
self._known_duration, self._selected_duration, self._selected_value_unknown,
|
|
266
|
+
self._false_duration, self._selected_false_duration, self._sample_count,
|
|
267
|
+
self._unknown, self._condition_unknown, self._quality, self._compiled.root.unit,
|
|
268
|
+
self._compiled.root.dtype, self._compiled.identity, self._refs)
|
|
269
|
+
|
|
270
|
+
def _finish_pass(self):
|
|
271
|
+
"""均值第一遍切换到第二遍,或完整分类最终结果。
|
|
272
|
+
|
|
273
|
+
参数: 无。返回: True表示进入第二遍,False表示最终完成。
|
|
274
|
+
异常: 覆盖/数值/新分块构造/预算或取消错误传播。
|
|
275
|
+
"""
|
|
276
|
+
# 事实模型和最终分类复制都先预约,借出的第一遍完整诊断也保持计费。
|
|
277
|
+
self._reserve(65536 + 16 * _metadata_bytes((self._unknown, self._condition_unknown, self._refs)))
|
|
278
|
+
facts = self._facts_snapshot()
|
|
279
|
+
if self._spec.operation == 'time_weighted_mean' and not self._second_pass and facts.selected_duration_ns > 0:
|
|
280
|
+
self._first_facts = facts
|
|
281
|
+
self._blocks.close()
|
|
282
|
+
self._blocks = None
|
|
283
|
+
self._reducer = self._make_reducer(facts.selected_duration_ns)
|
|
284
|
+
self._second_pass = True
|
|
285
|
+
# 第一遍诊断由_first_facts持有,其费用保留至close;第二遍另行计费。
|
|
286
|
+
self._fact_cost = 0
|
|
287
|
+
self._reset_facts()
|
|
288
|
+
try:
|
|
289
|
+
self._blocks = self._make_blocks()
|
|
290
|
+
except BaseException as exc:
|
|
291
|
+
child = getattr(exc, 'conditional_blocks_cleanup_owner', None)
|
|
292
|
+
if child is not None:
|
|
293
|
+
self._blocks = child
|
|
294
|
+
raise
|
|
295
|
+
return True
|
|
296
|
+
if self._second_pass and facts != self._first_facts:
|
|
297
|
+
raise ValueError('两遍时间均值的真实覆盖或来源不同')
|
|
298
|
+
if self._spec.operation == 'time_weighted_mean' and not self._second_pass:
|
|
299
|
+
# 全未知或无观测不构造空归约正常0,也不调用第一遍禁止的数值finish。
|
|
300
|
+
unit, _ = calculation_unit(self._spec, facts.input_unit)
|
|
301
|
+
number = TimeReductionResult(None, unit, False, Q.NONE, 0)
|
|
302
|
+
else:
|
|
303
|
+
number = self._reducer.finish()
|
|
304
|
+
duration = 0 if facts.actual_window is None else facts.actual_window.end_ns - facts.actual_window.start_ns
|
|
305
|
+
# 外条件充分全FALSE才证明空选择;主BOOL FALSE且外TRUE的正常零由数值核证据给出。
|
|
306
|
+
all_false = (facts.actual_window == self._spec.window and duration > 0
|
|
307
|
+
and facts.false_duration_ns == duration)
|
|
308
|
+
self._result = make_calculation_result(self._spec, facts, number.value, number.unit, facts.actual_window,
|
|
309
|
+
facts.value_valid_duration_ns, facts.condition_known_duration_ns, facts.selected_duration_ns,
|
|
310
|
+
facts.selected_value_unknown_duration_ns, facts.valid_sample_count,
|
|
311
|
+
facts.value_unknown_ranges, facts.condition_unknown_ranges, facts.quality | number.quality,
|
|
312
|
+
all_false=all_false, calculation_failed=number.calculation_failed)
|
|
313
|
+
self._finished = True
|
|
314
|
+
return False
|
|
315
|
+
|
|
316
|
+
def step(self):
|
|
317
|
+
"""处理至多一个有限块;换遍继续True,最终完整分类才返回False。
|
|
318
|
+
|
|
319
|
+
参数: 无。返回: bool;完成后重复False。异常: 读取/数值/预算/取消错误,随后仅close。
|
|
320
|
+
"""
|
|
321
|
+
self._require_open()
|
|
322
|
+
if self._failed:
|
|
323
|
+
raise RuntimeError('失败的时间指标只能关闭')
|
|
324
|
+
if self._finished:
|
|
325
|
+
return False
|
|
326
|
+
try:
|
|
327
|
+
try:
|
|
328
|
+
self._current = next(self._blocks)
|
|
329
|
+
except StopIteration:
|
|
330
|
+
return self._finish_pass()
|
|
331
|
+
# 按当前有限行数和完整来源预约纯核数组、权重及事实临时,不保存所有窗口值。
|
|
332
|
+
series = self._current.series
|
|
333
|
+
workspace = 65536 + 2048 * len(series.times_ns) + 16 * _metadata_bytes(series.source_refs)
|
|
334
|
+
self._reserve(workspace)
|
|
335
|
+
facts = self._reducer.push(series)
|
|
336
|
+
self._append_facts(facts)
|
|
337
|
+
del facts, series
|
|
338
|
+
self._current.close()
|
|
339
|
+
self._current = None
|
|
340
|
+
self._release(workspace)
|
|
341
|
+
return True
|
|
342
|
+
except BaseException:
|
|
343
|
+
self._failed = True
|
|
344
|
+
raise
|
|
345
|
+
|
|
346
|
+
def close(self):
|
|
347
|
+
"""关闭自有当前块/分块者和金额,保留借用历史及原调用方状态。
|
|
348
|
+
|
|
349
|
+
参数: 无。返回: None,重复关闭安全。异常: 关闭或释放取消可重试。
|
|
350
|
+
"""
|
|
351
|
+
if self._closed:
|
|
352
|
+
return
|
|
353
|
+
self._closing = True
|
|
354
|
+
try:
|
|
355
|
+
if self._current is not None:
|
|
356
|
+
self._current.close()
|
|
357
|
+
self._current = None
|
|
358
|
+
if self._blocks is not None:
|
|
359
|
+
self._blocks.close()
|
|
360
|
+
self._blocks = None
|
|
361
|
+
self._release(self._held_cost)
|
|
362
|
+
finally:
|
|
363
|
+
if self._current is None and self._blocks is None and self._held_cost == 0:
|
|
364
|
+
self._result = self._reducer = self._first_facts = None
|
|
365
|
+
self._history = self._context = self._bindings = self._compiled = self._condition = None
|
|
366
|
+
self._observation = None
|
|
367
|
+
self._unknown = self._condition_unknown = self._refs = ()
|
|
368
|
+
self._closed = True
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"""有限步消费已创建的历史指标分块,交付最终积分 CalculationResult。
|
|
2
|
+
|
|
3
|
+
输入为调用方拥有的新鲜 HistoricalCalculationBlocks 及真实观测范围;不自行构造回读组件。
|
|
4
|
+
每个 step 最多取得一个有限块,独立面积核生成 Terms,既有归约累计跨块数值和事实。
|
|
5
|
+
EOF 后核对完整真实交集,再在已预约元数据空间内按 report/strict 等政策分类。
|
|
6
|
+
只拥有取得的当前块、归约及最终结果;借用 blocks/history/budget 均由调用方关闭。
|
|
7
|
+
新层 RAM 计费含有限块数组与随未知/来源增长的结果容器,不代表整进程 RSS。
|
|
8
|
+
文件读取由被借用的新历史分块执行,本层不写文件、不额外调用旧 reader/decoder。
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# 只组合已有真实模块;两条面积/归约数值路径独立,最终分类为共享非数值规则。
|
|
12
|
+
from ..core.integral_result import make_integral_result
|
|
13
|
+
from ..core.integral_sum import require_partial_limit
|
|
14
|
+
from ..core.integral_terms_reference import compute_integral_terms_reference
|
|
15
|
+
from ..core.integral_terms_numpy import compute_integral_terms_numpy
|
|
16
|
+
from ..core.models import Interval
|
|
17
|
+
from ..core.calculations import CalculationResult
|
|
18
|
+
from ..results.errors import ResultClosedError
|
|
19
|
+
from .history import _metadata_bytes
|
|
20
|
+
from .retained_metadata import retained_metadata_bytes
|
|
21
|
+
from .calculation_blocks import HistoricalCalculationBlocks
|
|
22
|
+
from .integral_reduction import IntegralReduction
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class HistoricalIntegral:
|
|
26
|
+
"""持有一次独占推进的积分分析,完成前不开放前缀结果。
|
|
27
|
+
|
|
28
|
+
blocks 必须尚未消费,存活期间不能由其他调用者推进;本对象不接管其所有权。
|
|
29
|
+
推进/分类/取消异常后只允许 close,数值失败仍作为完整带诊断的结果交付。
|
|
30
|
+
result 借用至 close;独立保留引用需由调用方另计预算。
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, blocks: HistoricalCalculationBlocks, observation: Interval, *, partial_limit: int = 4096):
|
|
34
|
+
"""校验新鲜真实分块者,先预约固定状态再创建自有归约。
|
|
35
|
+
|
|
36
|
+
参数: blocks 为已创建的借用分块者;observation 为原真实域;partial_limit 为误差容量。
|
|
37
|
+
返回: None,初始化新的分析 owner。异常: 配置、预算、分配和取消原样传播。
|
|
38
|
+
持续清理失败时原异常.historical_integral_cleanup_owner 提供重试 close 的句柄。
|
|
39
|
+
"""
|
|
40
|
+
# 已有回读构造清理风险不在本层隐藏,必须由调用方先成功创建并保有句柄。
|
|
41
|
+
if not isinstance(blocks, HistoricalCalculationBlocks) or not isinstance(observation, Interval):
|
|
42
|
+
raise TypeError('历史积分需要真实HistoricalCalculationBlocks和Interval')
|
|
43
|
+
if (blocks.closed or blocks.failed or blocks._closing or blocks._done
|
|
44
|
+
or blocks._pending is not None or blocks._results):
|
|
45
|
+
raise ValueError('历史积分需要尚未消费且开放的分块者')
|
|
46
|
+
if blocks._spec.operation != 'integral':
|
|
47
|
+
raise ValueError('当前历史积分只支持无条件integral')
|
|
48
|
+
limit = require_partial_limit(partial_limit)
|
|
49
|
+
left = max(observation.start_ns, blocks._spec.window.start_ns)
|
|
50
|
+
right = min(observation.end_ns, blocks._spec.window.end_ns)
|
|
51
|
+
actual = Interval(left, right) if left <= right else None
|
|
52
|
+
if actual != blocks._actual:
|
|
53
|
+
raise ValueError('真实观测与分块者的原请求交集不一致')
|
|
54
|
+
# 集成层读取同包既有冻结元数据,身份/单位来自实际compiled,而非外部自由文字。
|
|
55
|
+
self._blocks, self._budget = blocks, blocks._budget
|
|
56
|
+
self._backend = blocks._backend
|
|
57
|
+
self._held_cost = 0
|
|
58
|
+
self._reduction = self._current_block = self._result = None
|
|
59
|
+
self._failed = self._finished = self._closed = self._closing = False
|
|
60
|
+
cost = 65536 + 16 * _metadata_bytes((blocks._spec, observation, blocks._compiled.identity))
|
|
61
|
+
try:
|
|
62
|
+
self._reserve(cost)
|
|
63
|
+
self._reduction = IntegralReduction(self._budget, blocks._spec, observation,
|
|
64
|
+
blocks._compiled.root.unit, blocks._compiled.identity,
|
|
65
|
+
backend=self._backend, partial_limit=limit)
|
|
66
|
+
except BaseException as exc:
|
|
67
|
+
# 自有归约构造持续清理失败时接管其公开恢复句柄,借用blocks仍不关闭。
|
|
68
|
+
child = getattr(exc, 'integral_reduction_cleanup_owner', None)
|
|
69
|
+
if child is not None:
|
|
70
|
+
self._reduction = child
|
|
71
|
+
try:
|
|
72
|
+
self.close()
|
|
73
|
+
except BaseException as cleanup:
|
|
74
|
+
exc.add_note(f'历史积分构造清理失败: {type(cleanup).__name__}')
|
|
75
|
+
if not self._closed:
|
|
76
|
+
try:
|
|
77
|
+
self.close()
|
|
78
|
+
except BaseException as retry:
|
|
79
|
+
exc.add_note(f'历史积分构造清理重试失败: {type(retry).__name__}')
|
|
80
|
+
if not self._closed:
|
|
81
|
+
exc.historical_integral_cleanup_owner = self
|
|
82
|
+
exc.add_note('释放恢复后调用historical_integral_cleanup_owner.close()')
|
|
83
|
+
raise
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def closed(self) -> bool:
|
|
87
|
+
"""读取实际关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
88
|
+
return self._closed # 仅自有金额及子owner已关闭才成立。
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def failed(self) -> bool:
|
|
92
|
+
"""读取操作失败状态。参数: 无。返回: bool。异常: 无。"""
|
|
93
|
+
return self._failed # 与可交付的数值失败CalculationResult区分。
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def finished(self) -> bool:
|
|
97
|
+
"""读取完整EOF分类事实。参数: 无。返回: bool。异常: 无。"""
|
|
98
|
+
return self._finished # 已读最后一块不等于分类完成。
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def result(self) -> CalculationResult:
|
|
102
|
+
"""借出完整窗口最终指标,关闭后不再开放。
|
|
103
|
+
|
|
104
|
+
参数: 无。返回: CalculationResult。异常: 未完成、失败或关闭时拒绝。
|
|
105
|
+
"""
|
|
106
|
+
self._require_open()
|
|
107
|
+
if self._failed or not self._finished:
|
|
108
|
+
raise RuntimeError('历史积分尚未成功完成')
|
|
109
|
+
return self._result # 所有来源/诊断仍由自有计费状态持有。
|
|
110
|
+
|
|
111
|
+
def _require_open(self) -> None:
|
|
112
|
+
"""拒绝关闭或清理中操作。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
113
|
+
if self._closed or self._closing:
|
|
114
|
+
raise ResultClosedError('历史积分已关闭或正在清理')
|
|
115
|
+
|
|
116
|
+
def _reserve(self, amount: int) -> None:
|
|
117
|
+
"""按实际账本增加自有预算,覆盖成功后取消。
|
|
118
|
+
|
|
119
|
+
参数: amount 为 bytes。返回: None。异常: 原预算或取消异常。
|
|
120
|
+
"""
|
|
121
|
+
before = self._budget.ram_bytes
|
|
122
|
+
try:
|
|
123
|
+
self._budget.reserve_ram(amount)
|
|
124
|
+
finally:
|
|
125
|
+
# 单线程借用账本,成功后取消仍须持有该笔金额供关闭。
|
|
126
|
+
if self._budget.ram_bytes == before + amount:
|
|
127
|
+
self._held_cost += amount
|
|
128
|
+
|
|
129
|
+
def _release(self, amount: int) -> None:
|
|
130
|
+
"""按实际账本减少自有预算,释放前取消仍可重试。
|
|
131
|
+
|
|
132
|
+
参数: amount 为 bytes。返回: None。异常: 原释放或取消异常。
|
|
133
|
+
"""
|
|
134
|
+
before = self._budget.ram_bytes
|
|
135
|
+
try:
|
|
136
|
+
self._budget.release_ram(amount)
|
|
137
|
+
finally:
|
|
138
|
+
if self._budget.ram_bytes == before - amount:
|
|
139
|
+
self._held_cost -= amount # 成功后取消不能再扣同一笔。
|
|
140
|
+
|
|
141
|
+
def _finish(self) -> None:
|
|
142
|
+
"""在真实EOF后核对覆盖、预约完整元数据空间并分类。
|
|
143
|
+
|
|
144
|
+
参数: 无。返回: None。异常: 覆盖、预算、分配或取消错误传播。
|
|
145
|
+
"""
|
|
146
|
+
facts = number = result = None
|
|
147
|
+
try:
|
|
148
|
+
self._reduction.finish()
|
|
149
|
+
facts, number = self._reduction.facts, self._reduction.result
|
|
150
|
+
# 分类复用完整refs原tuple;实体费仍保守重计,另为merge_ranges新容器付款。
|
|
151
|
+
self._reserve(65536 + retained_metadata_bytes(facts)
|
|
152
|
+
+ 4096 * len(facts.value_unknown_ranges))
|
|
153
|
+
result = make_integral_result(facts, number)
|
|
154
|
+
self._result = result
|
|
155
|
+
self._finished = True # 安装成功才开放整窗结果,完成后不再消费输入。
|
|
156
|
+
finally:
|
|
157
|
+
# 清理后调用者可保留原TB;这里只断本层临时,不改facts或原异常。
|
|
158
|
+
facts = number = result = None
|
|
159
|
+
|
|
160
|
+
def step(self) -> bool:
|
|
161
|
+
"""最多消费一个有限指标块;确认EOF并完成分类时返回False。
|
|
162
|
+
|
|
163
|
+
参数: 无。返回: True为消费了一块,False为已完成;完成后重复调用安全。
|
|
164
|
+
异常: 真实读取、预算、数值模型、分配、关闭或取消错误;此后只允许close。
|
|
165
|
+
"""
|
|
166
|
+
self._require_open()
|
|
167
|
+
if self._failed:
|
|
168
|
+
raise RuntimeError('失败的历史积分只能关闭')
|
|
169
|
+
if self._finished:
|
|
170
|
+
return False
|
|
171
|
+
terms = None
|
|
172
|
+
try:
|
|
173
|
+
# 只把next的StopIteration当EOF,核内异常不能被误解释为成功结束。
|
|
174
|
+
try:
|
|
175
|
+
self._current_block = next(self._blocks)
|
|
176
|
+
except StopIteration:
|
|
177
|
+
self._finish()
|
|
178
|
+
return False
|
|
179
|
+
# 当前块归本次分析所有;面积临时列(N或N-1)在计算前另行保守预约。
|
|
180
|
+
workspace = 65536 + 1024 * len(self._current_block.series.times_ns)
|
|
181
|
+
self._reserve(workspace)
|
|
182
|
+
compute = compute_integral_terms_reference if self._backend == 'reference' else compute_integral_terms_numpy
|
|
183
|
+
terms = compute(self._current_block.series, self._blocks._spec)
|
|
184
|
+
self._reduction.push(terms)
|
|
185
|
+
terms = None # 不让有限块输出越过其工作空间存活期。
|
|
186
|
+
self._current_block.close()
|
|
187
|
+
self._current_block = None
|
|
188
|
+
self._release(workspace)
|
|
189
|
+
return True
|
|
190
|
+
except BaseException:
|
|
191
|
+
self._failed = True # 前缀和自有句柄保留以便显式关闭,不交付半成品。
|
|
192
|
+
raise
|
|
193
|
+
finally:
|
|
194
|
+
# 归约失败/取消也断本层新面积列引用,原异常TB和实际块owner保持。
|
|
195
|
+
terms = None
|
|
196
|
+
|
|
197
|
+
def close(self) -> None:
|
|
198
|
+
"""关闭自有块、归约和最终结果,不关闭借用分块者或账本。
|
|
199
|
+
|
|
200
|
+
参数: 无。返回: None,重复成功关闭无副作用。
|
|
201
|
+
异常: 子关闭或预算取消原样传播;实际释放前后按句柄/账本支持重试。
|
|
202
|
+
"""
|
|
203
|
+
if self._closed:
|
|
204
|
+
return
|
|
205
|
+
self._closing = True
|
|
206
|
+
try:
|
|
207
|
+
# 每层只释放自己的金额,不能用总账差额替代未知的借用资源成本。
|
|
208
|
+
if self._current_block is not None:
|
|
209
|
+
self._current_block.close()
|
|
210
|
+
self._current_block = None
|
|
211
|
+
if self._reduction is not None:
|
|
212
|
+
self._reduction.close()
|
|
213
|
+
self._release(self._held_cost)
|
|
214
|
+
finally:
|
|
215
|
+
# 释放后取消也可结束;未关闭的子或当前块保留在owner上供再次close。
|
|
216
|
+
reduction_closed = self._reduction is None or self._reduction.closed
|
|
217
|
+
if self._current_block is None and reduction_closed and self._held_cost == 0:
|
|
218
|
+
self._result = self._reduction = self._blocks = None
|
|
219
|
+
self._closed = True
|