If the solution \(\vec{x}\) is infeasible, i.e. if there is any \(i\) or any \(j\) such that $$g_i(\vec{x})>0 or |h_j(\vec{x})| - currentEps >0$$:
Estimate the gradient of the constraint surrogate function(s) (go a tiny step in each dimension in the direction of constraint increase).
Take cobra$ri$mmax
random realizations in the 'feasible parallelepiped'
and select among them the best feasible solution, based on the surrogates,
Check whether the new solution is for every dimension in the bounds
[cobra$lower,cobra$upper]
of the search region.
If not, set the gradient to 0 in these dimensions and re-iterate from step 2.
There is no guarantee but a good chance, that the returned solution z
will be feasible.
repairInfeasRI2(x, gReal, rbf.model, cobra, checkIt = FALSE)
an infeasible solution vector \(\vec{x}\) of dimension d
a vector \((g_1(\vec{x}),\ldots,g_m(\vec{x}), h_1(\vec{x}),\ldots,h_r(\vec{x}))\) holding the real constraint values at \(\vec{x}\)
the constraint surrogate models
parameter list, we need here
lower
lower bounds of search region
upper
upper bounds of search region
ri
a list with all parameters for repairInfeasRI2
,
see defaultRI
trueFuncForSurrogate
if TRUE (only for diagnostics), use the true constraint
functions instead of the constraint surrogate models rbf.model
fn
true functions, only needed in case of
trueFuncForSurrogate==TRUE
[FALSE] if TRUE, perform a check whether the returned solution is really feasible. Needs access to the true constraint functions.
z
, a vector of dimension d
with a repaired (hopefully feasible) solution
For further details see [Koch15a] Koch, P.; Bagheri, S.; Konen, W. et al. "A New Repair Method For Constrained Optimization". Proc. 17th Genetic and Evolutionary Computation Conference (GECCO), 2015.