Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert constraint starting values #3571

Merged
merged 6 commits into from
Nov 12, 2023
Merged

Convert constraint starting values #3571

merged 6 commits into from
Nov 12, 2023

Conversation

blegat
Copy link
Member

@blegat blegat commented Nov 12, 2023

When writing this post, I found out when when starting integer dual starting values, COSMO was failing here:
https://github.com/oxfordcontrol/COSMO.jl/blob/dd6a6fdbda91231e4c3a108d072389e50a5003ac/src/interface.jl#L167
because y0 does not have the right element type.
As we are doing the conversion for variable starting values, I thought we might need to do it for constraints as well:

_convert_if_something(T, value),

Now, we might want to use MOI.Utilities.value_type as the value type of the function may not be the value type of the variables.

Copy link

codecov bot commented Nov 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b13812d) 98.38% compared to head (c0053de) 98.20%.
Report is 1 commits behind head on master.

❗ Current head c0053de differs from pull request most recent head a6f15fe. Consider uploading reports for the commit a6f15fe to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3571      +/-   ##
==========================================
- Coverage   98.38%   98.20%   -0.18%     
==========================================
  Files          37       37              
  Lines        5624     5627       +3     
==========================================
- Hits         5533     5526       -7     
- Misses         91      101      +10     
Files Coverage Δ
src/constraints.jl 96.85% <100.00%> (+0.05%) ⬆️

... and 4 files with indirect coverage changes

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

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

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

I simplified the implementation a little

src/constraints.jl Outdated Show resolved Hide resolved
@odow odow merged commit 3015564 into master Nov 12, 2023
@odow odow deleted the bl/con_start_convert branch November 12, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants