Skip to content

Commit

Permalink
release 0.5.3, for DOI tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Sep 7, 2020
1 parent e4f539a commit d3e9749
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Expand Up @@ -4,13 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [0.5.3] - unreleased
# [0.5.3] - 2020-09-07
## Changed
- Fix regression introduced in previous version (optimization based dimension reduction was
- coniclifts: Fix regression introduced in previous version (optimization based dimension reduction was
inadvertently disabled).
- Remove an unstated assumption in the ``relent.py`` precompiled atom (and ``DualSageCone.compile``)
- coniclifts: Remove an unstated assumption in the ``relent.py`` precompiled atom (and ``DualSageCone.compile``)
that certain inputs had to be linear (rather than affine) expressions of decision variables.
- Minor change to how DualSageCones compute violations.
- coniclifts: Minor change to how DualSageCones compute violations.

# [0.5.2] - 2020-07-05
## Added
Expand Down
7 changes: 7 additions & 0 deletions TODO.md
Expand Up @@ -21,3 +21,10 @@ infeasible solution.
## sageopt.interop.cvxpy
Write tests. Setup a continuous-integration environment which
installs CVXPY.

## String formatting.

When naming Variable objects, I often use explicit string concatenation,
when code like ``name='symbol_{%s}' % j`` would accomplish the same effect.
I should switch to the more succinct and readable version.

9 changes: 4 additions & 5 deletions sageopt/coniclifts/constraints/set_membership/sage_cones.py
Expand Up @@ -482,7 +482,7 @@ def violation(self, norm_ord=np.inf, rough=False):

def sigma_x(self, y, tol=1e-8):
"""
If :math:`X = \\mathbb{R}^n`, then return :math:`\\infty` when :math:`\|y\|_2 > \\texttt{tol}`
If :math:`X = \\mathbb{R}^n`, then return :math:`\\infty` when :math:`\\|y\\|_2 > \\texttt{tol}`
and :math:`0` otherwise. If :math:`X` is a proper subset of :math:`\\mathbb{R}^n`, then
return the value of the support function of :math:`X`, evaluated at :math:`y`:
Expand Down Expand Up @@ -710,7 +710,7 @@ def violation(self, norm_ord=np.inf, rough=False):
Setting ``rough=False`` computes violation by solving an optimization
problem. Setting ``rough=True`` computes violation by taking norms of
residuals of appropriate elementwise equations and inequalities involving
``self.v`` and auxiliary varibles.
``self.v`` and auxiliary variables.
Notes
-----
Expand All @@ -734,12 +734,12 @@ def violation(self, norm_ord=np.inf, rough=False):
residual = mat @ mu_i[:self._n] - lowerbounds
residual[residual >= 0] = 0
curr_viol = np.linalg.norm(residual, ord=norm_ord)
if self.X is not None:
if (self.X is not None) and (not np.isnan(curr_viol)):
AbK_val = self.X.A @ mu_i + v[i] * self.X.b
AbK_viol = PrimalProductCone.project(AbK_val, self.X.K)
curr_viol += AbK_viol
# as applicable, solve an optimization problem to compute the violation.
if curr_viol > 0 or curr_viol == np.NaN and not rough:
if (curr_viol > 0 or np.isnan(curr_viol)) and not rough:
temp_var = Variable(shape=(self._lifted_n,), name='temp_var')
cons = [mat @ temp_var[:self._n] >= lowerbounds]
if self.X is not None:
Expand Down Expand Up @@ -914,4 +914,3 @@ def _default_exp_covers(self):
if prob.status in {CL_SOLVED, CL_INACCURATE} and prob.value < -100:
expcovers[i][:] = False
return expcovers

0 comments on commit d3e9749

Please sign in to comment.