Skip to content

Commit

Permalink
fix: updates to support for Gurobi 12
Browse files Browse the repository at this point in the history
  • Loading branch information
vagmcs committed Nov 15, 2024
1 parent b48c175 commit 9cb3780
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you a
3. Available solvers:
* Open source [LpSolve](http://sourceforge.net/projects/lpsolve/) can be used for LP and MIP.
* Open source [oJSolver](http://ojalgo.org/) can be used for LP, QP and MIP.
* Proprietary solver [Gurobi 9](http://www.gurobi.com/) can be used for efficiently solving LP, QP, QCQP and MIP.
* Proprietary solver [Gurobi 12](http://www.gurobi.com/) can be used for efficiently solving LP, QP, QCQP and MIP.
* Proprietary solver [Mosek 9](https://www.mosek.com/) can be used for efficiently solving LP, QP, QCQP and MIP.

## How to get Optimus
Expand Down
18 changes: 5 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,11 @@ lazy val lpsolve = Project("solver-lp", file("solver-lp"))
.settings(libraryDependencies += Dependencies.LpSolve)

// Build settings for Optimus gurobi solver
lazy val gurobi =
if (file("lib/gurobi.jar").exists) Project("solver-gurobi", file("solver-gurobi"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-gurobi")
.settings(Compile / unmanagedJars += file("lib/gurobi.jar"))
else Project("solver-gurobi", file("solver-gurobi"))
.settings {
logger.warn {
"Building in the absence of support for the Gurobi solver [ 'gurobi.jar' not found in 'lib' directory ]."
}
Seq(name := "optimus-solver-gurobi", publish := {}, publishLocal := {})
}
lazy val gurobi = Project("solver-gurobi", file("solver-gurobi"))
.dependsOn(core % "compile->compile ; test->test")
.enablePlugins(AutomateHeaderPlugin)
.settings(name := "optimus-solver-gurobi")
.settings(libraryDependencies += Dependencies.Gurobi)

// Build settings for Optimus mosek solver
lazy val mosek =
Expand Down
4 changes: 4 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ object Dependencies {
final val ScalaTestPlus = "3.2.11.0"

final val LpSolve = "5.5.2.0"
final val Gurobi = "12.0.0"
final val ojAlgorithms = "51.4.0"
final val Trove = "3.1.0"
final val ScalaXML = "2.3.0"
Expand Down Expand Up @@ -56,4 +57,7 @@ object Dependencies {

// oj! Algorithms library for linear and quadratic programming
lazy val ojAlgorithms: ModuleID = "org.ojalgo" % "ojalgo" % v.ojAlgorithms

// Gurobi library for mathematical programming
lazy val Gurobi: ModuleID = "com.gurobi" % "gurobi" % v.Gurobi
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package optimus.optimization

import gurobi._
import com.gurobi.gurobi._
import optimus.algebra._
import optimus.optimization.enums.PreSolve._
import optimus.optimization.enums.{ PreSolve, SolutionStatus }
Expand Down

0 comments on commit 9cb3780

Please sign in to comment.