|
5 | 5 | # See also: subroutines.jl, in this folder |
6 | 6 |
|
7 | 7 | using DocStringExtensions, EAGO |
| 8 | + |
| 9 | +abstract type ExtendGPU <: EAGO.ExtensionType end |
| 10 | + |
8 | 11 | """ |
9 | 12 | $(TYPEDEF) |
10 | 13 |
|
11 | | -The ExtendGPU integrator is meant to be paired with the SourceCodeMcCormick |
12 | | -package. A required component of ExtendGPU is the function `convex_func`, |
| 14 | +The PointwiseGPU integrator is meant to be paired with the SourceCodeMcCormick |
| 15 | +package. A required component of PointwiseGPU is the function `convex_func`, |
13 | 16 | which should take arguments corresponding to the McCormick tuple [cc, cv, hi, lo] |
14 | 17 | for each branch variable in the problem and return a vector of convex |
15 | 18 | relaxation evaluations of the objective function, of length equal to the |
16 | 19 | length of the inputs. |
17 | 20 |
|
18 | 21 | $(TYPEDFIELDS) |
19 | 22 | """ |
20 | | -Base.@kwdef mutable struct ExtendGPU <: EAGO.ExtensionType |
| 23 | +Base.@kwdef mutable struct PointwiseGPU <: ExtendGPU |
21 | 24 | "A user-defined function taking argument `p` and returning a vector |
22 | 25 | of convex evaluations of the objective function" |
23 | 26 | convex_func |
@@ -49,9 +52,9 @@ Base.@kwdef mutable struct ExtendGPU <: EAGO.ExtensionType |
49 | 52 | multistart_points::Int = 1 |
50 | 53 | end |
51 | 54 |
|
52 | | -function ExtendGPU(convex_func, var_count::Int; alpha::Float64 = 0.01, node_limit::Int = 50000, |
| 55 | +function PointwiseGPU(convex_func, var_count::Int; alpha::Float64 = 0.01, node_limit::Int = 50000, |
53 | 56 | prepopulate::Bool = true, multistart_points::Int = 1) |
54 | | - return ExtendGPU(convex_func, var_count, node_limit, alpha, |
| 57 | + return PointwiseGPU(convex_func, var_count, node_limit, alpha, |
55 | 58 | Vector{Float64}(undef, node_limit), Vector{Float64}(undef, node_limit), Vector{NodeBB}(undef, node_limit), 0, |
56 | 59 | Matrix{Float64}(undef, node_limit, var_count), |
57 | 60 | Matrix{Float64}(undef, node_limit, var_count), prepopulate, multistart_points) |
|
0 commit comments