Skip to content

Commit

Permalink
Clean up unused cost offset
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Dec 11, 2023
1 parent 1e6a01c commit 8ce28ae
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions qpbenchmark/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ class Problem(qpsolvers.Problem):
"""Quadratic program.
Attributes:
cost_offset: Cost offset, used to compare solution cost to a known
optimal one. Defaults to zero.
name: Name of the problem, for reporting.
"""

cost_offset: float
name: str

def __init__(
Expand All @@ -47,11 +44,9 @@ def __init__(
lb: Optional[np.ndarray],
ub: Optional[np.ndarray],
name: str,
cost_offset: float = 0.0,
):
"""Quadratic program in qpsolvers format."""
super().__init__(P, q, G, h, A, b, lb, ub)
self.cost_offset = cost_offset
self.name = name

def to_dense(self):
Expand All @@ -70,7 +65,6 @@ def to_dense(self):
self.lb,
self.ub,
name=self.name,
cost_offset=self.cost_offset,
)

def to_sparse(self):
Expand All @@ -90,5 +84,4 @@ def to_sparse(self):
self.lb,
self.ub,
name=self.name,
cost_offset=self.cost_offset,
)

0 comments on commit 8ce28ae

Please sign in to comment.