Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#2 from RobotLocomotion/purge_gurobi
Browse files Browse the repository at this point in the history
Purge Gurobi.
  • Loading branch information
RussTedrake authored Oct 15, 2023
2 parents dc9ea92 + b431548 commit df11235
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
3 changes: 1 addition & 2 deletions examples/uav_planning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"from pydrake.multibody.plant import AddMultibodyPlantSceneGraph\n",
"from pydrake.multibody.parsing import Parser\n",
"from pydrake.perception import PointCloud\n",
"from pydrake.solvers import GurobiSolver, MosekSolver\n",
"from pydrake.solvers import MosekSolver\n",
"from pydrake.systems.analysis import Simulator\n",
"from pydrake.systems.framework import DiagramBuilder\n",
"\n",
Expand All @@ -34,7 +34,6 @@
"from reproduction.uav.building_generation import *\n",
"from reproduction.util import *\n",
"\n",
"gurobi_license = GurobiSolver.AcquireLicense()\n",
"mosek_license = MosekSolver.AcquireLicense()"
]
},
Expand Down
3 changes: 0 additions & 3 deletions gcs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
)
from pydrake.solvers import (
CommonSolverOption,
GurobiSolver,
MathematicalProgram,
MosekSolver,
SolverOptions,
Expand Down Expand Up @@ -155,8 +154,6 @@ def setPaperSolverOptions(self):
solver_options.SetOption(MosekSolver.id(), "MSK_IPAR_INTPNT_SOLVE_FORM", 1)
solver_options.SetOption(MosekSolver.id(), "MSK_DPAR_MIO_TOL_REL_GAP", 1e-3)
solver_options.SetOption(MosekSolver.id(), "MSK_DPAR_MIO_MAX_TIME", 3600.0)
solver_options.SetOption(GurobiSolver.id(), "MIPGap", 1e-3)
solver_options.SetOption(GurobiSolver.id(), "TimeLimit", 3600.0)
self.options.solver_options = solver_options

def setRoundingStrategy(self, rounding_fn, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions reproduction/bimanual/bimanual_iiwa_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
"from pydrake.multibody.parsing import LoadModelDirectives, Parser, ProcessModelDirectives\n",
"from pydrake.multibody.plant import AddMultibodyPlantSceneGraph\n",
"from pydrake.multibody.tree import RevoluteJoint\n",
"from pydrake.solvers import GurobiSolver, MosekSolver\n",
"from pydrake.solvers import MosekSolver\n",
"from pydrake.systems.framework import DiagramBuilder\n",
"\n",
"from gcs.linear import LinearGCS\n",
"from reproduction.bimanual.helpers import *\n",
"from reproduction.util import *\n",
"\n",
"gurobi_license = GurobiSolver.AcquireLicense()\n",
"mosek_license = MosekSolver.AcquireLicense()"
]
},
Expand Down
3 changes: 1 addition & 2 deletions reproduction/prm_comparison/prm_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"from pydrake.geometry.optimization import IrisInConfigurationSpace, IrisOptions\n",
"from pydrake.multibody.parsing import LoadModelDirectives, Parser, ProcessModelDirectives\n",
"from pydrake.multibody.plant import AddMultibodyPlantSceneGraph\n",
"from pydrake.solvers import GurobiSolver, MosekSolver\n",
"from pydrake.solvers import MosekSolver\n",
"from pydrake.systems.framework import DiagramBuilder\n",
"\n",
"from gcs.linear import LinearGCS\n",
Expand All @@ -43,7 +43,6 @@
"\n",
"from reproduction.util import GcsDir, FindModelFile\n",
"\n",
"gurobi_license = GurobiSolver.AcquireLicense()\n",
"mosek_license = MosekSolver.AcquireLicense()"
]
},
Expand Down
21 changes: 1 addition & 20 deletions reproduction/uav/uav_generated_rooms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
"from pydrake.multibody.plant import AddMultibodyPlantSceneGraph\n",
"from pydrake.multibody.parsing import Parser\n",
"from pydrake.perception import PointCloud\n",
"from pydrake.solvers import GurobiSolver, MosekSolver\n",
"from pydrake.solvers import MosekSolver\n",
"from pydrake.systems.analysis import Simulator\n",
"from pydrake.systems.framework import DiagramBuilder\n",
"\n",
"from reproduction.uav.helpers import *\n",
"from reproduction.util import *\n",
"\n",
"gurobi_license = GurobiSolver.AcquireLicense()\n",
"mosek_license = MosekSolver.AcquireLicense()"
]
},
Expand Down Expand Up @@ -102,24 +101,6 @@
"print(\"Solved\", runs, \"buildings in\", np.round((time.time()-start_time)/60., 4), \"minutes.\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using MICP and Gurobi"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"start_time = time.time()\n",
"plan_through_buildings(save_location, runs, solve_gcs=False, solver=GurobiSolver(), file_addendum=\"gurobi\")\n",
"print(\"Solved\", runs, \"buildings in\", np.round((time.time()-start_time)/60., 4), \"minutes.\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit df11235

Please sign in to comment.