Remove the GetObjective() function from the solution.Solution Interface + Upgrade SymbolicMath.go version#28
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the deprecated GetObjective() function from the solution.Solution interface and updates the SymbolicMath.go dependency to version v0.3.1. The GetObjective() method is no longer needed since GetOptimalObjectiveValue() now provides this functionality.
Key changes:
- Removed
GetOptimalValue()method from theSolutioninterface andDummySolutionimplementation - Removed the
Objectivefield fromDummySolutionstruct and all test instantiations - Updated SymbolicMath.go dependency from v0.2.6 to v0.3.1
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| solution/solution.go | Removed GetOptimalValue() method signature from interface and added comprehensive documentation for GetValueMap() |
| solution/dummy_solution.go | Removed Objective field and GetOptimalValue() implementation from DummySolution |
| testing/solution/solution_test.go | Removed Objective field assignments from all test case DummySolution instantiations |
| go.mod | Updated SymbolicMath.go dependency from v0.2.6 to v0.3.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 86.76% 87.37% +0.61%
==========================================
Files 27 35 +8
Lines 3687 4183 +496
==========================================
+ Hits 3199 3655 +456
- Misses 440 472 +32
- Partials 48 56 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Improved comment for GetStatus interface method. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The
GetObjective()function signature that we require for thesolution.Solutioninterface is not necessary anymore given the existence of the new method:GetOptimalObjectiveValue. Removing the unnecessary getter.Also, looks like the SymbolicMath.go version wasn't upgraded since v0.2.6. Whoops!