Skip to content

Commit

Permalink
Gurobi interface (#19)
Browse files Browse the repository at this point in the history
* feat: working gurobi interface

* feat: add objective property

* test: add test_change_of_objective_is_reflected_in_low_level_solver to gurobi_interface

* fix: set proper verbosity at model initiation

* test: add netlib tests for gurobi_interface

* fix: get constr name

* feat: implement set_linear_coefficients for gurobi_interface.Constraint

* feat: implement set_linear_coefficients for gurobi_interface.Objective

* feat: implement constraint.name property

* feat: add _get_expression to gurobi_interface.Objective

* fix: flake8

* fix: cplex -> gurobipy in conditional before TestMissingDependency
  • Loading branch information
phantomas1234 authored Oct 21, 2016
1 parent 25aadaf commit 5cfe239
Show file tree
Hide file tree
Showing 5 changed files with 1,356 additions and 2 deletions.
2 changes: 1 addition & 1 deletion optlang/cplex_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def set_linear_coefficients(self, coefficients):
self.problem.problem.objective.set_linear([(variable.name, float(coefficient)) for variable, coefficient in coefficients.items()])
self._expression_expired = True
else:
raise Exception("Can't change coefficients if constraint is not associated with a model.")
raise Exception("Can't change coefficients if objective is not associated with a model.")


@six.add_metaclass(inheritdocstring)
Expand Down
Loading

0 comments on commit 5cfe239

Please sign in to comment.