Skip to content

[GP-02] Support constant values in objective function #254

Description

@Juliette-Gerbaux

Affected Component

Optimization problem construction (simulation/)

Type of Change

Minor: bug fix or backward-compatible new feature (e.g. new operator)

Description

Constant values are not yet supported in objective functions

Results Impact

Objective functions such as : expression: sum(spillage_cost * spillage + ens_cost * unsupplied_energy + 1) should be supported.

Validation Strategy

Add units tests with constant values in objective.

Process Checklist

Step 1 — Issue Creation

  • Issue created and linked to process GP-02

Step 2 — Triage

  • Process confirmed applicable
  • Assigned to responsible contributor
  • Priority and milestone set (if applicable)

Step 3 — Impact Analysis ⚠️ extended results analysis required

  • Affected modules identified
  • Results impact explicitly stated: change intended / no change intended
  • If results expected to change: before/after difference described and justified
  • Breaking vs backward-compatible change determined

Step 4 — Implementation

  • Code changes implemented
  • Backward compatibility maintained unless explicitly intended as breaking

Step 5 — Testing & Validation

  • If results expected to change: reference studies updated with new expected values
  • If results must not change: solver equivalence confirmed via tests
  • Unit tests cover changed components

Step 6 — CI Validation

  • Type checking passes (mypy)
  • Formatting passes (black, isort)
  • All tests pass in CI (pytest)

Step 7 — Review & Merge

  • PR reviewed; documentation changes included

Step 8 — Versioning

  • pyproject.toml version bumped

Step 9 — Supporting Files

  • AGENTS.md reviewed for impact and updated if needed

Step 10 — Release

  • If a release is needed: follow the release process in the Developer Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions