scipopt / SCIPpp

A C++ wrapper for SCIP
Apache License 2.0
19 stars 4 forks source link

Make the upper and lower bounds in `addVar` optional #1

Closed joshua-morris closed 11 months ago

joshua-morris commented 11 months ago

Copying the API of PySCIPOpt, if the upper bound or lower bound are specified as std::nullopt then they are -SCIPinfinity or SCIPinfinity respectively

codecov[bot] commented 11 months ago

Codecov Report

Merging #1 (dc8f1c5) into main (6da1dd9) will decrease coverage by 1.34%. The diff coverage is 85.71%.

@@            Coverage Diff             @@
##             main       #1      +/-   ##
==========================================
- Coverage   96.92%   95.58%   -1.34%     
==========================================
  Files           8        8              
  Lines         130      136       +6     
  Branches       35       37       +2     
==========================================
+ Hits          126      130       +4     
  Misses          3        3              
- Partials        1        3       +2     
Files Changed Coverage Δ
source/model.cpp 94.91% <66.66%> (-3.34%) :arrow_down:
include/scippp/model.hpp 95.45% <100.00%> (+1.01%) :arrow_up:
hedtke commented 11 months ago

Thank you for this contribution. It is a good idea to be in sync with the Python version.

Please also extend this new feature to all other addVar(s) methods.

Please try to increase the coverage a bit.

Almost ready to merge

hedtke commented 11 months ago

@joshua-morris Will you work on this or should I take it up and add it to v1.0.0?

joshua-morris commented 11 months ago

@joshua-morris Will you work on this or should I take it up and add it to v1.0.0?

I can work on this when I get a chance. But you're welcome to take it over.

hedtke commented 11 months ago

Proposed changes are included in #3