Skip to content

Conversation

@kwesiRutledge
Copy link
Contributor

Summary

Introduces a new output to ToLPStandardForm1 and ToLPStandardForm2 which maps the original variables of the optimization problem to the standard form version.

Notes

  • Maybe we need to add more logic to the Polynomial.Simplify method?

Resolves #19

@kwesiRutledge kwesiRutledge requested a review from Copilot October 9, 2025 03:34
@kwesiRutledge kwesiRutledge self-assigned this Oct 9, 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 introduces a new variable mapping output to the ToLPStandardForm1 and ToLPStandardForm2 methods, which provides a mapping from the original variables of an optimization problem to their standard form representation.

Key changes include:

  • Modified method signatures to return an additional variable map parameter
  • Updated all existing test calls to handle the new return value
  • Added comprehensive test cases to verify the variable mapping functionality

Reviewed Changes

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

File Description
problem/optimization_problem.go Modified ToLPStandardForm1, ToLPStandardForm2, and ToProblemWithAllPositiveVariables methods to return variable mappings
testing/problem/optimization_problem_test.go Updated existing test calls and added new test cases for variable mapping verification
go.mod Updated SymbolicMath.go dependency version from v0.2.5 to v0.2.6

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 9, 2025

Codecov Report

❌ Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.43%. Comparing base (0214315) to head (675e306).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
problem/optimization_problem.go 82.14% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   86.76%   87.43%   +0.66%     
==========================================
  Files          27       35       +8     
  Lines        3687     4169     +482     
==========================================
+ Hits         3199     3645     +446     
- Misses        440      470      +30     
- Partials       48       54       +6     

☔ 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 2058881 into main Oct 9, 2025
4 of 5 checks passed
@kwesiRutledge kwesiRutledge deleted the kr/feature/reveal-lp-variable-maps1 branch October 9, 2025 03:41
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.

Create a method that reveals which positive variables in the transformed problem in LPFormat1 or LPFormat2 correspond to the original problem variables

2 participants