CurrentModule = Convex
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This release contains a large number of changes, including some breaking changes.
- This release involved a substantial rewrite of Convex.jl to integrate better
with MathOptInterface. (#504)
x + Awill error ifxis a scalar variable andAis an array. Instead, usex * ones(size(A)) + A.- The
RelativeEntropyAtomnow returns a scalar value instead o elementwise values. This does not affect the result ofrelative_entropy. - The function
constantshould be used instead of the typeConstant(which now refers to exclusively real constants). - The constraint
a <= bnow producesa - b in Nonpositives()instead ofb - a in Nonnegatives(). The primal solutions are equivalent, but the dual variable associated with such constraints is now reversed in sign. (Following the convention in MathOptInterface, the dual ofa <= bis always, negative, regardless of optimization sense.) (#593)
- The syntaxes
dot(*),dot(/)anddot(^)have been removed in favor of explicit broadcasting (x .* y,x ./ y, andx .^ y). These were (mild) type piracy. In addition,vecdot(x,y)has been removed. Calldot(vec(x), vec(y))instead. (#524) - The function
constraints, used to get constraints associated to an individual variable, has been renamedget_constraints(#527) - DCP violations now throw a
DCPViolationErrorexception, rather than a warning. Relatedly,Convex.emit_dcp_warningshas been removed (#523) - Removed the undocumented an internal function
latex_formulation(#551) - The strict inequalities
>and<have been deprecated. They will be removed in the next breaking release. Note that these never enforced strict inequalities, but instead were equivalent to>=and<=respectively (#555) - The functions
norm_inf,norm_1, andnorm_frohave been deprecated. They will be removed in the next breaking release (#567)
- SDP, SOC, and exponential cone constraints now have dual values populated (#504)
geomeansupports more than 2 arguments (#504)- Added
Convex.Optimizer(#511), (#530), (#534) - Added
write_to_file(#531) - Added
entropy_elementwise(#570) normonAbstractExprobjects now supports matrices (treating them like vectors), matching Base's behavior (#528)
sumlargesteigsnow enforces that it's argument is hermitian. (#504)- Type piracy
of
imagandrealhas been removed. This should not affect use of Convex. (#504) - Bugfix:
dotnow correctly complex-conjugates its first argument (#524) - Add tests and fix a number of bugs in various atoms (#546), (#550), (#554), (#556), (#558), (#559), (#561), (#562), (#563), (#565), (#566), (#567) (#568)
- Improved the documentation (#517), (#529)
- Refactored the tests into a functional form (#532)
- Added
test/Project.toml(#536) - Refactored imports to explicitly overload methods (#537)
- Tidied and renamed various atoms and files clarity. This should be non-breaking as no public API was changed. (#538), (#539), (#540), (#541), (#543), (#545)
- Removed the unused file
src/problem_depot/problems/benchmark.jl(#560)
- Convex's piracy of
hcatandvcatwas made less severe, allowing precompilation of Convex.jl on Julia 1.10.
- Add support for LDLFactorizations v0.10 #496.
- Replace
randn(m, 1)withrandn(m)to be more Julian #498. - Add support for indexing expressions with
CartesianIndex#500.
- Add support for LDLFactorizations v0.9 #493.
- Fix use of deprecated functions from
AbstractTrees#494.
- Minimum required version of Julia is now v1.6
- Updated to MathOptInterface v1.0
- As a consequence, many previously deprecated solver calls may stop working.
For example, instead of
() -> SCS.Optimizer(verbose = 0), useMOI.OptimizerWithAttributes(SCS.Optimizer, "verbose" => 0).
- As a consequence, many previously deprecated solver calls may stop working.
For example, instead of
- Fix typo in
logisticlossfor length-1 expressions which caused errors (reported in #458, fixed in #469).
- Updated to become compatible with MathOptInterface v0.10, which enables compatibility with the latest version of many solvers (#467, #468).
- Improve numerical stability when evaluating
logsumexp(#457). Thanks@JinraeKim!
- Use sparse factorization for checking for positive semi-definiteness in
quadformwhen possible (#457). Thanks@mtanneau! - Add
assume_psd=falseargument to skip checking for positive semi-definiteness inquadform(#456).
- Increase the tolerance used in checking if a matrix is positive-semi definite in
quadform(#453). Thanks@numbermaniac!
- fix
quadformfor positive semi-definite matrices (fixes a regression introduced in v0.14.11 that required strictly positive semi-definite inputs) #450.
- fix size of result of
evaluateonIndexAtoms #448. Thanks@hurak!
- fix
quadformin the complex case #444. Thanks@lrnv!
- declare compatibility with BenchmarkTools v1.0 #441
- fix some tests in
lp_dual_abs_atom#439. Thanks@moehle!
- a complete port of cvxquad thanks to
@dstahlke, yielding new functionsquantum_relative_entropy,quantum_entropy,trace_logm,trace_mpower, andlieb_ando, and conesGeomMeanHypoCone,GeomMeanEpiCone, andRelativeEntropyEpiCone(#418). Thanks a ton for the awesome contribution@dstahlke!
- declare compatibility with BenchmarkTools v0.7 #434
- Use
MOI.instantiateto create the optimizer, which allows users to pass anMOI.OptimizerWithAttributesto configure solver settings #431. Thanks@odow!
- allow
sumlargest(x,k),sumsmallest(x,k), andsumlargesteigs(x,k)fork=0(simply returnsConstant(0)). (#429).
- fixed a bug where the values of variables were being converted to
Float64even if the problem was solved in high precision. (#427).
- update compatibility bounds for BenchmarkTools 0.6
- added lasso, ridge, and elastic net regression examples (#420). Thanks to
@PaulSoderlind!
- there was a bug causing
conjto act in-place (reported in #416), which has been fixed (#417). This bug appears to have existed since the introduction ofconjin Convex.jl v0.5.0.
- Changes to the
signof atoms:- The sign of
sumlargesteigshas been changed fromPositive()toNoSign(), to allow non-positive-semidefinite inputs (#409). This has the potential to break code that required that sign to be positive. If you run into this problem, please file an issue so we can figure out a workaround. - The sign of
eigminandeigmaxhas been changed fromPositive()toNoSign()(#413). This is a bugfix because in generaleigminandeigmaxdo not need to return a positive quantity (for non-positive-semidefinite inputs). Again, this has the potential to break code that required that sign to be positive. If you run into this problem, please file an issue so we can figure out a workaround.
- The sign of
- Removal of deprecations:
lambdaminandlambdamaxhas been deprecated toeigminandeigmaxsince Convex v0.13.0. This deprecation has been removed, so your code must be updated to calleigminoreigmaxinstead (#412).norm(x, p)wherexis a matrix expression has been deprecated toopnorm(x,p)since Convex v0.8.0. This deprecation has been removed, so your code must be updated to callopnorm(x, p)instead (#412). Currently,norm(x,p)for a matrix expressionxwill error, but in Convex.jl v0.15.0 it will returnnorm(vec(x), p).Convex.clearmemory()has been deprecated and unnecessary since Convex v0.12.5. This deprecation has been removed, so if this function is in your code, just delete it (#412).vecnorm(x, p)has been deprecated tonorm(vec(x), p)since Convex v0.8.0. This deprecation has been removed, so your code must be updated to callnorm(vec(x),p)instead (#412).
- Other changes:
Convex.DCP_WARNINGSwas introduced in Convex v0.13.1 to allow turning off Convex.jl's DCP warnings. This has been removed in favor of the functionConvex.emit_dcp_warnings()(Commit 481fa02).
- updated
nuclearnormandsumlargesteigsto allow complex variables, and allow the argument ofsumlargesteigsto be non-positive-semi-definite (#409). Thanks to@dstahlke!
- add unary
+forSignandComplexSignto allow single-argumenthcatandvcatto work (#405). Thanks to@dstahlke!
- fix #403 by adding the keyword argument
silent_solvertosolve!.
- fix #401 by allowing
diagm(x).
- fix #398 by allowing
fix!'d variables inquadform.
- You can now create your own variable types by subtyping
AbstractVariable. See the docs for more information. You can also add constraints directly to a variable usingadd_constraint!(#358). - Functions
vexity(x::Variable),sign(x::Variable), andevaluate(x::Variable)should now be the preferred way to access properties of a variable; likewise useset_value!to set the initial value of a variable (#358). - To create integer or binary constraints, use the
VarTypeenum (for example,Variable(BinVar)). Access or set this viavartypeandvartype!(#358).
- Make
add_constraint!actually add the constraint to the problem.
- Add
Convex.MAXDIGITS. Thanks to@riccardomurri!
- The intermediate layer has changed from MathProgBase.jl to
MathOptInterface.jl
(#330). To solve problems,
one should pass a MathOptInterface optimizer constructor, such as
SCS.Optimizer, orMOI.OptimizerWithAttributes(SCS.Optimizer, "verbose" => 0). lambdaminandlambdamaxhave been deprecated in favor ofeigminandeigmax(#357).- Many "internal" functions and types are no longer exported, such as the atoms, types corresponding to constraints and vexities, etc. (#357).
evaluate(x::Variable)andevaluate(c::Constant)now return scalars and vectors as appropriate, instead of(1,1)- and(d,1)-matrices (#359). This affects functions which used to return(1,1)-matrices; for example, nowevaluate(quadform(...))yields a scalar.