Skip to content

Add custom solution properties to Excel serializer output#325

Draft
Copilot wants to merge 4 commits into
masterfrom
copilot/add-new-excel-serializer
Draft

Add custom solution properties to Excel serializer output#325
Copilot wants to merge 4 commits into
masterfrom
copilot/add-new-excel-serializer

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 12, 2026

Custom solution properties defined via Solution.customProperties() were only serialized to JSON, not Excel reports.

Changes

Event Model

  • Added solutionProperties field to SolutionGeneratedEvent to preserve computed properties through the pipeline
  • Updated Executor to pass properties from WorkUnitResult when creating events

Excel Serialization

  • Extract unique custom property keys from all results using LinkedHashSet (preserves insertion order)
  • Dynamically append custom property columns after standard columns (Instance, Algorithm, Score, etc.)
  • Update pivot table area reference to include custom columns
  • Use null for missing properties to maintain Excel cell type consistency

Implementation Example

// In your Solution class
@Override
public Map<String, Function<MySolution, Object>> customProperties() {
    return Map.of(
        "vehicleCount", s -> s.countVehicles(),
        "avgDistance", s -> s.calculateAverageDistance()
    );
}

These properties now appear as additional columns in the "Raw Results" sheet, automatically discovered from any solution that defines them.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 12, 2026 15:54
…alizer

Co-authored-by: rmartinsanta <55482385+rmartinsanta@users.noreply.github.com>
Co-authored-by: rmartinsanta <55482385+rmartinsanta@users.noreply.github.com>
…rties

Co-authored-by: rmartinsanta <55482385+rmartinsanta@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement new excel serializer for data export Add custom solution properties to Excel serializer output Feb 12, 2026
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.

2 participants