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

Fix performance of adding SecondOrderCone constraints #561

Merged
merged 1 commit into from
May 14, 2024

Conversation

odow
Copy link
Member

@odow odow commented May 14, 2024

Closes #558

No more excessive time warning:

julia> m = read_from_file("/Users/oscar/Downloads/chainsing-10000-1.cbf.gz");

julia> set_optimizer(m, Gurobi.Optimizer)

julia> optimize!(m)
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (mac64[x86] - Darwin 22.6.0 22G630)

CPU model: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Thread count: 4 physical cores, 8 logical processors, using up to 8 threads

Optimize a model with 99982 rows, 129976 columns and 239954 nonzeros
Model fingerprint: 0x2b705791
Model has 29994 quadratic constraints
Coefficient statistics:
  Matrix range     [7e-01, 1e+01]
  QMatrix range    [1e+00, 1e+00]
  Objective range  [1e+00, 1e+00]
  Bounds range     [0e+00, 0e+00]
  RHS range        [1e-01, 1e+00]
Presolve removed 39994 rows and 29994 columns
Presolve time: 0.20s
Presolved: 59988 rows, 99982 columns, 149970 nonzeros
Presolved model has 29994 second-order cone constraints
Ordering time: 0.03s

Barrier statistics:
 Free vars  : 5000
 AA' NZ     : 1.050e+05
 Factor NZ  : 5.099e+05 (roughly 70 MB of memory)
 Factor Ops : 5.050e+06 (less than 1 second per iteration)
 Threads    : 1

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   4.68074155e+03 -4.99906250e+02  5.75e-01 1.00e-01  6.51e-02     0s
   1   4.69921548e+02 -7.73573774e+01  5.20e-02 1.10e-07  5.94e-03     0s
   2   3.45522818e+02  1.24176198e+02  3.19e-02 2.38e-08  2.92e-03     0s
   3   3.10078553e+02  2.70868745e+02  9.86e-03 1.72e-08  9.21e-04     0s
   4   3.01833318e+02  2.95055320e+02  1.61e-03 3.52e-09  1.69e-04     1s
   5   3.01590650e+02  3.00694119e+02  4.02e-04 2.53e-09  3.57e-05     1s
   6   3.02341676e+02  3.02337977e+02  7.32e-05 6.81e-10  5.03e-06     1s
   7   3.02588566e+02  3.02594472e+02  8.53e-06 1.78e-10  5.31e-07     1s
   8   3.02606087e+02  3.02608990e+02  1.46e-06 1.54e-11  7.19e-08     1s
   9   3.02610526e+02  3.02610336e+02  9.25e-08 7.79e-12  8.32e-09     1s

Barrier solved model in 9 iterations and 0.84 seconds (0.42 work units)
Optimal objective 3.02610526e+02


User-callback calls 149, time in user-callback 0.00 sec

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (3ffff36) to head (5e29569).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #561   +/-   ##
=======================================
  Coverage   80.46%   80.46%           
=======================================
  Files           6        6           
  Lines        2928     2928           
=======================================
  Hits         2356     2356           
  Misses        572      572           

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

@odow odow merged commit 46b138c into master May 14, 2024
4 checks passed
@odow odow deleted the od/fix-soc-update branch May 14, 2024 22:33
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.

Warning: excessive time spent in model updates. when using read_from_file
1 participant