-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add QP-rand problem #52
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
==========================================
+ Coverage 99.16% 99.18% +0.02%
==========================================
Files 10 11 +1
Lines 360 369 +9
==========================================
+ Hits 357 366 +9
Misses 3 3 ☔ View full report in Codecov by Sentry. |
src/qp_rand_model.jl
Outdated
|
||
## Keyword arguments | ||
|
||
* `dens :: Real`: density of `A`` used to generate the quadratic model (default: `1.0e-4`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with 0 < dens ≤ 1 ?
src/qp_rand_model.jl
Outdated
u = one(R) .+ rand(R, n) | ||
qp = QuadraticModel(c, H; lvar = l, uvar = u) | ||
x0 = zeros(R, n) | ||
qp, x0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x0 should be part of qp.meta. Also, the docstring does not say that you return x0.
test/runtests.jl
Outdated
model, x0 = qp_rand_model(n; dens = dens, convex = false) | ||
@test all(-2.0 .≤ model.meta.lvar .≤ 0.0) | ||
@test all(0.0 .≤ model.meta.uvar .≤ 2.0) | ||
@test all(model.meta.x0 .== x0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it is. No need to return x0 above.
Co-authored-by: Dominique <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
No description provided.