Skip to content

Added a new method for simplifying constraints in a given optimizatio…#11

Merged
kwesiRutledge merged 2 commits intomainfrom
kr/feature/add-simple-positive-variable-detection1
Aug 5, 2025
Merged

Added a new method for simplifying constraints in a given optimizatio…#11
kwesiRutledge merged 2 commits intomainfrom
kr/feature/add-simple-positive-variable-detection1

Conversation

@kwesiRutledge
Copy link
Contributor

…n problem

@kwesiRutledge kwesiRutledge requested a review from Copilot August 5, 2025 19:41
@kwesiRutledge kwesiRutledge self-assigned this Aug 5, 2025
@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.86%. Comparing base (0214315) to head (6ed74ab).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
problem/optimization_problem.go 91.30% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   86.76%   86.86%   +0.09%     
==========================================
  Files          27       32       +5     
  Lines        3687     4034     +347     
==========================================
+ Hits         3199     3504     +305     
- Misses        440      477      +37     
- Partials       48       53       +5     

☔ 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.

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 adds a new method SimplifyConstraints to optimization problems that removes redundant constraints by checking if each constraint is implied by others already in the problem.

  • Adds SimplifyConstraints() method to remove redundant constraints from optimization problems
  • Introduces utility function ConstraintIsRedundantGivenOthers to check constraint redundancy
  • Implements Copy() and CopyVariable() methods for deep copying optimization problems

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
testing/problem/optimization_problem_test.go Comprehensive test suite covering redundant constraint removal, empty constraints, and single constraint scenarios
problem/utils.go New utility function to check if a constraint is redundant given other constraints
problem/optimization_problem.go Implementation of SimplifyConstraints, Copy, and CopyVariable methods
go.mod Updates SymbolicMath.go dependency from v0.2.2 to v0.2.3
Comments suppressed due to low confidence (1)

@kwesiRutledge kwesiRutledge merged commit 250db11 into main Aug 5, 2025
5 checks passed
@kwesiRutledge kwesiRutledge deleted the kr/feature/add-simple-positive-variable-detection1 branch August 5, 2025 19:50
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