Skip to content

Commit 4dfbc2b

Browse files
authored
Add quadratic relaxation source (#15)
Add a more specific source for how `kgen` handles terms identified as being quadratic.
1 parent 1e88c00 commit 4dfbc2b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/kernel_writer/kernel_write.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ function kgen(num::Num, gradlist::Vector{Num}, raw_outputs::Vector{Symbol}, cons
5858
indep_vars = get_name.(pull_vars(num))
5959

6060
# Deal with quadratic functions differently, if `affine_quadratic` is true.
61-
# This uses Matt's version of affine quadratic relaxations, seen in EAGO's
62-
# `affine_relax_quadratic!` function.
61+
# This uses SCIP's method of handling nonconvex quadratic terms, which is explained
62+
# in section 2.4.3.2 of:
63+
# Vigerske, S. and Gleixner, A. "SCIP: global optimization of mixed-integer
64+
# nonlinear programs in a branch-and-cut framework". Optimization Methods
65+
# and Software, 33:3, 563-593 (2018). DOI: 10.1080/10556788.2017.1335312
66+
# This method is also used in EAGO's `affine_relax_quadratic!` function.
6367
if affine_quadratic==true && is_quadratic(num) # NOTE: When switching to MOI variables, this will be easy to detect
6468
func_name = kgen_affine_quadratic(expr_hash, num, gradlist, func_outputs, constants)
6569
return func_name

0 commit comments

Comments
 (0)