Skip to main content
. 2026 May 1;11(5):309. doi: 10.3390/biomimetics11050309
Algorithm 3 Simplex method
Input: The highest-quality vertice Xg, intermediate-quality vertice Xb, lowest-quality vertice Xs
Output: new candidate solution Xnew
Xc=Xg+Xb2   (Centroid calculation)
Xr=Xc+α×(Xc−Xs)   (Reflection operation)
if f(Xr)<f(Xg) then   (Expansion operation)
   Xe=Xc+γ(Xr−Xc)
   If f(Xe)<f(Xg) then
     Xs=Xe
   else
     Xs=Xr
   end if
end if
if f(Xs)<f(Xr) then   (Compression operation)
   Xt=Xc+β(Xs−Xc)
   if f(Xt)<f(Xs) then
      Xs=Xt
   end if
end if
if f(Xg)≤f(Xr)≤f(Xs) then   (Contraction operation)
   Xw=Xc−δ(Xs−Xc)
    if f(Xw)<f(Xs) then
       Xs=Xw
   else
      Xs=Xr
   end if
end if
Xnew=Xs