Skip to content

Feature/support custom tracker workflow#34

Open
javlor wants to merge 8 commits into
mainfrom
feature/support-custom-tracker-workflow
Open

Feature/support custom tracker workflow#34
javlor wants to merge 8 commits into
mainfrom
feature/support-custom-tracker-workflow

Conversation

@javlor

@javlor javlor commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This PR adds the data model and API classes needed to supply custom tracker rotation schedules to the SolarFarmer.

  • New enum: TrackerAlgorithm. Adds a TrackerAlgorithm string enum with four values: CUSTOM_ROTATIONS, SLOPE_AWARE_BACKTRACKING, STANDARD_BACKTRACKING, and SUN_TRACKING.
  • Layout model. Adds two new optional fields: tracker_rotation_id (references the custom rotation schedule (by key) that this layout should follow. Required when tracker_algorithm is CUSTOM_ROTATIONS) and dc_ohmic_connector_resistance (expresses DC ohmic wiring loss directly in ohms rather than as a fractional loss).
  • EnergyCalculationOptions model. Adds three new optional fields: custom_tracker_rotations_are_at_middle_of_period (whether the supplied rotation values represent the middle or the start of each time step), return_tracker_rotations_time_series (requests tracker rotation angles in the time-series output), return_tracker_incidence_angles_time_series (requests tracker incidence angles in the time-series output).
  • TrackersConditionsDataset model. Introduces the TrackerCondition and TrackersConditionsDataset Pydantic models that mirror the .NET TrackersConditionsDatasetDto. Includes full protobuf serialization and deserialization through gzip-compressed files, with helpers to convert between Python datetime objects and .NET DateTimeOffset ticks. Deserialization supports both single-file (TrackersConditionsDatasetDto_Protobuf.gz) and multi-part naming (TrackersConditionsDatasetDto_Protobuf001of002.gz).

Workflow 1 auto-discovery:

  • get_files (used by run_energy_calculation when an input folder is given) now automatically discovers any TrackersConditionsDatasetDto_Protobuf*.gz files in the folder and uploads them as customRotationDataTransferFiles. parse_files_from_paths gains a tracker_rotation_paths parameter for explicit path workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant