Skip to content

Commit bfd5a7f

Browse files
Update MOO scimlfunctions.jl
Added num_dimensions and fitness_scheme to the MOO struct, constructor and docs.
1 parent 3371acd commit bfd5a7f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/scimlfunctions.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,8 @@ MultiObjectiveOptimizationFunction{iip}(F, adtype::AbstractADType = NoAD();
20032003
pattern of the `cons_jac_prototype`.
20042004
- `cons_hess_colorvec`: an array of color vector according to the SparseDiffTools.jl definition for
20052005
the sparsity pattern of the `cons_hess_prototype`.
2006+
-`num_dimensions`: the number of dimensions of the constraint box for OptimizationBBO.jl.
2007+
-`fitness_scheme`: the fitness scheme for OptimizationBBO.jl.
20062008
20072009
When [Symbolic Problem Building with ModelingToolkit](https://docs.sciml.ai/Optimization/stable/tutorials/symbolic/) interface is used the following arguments are also relevant:
20082010
@@ -2025,7 +2027,7 @@ The fields of the MultiObjectiveOptimizationFunction type directly match the nam
20252027

20262028
struct MultiObjectiveOptimizationFunction{
20272029
iip, AD, F, J, H, HV, C, CJ, CJV, CVJ, CH, HP, CJP, CHP, O,
2028-
EX, CEX, SYS, LH, LHP, HCV, CJCV, CHCV, LHCV} <:
2030+
EX, CEX, SYS, LH, LHP, HCV, CJCV, CHCV, LHCV, ND, FS<:FitnessScheme} <:
20292031
AbstractOptimizationFunction{iip}
20302032
f::F
20312033
adtype::AD
@@ -2050,6 +2052,8 @@ struct MultiObjectiveOptimizationFunction{
20502052
cons_jac_colorvec::CJCV
20512053
cons_hess_colorvec::CHCV
20522054
lag_hess_colorvec::LHCV
2055+
num_dimensions::ND
2056+
fitness_scheme::FS
20532057
end
20542058

20552059
"""
@@ -3976,7 +3980,9 @@ function MultiObjectiveOptimizationFunction{iip}(f, adtype::AbstractADType = NoA
39763980
nothing,
39773981
cons_hess_colorvec = __has_colorvec(f) ? f.colorvec :
39783982
nothing,
3979-
lag_hess_colorvec = nothing) where {iip}
3983+
lag_hess_colorvec = nothing,
3984+
num_dimensions = 0,
3985+
fitness_scheme = TupleFitnessScheme) where {iip}
39803986
isinplace(f, 2; has_two_dispatches = false, isoptimization = true)
39813987
sys = sys_or_symbolcache(sys, syms, paramsyms)
39823988
MultiObjectiveOptimizationFunction{
@@ -3990,14 +3996,14 @@ function MultiObjectiveOptimizationFunction{iip}(f, adtype::AbstractADType = NoA
39903996
typeof(expr), typeof(cons_expr), typeof(sys), typeof(lag_h),
39913997
typeof(lag_hess_prototype), typeof(hess_colorvec),
39923998
typeof(cons_jac_colorvec), typeof(cons_hess_colorvec),
3993-
typeof(lag_hess_colorvec)
3999+
typeof(lag_hess_colorvec), typeof(num_dimensions), typeof(fitness_scheme)
39944000
}(f, adtype, jac, hess,
39954001
hv, cons, cons_j, cons_jvp,
39964002
cons_vjp, cons_h,
39974003
hess_prototype, cons_jac_prototype,
39984004
cons_hess_prototype, observed, expr, cons_expr, sys,
39994005
lag_h, lag_hess_prototype, hess_colorvec, cons_jac_colorvec,
4000-
cons_hess_colorvec, lag_hess_colorvec)
4006+
cons_hess_colorvec, lag_hess_colorvec, num_dimensions, fitness_scheme)
40014007
end
40024008

40034009
function BVPFunction{iip, specialize, twopoint}(f, bc;

0 commit comments

Comments
 (0)