Just discovered a new Java LP solver, and did a quick update to the Pure Java LP Solver Benchmark.

Apache Commons Math (ACM) contains an LP solver. Version 3.6.1 of ACM was released in March 2016. Since then there’s been no updates. I believe v3.6.1 is officially not supported anymore, but v4.0.0 is still a work progress and not released. I always thought this was a bit strange…

Hipparchus was forked from ACM in 2016. Apparently with the main developers moving from ACM to the new Hipparchus project. This could explain why ACM hasn’t been updated since then. I’m primarily surprised I didn’t find out about Hipparchus until now.

Strictly speaking the LP solver in Hipparchus is not new and not necessarily different from the one in ACM, but I reran the Pure Java LP Solver Benchmark with Hipparchus included to find out. Here are the results:

ojAlgo, Hipparchus & ACM compared to CPLEX

The LP solver in Hipparchus has improved since forked from ACM. It’s faster and handles a few more cases/models than ACM. Still, compared to ojAlgo, it is much slower and handles significantly fewer cases.

The versions compared are:

  • Hipparchus 2.2
  • ACM 3.6.1
  • ojAlgo 52.0.0-SNAPSHOT

You may want to read the original Pure Java LP Solver Benchmark post to get the details:

Benchmark Results

Model Name            Solver Name           Result State          Time
ADLITTLE              ACM                   OPTIMAL               21.644625ms           
ADLITTLE              CPLEX                 OPTIMAL               2.868451ms            
ADLITTLE              Hipparchus            OPTIMAL               5.260293ms            
ADLITTLE              ojAlgo                OPTIMAL               1.091382ms            
AFIRO                 ACM                   OPTIMAL               1.29884ms             
AFIRO                 CPLEX                 OPTIMAL               1.391055ms            
AFIRO                 Hipparchus            OPTIMAL               0.823148ms            
AFIRO                 ojAlgo                OPTIMAL               0.301112ms            
AGG                   ACM                   OPTIMAL               167.000546ms          
AGG                   CPLEX                 OPTIMAL               7.726842ms            
AGG                   Hipparchus            OPTIMAL               34.962631ms           
AGG                   ojAlgo                OPTIMAL               5.718714ms            
AGG2                  ACM                   OPTIMAL               813.284222ms          
AGG2                  CPLEX                 OPTIMAL               11.74726ms            
AGG2                  Hipparchus            OPTIMAL               96.809732ms           
AGG2                  ojAlgo                OPTIMAL               8.171202ms            
AGG3                  ACM                   OPTIMAL               820.1127ms            
AGG3                  CPLEX                 OPTIMAL               11.864168ms           
AGG3                  Hipparchus            OPTIMAL               104.029883ms          
AGG3                  ojAlgo                OPTIMAL               9.846324ms            
BANDM                 ACM                   FAILED                TIMEOUT               
BANDM                 CPLEX                 OPTIMAL               13.386505ms           
BANDM                 Hipparchus            FAILED                TIMEOUT               
BANDM                 ojAlgo                OPTIMAL               31.851977ms           
BEACONFD              ACM                   OPTIMAL               191.590583ms          
BEACONFD              CPLEX                 OPTIMAL               5.000415ms            
BEACONFD              Hipparchus            OPTIMAL               37.023864ms           
BEACONFD              ojAlgo                OPTIMAL               3.074742ms            
BLEND                 ACM                   OPTIMAL               26.416073ms           
BLEND                 CPLEX                 OPTIMAL               2.792674ms            
BLEND                 Hipparchus            OPTIMAL               7.306609ms            
BLEND                 ojAlgo                OPTIMAL               1.005236ms            
BOEING1               ACM                   FAILED                UNSTABLE              
BOEING1               CPLEX                 OPTIMAL               17.468899ms           
BOEING1               Hipparchus            FAILED                UNSTABLE              
BOEING1               ojAlgo                OPTIMAL               141.358322ms          
BOEING2               ACM                   FAILED                UNSTABLE              
BOEING2               CPLEX                 OPTIMAL               4.691281ms            
BOEING2               Hipparchus            FAILED                UNSTABLE              
BOEING2               ojAlgo                OPTIMAL               8.989652ms            
BORE3D                ACM                   FAILED                TIMEOUT               
BORE3D                CPLEX                 OPTIMAL               5.055457ms            
BORE3D                Hipparchus            FAILED                TIMEOUT               
BORE3D                ojAlgo                OPTIMAL               3.456446ms            
BRANDY                ACM                   FAILED                TIMEOUT               
BRANDY                CPLEX                 OPTIMAL               8.520516ms            
BRANDY                Hipparchus            FAILED                TIMEOUT               
BRANDY                ojAlgo                OPTIMAL               7.21827ms             
CAPRI                 ACM                   FAILED                UNSTABLE              
CAPRI                 CPLEX                 OPTIMAL               8.327037ms            
CAPRI                 Hipparchus            FAILED                UNSTABLE              
CAPRI                 ojAlgo                OPTIMAL               45.807463ms           
DEGEN2                ACM                   FAILED                TIMEOUT               
DEGEN2                CPLEX                 OPTIMAL               20.740736ms           
DEGEN2                Hipparchus            OPTIMAL               1786.38462ms          
DEGEN2                ojAlgo                OPTIMAL               242.32134ms           
E226                  ACM                   FAILED                TIMEOUT               
E226                  CPLEX                 OPTIMAL               11.069458ms           
E226                  Hipparchus            OPTIMAL               92.910781ms           
E226                  ojAlgo                OPTIMAL               16.670109ms           
ETAMACRO              ACM                   FAILED                TIMEOUT               
ETAMACRO              CPLEX                 OPTIMAL               16.462966ms           
ETAMACRO              Hipparchus            OPTIMAL               1067.294064ms         
ETAMACRO              ojAlgo                OPTIMAL               44.106707ms           
FFFFF800              ACM                   FAILED                TIMEOUT               
FFFFF800              CPLEX                 OPTIMAL               18.735497ms           
FFFFF800              Hipparchus            FAILED                TIMEOUT               
FFFFF800              ojAlgo                OPTIMAL               88.950183ms           
FINNIS                ACM                   FAILED                TIMEOUT               
FINNIS                CPLEX                 OPTIMAL               13.818495ms           
FINNIS                Hipparchus            FAILED                TIMEOUT               
FINNIS                ojAlgo                OPTIMAL               314.872777ms          
FORPLAN               ACM                   FAILED                UNSTABLE              
FORPLAN               CPLEX                 OPTIMAL               8.894963ms            
FORPLAN               Hipparchus            OPTIMAL               239.978635ms          
FORPLAN               ojAlgo                OPTIMAL               9.780629ms            
GROW15                ACM                   FAILED                TIMEOUT               
GROW15                CPLEX                 OPTIMAL               34.779264ms           
GROW15                Hipparchus            FAILED                TIMEOUT               
GROW15                ojAlgo                OPTIMAL               326.21745ms           
GROW22                ACM                   FAILED                TIMEOUT               
GROW22                CPLEX                 OPTIMAL               109.099592ms          
GROW22                Hipparchus            FAILED                WRONG                 
GROW22                ojAlgo                OPTIMAL               1669.318161ms         
GROW7                 ACM                   FAILED                TIMEOUT               
GROW7                 CPLEX                 OPTIMAL               11.710556ms           
GROW7                 Hipparchus            FAILED                TIMEOUT               
GROW7                 ojAlgo                OPTIMAL               18.688514ms           
ISRAEL                ACM                   OPTIMAL               103.563223ms          
ISRAEL                CPLEX                 OPTIMAL               5.685817ms            
ISRAEL                Hipparchus            OPTIMAL               21.941009ms           
ISRAEL                ojAlgo                OPTIMAL               7.192418ms            
KB2                   ACM                   OPTIMAL               6.720416ms            
KB2                   CPLEX                 OPTIMAL               2.016831ms            
KB2                   Hipparchus            OPTIMAL               2.361479ms            
KB2                   ojAlgo                OPTIMAL               0.562869ms            
LOTFI                 ACM                   OPTIMAL               546.936236ms          
LOTFI                 CPLEX                 OPTIMAL               4.722516ms            
LOTFI                 Hipparchus            OPTIMAL               74.253037ms           
LOTFI                 ojAlgo                OPTIMAL               2.791933ms            
PILOT4                ACM                   FAILED                UNSTABLE              
PILOT4                CPLEX                 OPTIMAL               43.948191ms           
PILOT4                Hipparchus            FAILED                UNSTABLE              
PILOT4                ojAlgo                OPTIMAL               719.960153ms          
RECIPELP              ACM                   OPTIMAL               91.984139ms           
RECIPELP              CPLEX                 OPTIMAL               2.647297ms            
RECIPELP              Hipparchus            OPTIMAL               18.608792ms           
RECIPELP              ojAlgo                OPTIMAL               1.076786ms            
SC105                 ACM                   OPTIMAL               29.210945ms           
SC105                 CPLEX                 OPTIMAL               2.386598ms            
SC105                 Hipparchus            OPTIMAL               6.913549ms            
SC105                 ojAlgo                OPTIMAL               0.784871ms            
SC205                 ACM                   OPTIMAL               196.771752ms          
SC205                 CPLEX                 OPTIMAL               4.356467ms            
SC205                 Hipparchus            OPTIMAL               35.378977ms           
SC205                 ojAlgo                OPTIMAL               3.716465ms            
SC50A                 ACM                   OPTIMAL               3.713265ms            
SC50A                 CPLEX                 OPTIMAL               1.637211ms            
SC50A                 Hipparchus            OPTIMAL               1.447684ms            
SC50A                 ojAlgo                OPTIMAL               0.340661ms            
SC50B                 ACM                   OPTIMAL               3.824722ms            
SC50B                 CPLEX                 OPTIMAL               1.352292ms            
SC50B                 Hipparchus            OPTIMAL               1.598036ms            
SC50B                 ojAlgo                OPTIMAL               0.362158ms            
SCAGR25               ACM                   FAILED                TIMEOUT               
SCAGR25               CPLEX                 OPTIMAL               12.959499ms           
SCAGR25               Hipparchus            FAILED                TIMEOUT               
SCAGR25               ojAlgo                OPTIMAL               109.784739ms          
SCAGR7                ACM                   OPTIMAL               104.018329ms          
SCAGR7                CPLEX                 OPTIMAL               4.137262ms            
SCAGR7                Hipparchus            OPTIMAL               22.542501ms           
SCAGR7                ojAlgo                OPTIMAL               2.415491ms            
SCFXM1                ACM                   FAILED                TIMEOUT               
SCFXM1                CPLEX                 OPTIMAL               12.276423ms           
SCFXM1                Hipparchus            FAILED                TIMEOUT               
SCFXM1                ojAlgo                OPTIMAL               14.529425ms           
SCFXM2                ACM                   FAILED                TIMEOUT               
SCFXM2                CPLEX                 OPTIMAL               27.587144ms           
SCFXM2                Hipparchus            FAILED                TIMEOUT               
SCFXM2                ojAlgo                OPTIMAL               108.236033ms          
SCORPION              ACM                   OPTIMAL               998.703727ms          
SCORPION              CPLEX                 OPTIMAL               6.786039ms            
SCORPION              Hipparchus            OPTIMAL               128.931352ms          
SCORPION              ojAlgo                OPTIMAL               10.188435ms           
SCSD1                 ACM                   FAILED                UNSTABLE              
SCSD1                 CPLEX                 OPTIMAL               6.155597ms            
SCSD1                 Hipparchus            OPTIMAL               395.60068ms           
SCSD1                 ojAlgo                OPTIMAL               6.227832ms            
SCTAP1                ACM                   FAILED                TIMEOUT               
SCTAP1                CPLEX                 OPTIMAL               7.630562ms            
SCTAP1                Hipparchus            OPTIMAL               304.390071ms          
SCTAP1                ojAlgo                OPTIMAL               14.170339ms           
SEBA                  ACM                   FAILED                TIMEOUT               
SEBA                  CPLEX                 OPTIMAL               9.795508ms            
SEBA                  Hipparchus            FAILED                TIMEOUT               
SEBA                  ojAlgo                OPTIMAL               212.850247ms          
SHARE1B               ACM                   OPTIMAL               276.393102ms          
SHARE1B               CPLEX                 OPTIMAL               5.268421ms            
SHARE1B               Hipparchus            OPTIMAL               49.818582ms           
SHARE1B               ojAlgo                OPTIMAL               5.161425ms            
SHARE2B               ACM                   OPTIMAL               31.388091ms           
SHARE2B               CPLEX                 OPTIMAL               3.36695ms             
SHARE2B               Hipparchus            OPTIMAL               6.988701ms            
SHARE2B               ojAlgo                OPTIMAL               1.098968ms            
STAIR                 ACM                   FAILED                UNSTABLE              
STAIR                 CPLEX                 OPTIMAL               16.468764ms           
STAIR                 Hipparchus            FAILED                UNSTABLE              
STAIR                 ojAlgo                OPTIMAL               42.203827ms           
STOCFOR1              ACM                   OPTIMAL               34.564914ms           
STOCFOR1              CPLEX                 OPTIMAL               2.932963ms            
STOCFOR1              Hipparchus            OPTIMAL               9.242821ms            
STOCFOR1              ojAlgo                OPTIMAL               1.156741ms            
TUFF                  ACM                   FAILED                TIMEOUT               
TUFF                  CPLEX                 OPTIMAL               11.663417ms           
TUFF                  Hipparchus            FAILED                TIMEOUT               
TUFF                  ojAlgo                FAILED                TIMEOUT               
VTP-BASE              ACM                   FAILED                UNSTABLE              
VTP-BASE              CPLEX                 OPTIMAL               3.198082ms            
VTP-BASE              Hipparchus            OPTIMAL               46.099096ms           
VTP-BASE              ojAlgo                OPTIMAL               2.165055ms            

Leave a Reply