Skip to content

Conversation

@kwesiRutledge
Copy link
Contributor

Introducing this new feature which allows the problem.OptimizationProblem pointer anywhere that a symbolic.Environment interface is expected. This should resolve the issues that we were seeing in the simplex solver with substituting the wrong variables.

@kwesiRutledge kwesiRutledge requested a review from Copilot October 17, 2025 03:58
@kwesiRutledge kwesiRutledge self-assigned this Oct 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the symbolic.Environment interface for the OptimizationProblem type, enabling it to be used wherever a symbolic environment is expected. This change aims to resolve variable substitution issues in the simplex solver.

  • Implements three methods (GetName, TrackVariable, AllTrackedVariables) to satisfy the symbolic.Environment interface
  • Updates variable creation to associate variables with their environment (op)
  • Simplifies variable matrix creation by passing the environment to the constructor
  • Updates the SymbolicMath.go dependency to support the new interface requirements

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
problem/optimization_problem.go Implements symbolic.Environment interface methods and updates variable creation to set Environment field
go.mod Updates SymbolicMath.go dependency to version that supports Environment interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.29%. Comparing base (0214315) to head (1f6ffeb).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
problem/optimization_problem.go 83.87% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   86.76%   87.29%   +0.52%     
==========================================
  Files          27       35       +8     
  Lines        3687     4194     +507     
==========================================
+ Hits         3199     3661     +462     
- Misses        440      476      +36     
- Partials       48       57       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kwesiRutledge kwesiRutledge merged commit a331c4c into main Oct 17, 2025
4 of 5 checks passed
@kwesiRutledge kwesiRutledge deleted the kr/feature/problem-as-environment1 branch October 17, 2025 04:02
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