+
    Y°³jô—  ã                   óú   € ^ RI t ^ RIt^ RIHt ^RIHtHt ^RIH	t	H
t
 ^RIHtHtHtHtHt ^RIHt ^RIHt ]P*                  ! ]4      P.                  t]P*                  ! ]4      P2                  t ! R R	4      tR# )
é    N)Ú
lsq_linear)ÚModelsÚ	Quadratic)ÚOptionsÚ	Constants)Úcauchy_geometryÚspider_geometryÚnormal_byrd_omojokunÚtangential_byrd_omojokunÚ$constrained_tangential_byrd_omojokun)Úqr_tangential_byrd_omojokun)Úget_arrays_tolc                   óä  a € ] tR t^t o RtR t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       t]P                  R	 4       t]R
 4       t]P                  R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR tR tR tR tR tR tR tR tR,R ltR tR t R t!R  t"R! t#R" t$R# t%R$ t&R-R% lt'R& t(R' t)R( t*R) t+R* t,R+t-V t.R# ).ÚTrustRegionz
Trust-region framework.
c                ó\  € RV n         Wn        \        V P                  W P                  4      V n        W0n        ^ V n        V P                  4        \        P                  ! V P                  4      V n        \        P                  ! V P                  4      V n        \        P                  ! V P                  4      V n        \        P                  ! V P                   4      V n        V P%                  V P&                  4       V\(        P*                  ,          V n        V P.                  V n        R# )aa  
Initialize the trust-region framework.

Parameters
----------
pb : `cobyqa.problem.Problem`
    Problem to solve.
options : dict
    Options of the solver.
constants : dict
    Constants of the solver.

Raises
------
`cobyqa.utils.MaxEvalError`
    If the maximum number of evaluations is reached.
`cobyqa.utils.TargetSuccess`
    If a nearly feasible point has been found with an objective
    function value below the target.
`cobyqa.utils.FeasibleSuccess`
    If a feasible point has been found for a feasibility problem.
`numpy.linalg.LinAlgError`
    If the initial interpolation system is ill-defined.
ç        N)Ú_penaltyÚ_pbr   ÚpenaltyÚ_modelsÚ
_constantsÚ_best_indexÚset_best_indexÚnpÚzerosÚm_linear_ubÚ_lm_linear_ubÚm_linear_eqÚ_lm_linear_eqÚm_nonlinear_ubÚ_lm_nonlinear_ubÚm_nonlinear_eqÚ_lm_nonlinear_eqÚset_multipliersÚx_bestr   ÚRHOBEGÚ_resolutionÚ
resolutionÚ_radius)ÚselfÚpbÚoptionsÚ	constantss   &&&&Úa/home/luca/screen-checking/.venv/lib/python3.14/site-packages/scipy/_external/cobyqa/framework.pyÚ__init__ÚTrustRegion.__init__   sÑ   € ð4 ˆŒð ŒÜ˜dŸh™h¨·±Ó>ˆŒØ#Œð ˆÔØ×ÑÔô  ŸXšX d×&6Ñ&6Ó7ˆÔÜŸXšX d×&6Ñ&6Ó7ˆÔÜ "§¢¨×)<Ñ)<Ó =ˆÔÜ "§¢¨×)<Ñ)<Ó =ˆÔØ×Ñ˜TŸ[™[Ô)ð #¤7§>¡>Õ2ˆÔØ—‘ˆŽó    c                ó.   € V P                   P                  # )zD
Number of variables.

Returns
-------
int
    Number of variables.
)r   Ún©r*   s   &r.   r3   ÚTrustRegion.nL   s   € ð �x‰x�z‰zÐr1   c                ó.   € V P                   P                  # )zl
Number of linear inequality constraints.

Returns
-------
int
    Number of linear inequality constraints.
)r   r   r4   s   &r.   r   ÚTrustRegion.m_linear_ubX   ó   € ð �x‰x×#Ñ#Ð#r1   c                ó.   € V P                   P                  # )zh
Number of linear equality constraints.

Returns
-------
int
    Number of linear equality constraints.
)r   r   r4   s   &r.   r   ÚTrustRegion.m_linear_eqd   r8   r1   c                ó.   € V P                   P                  # )zr
Number of nonlinear inequality constraints.

Returns
-------
int
    Number of nonlinear inequality constraints.
)r   r    r4   s   &r.   r    ÚTrustRegion.m_nonlinear_ubp   ó   € ð �x‰x×&Ñ&Ð&r1   c                ó.   € V P                   P                  # )zn
Number of nonlinear equality constraints.

Returns
-------
int
    Number of nonlinear equality constraints.
)r   r"   r4   s   &r.   r"   ÚTrustRegion.m_nonlinear_eq|   r=   r1   c                ó   € V P                   # )zF
Trust-region radius.

Returns
-------
float
    Trust-region radius.
)r)   r4   s   &r.   ÚradiusÚTrustRegion.radiusˆ   ó   € ð �|‰|Ðr1   c                óº   € Wn         V P                  V P                  \        P                  ,          V P
                  ,          8:  d   V P
                  V n         R# R# )za
Set the trust-region radius.

Parameters
----------
radius : float
    New trust-region radius.
N)r)   rA   r   r   ÚDECREASE_RADIUS_THRESHOLDr(   )r*   rA   s   &&r.   rA   rB   ”   sE   € ð Œà�K‰KØ�‰œy×BÑBÕCØ�o‰oõôð  Ÿ?™?ˆDŽLñ	r1   c                ó   € V P                   # )z­
Resolution of the trust-region framework.

The resolution is a lower bound on the trust-region radius.

Returns
-------
float
    Resolution of the trust-region framework.
©r'   r4   s   &r.   r(   ÚTrustRegion.resolution¦   s   € ð ×ÑÐr1   c                ó   € Wn         R# )z�
Set the resolution of the trust-region framework.

Parameters
----------
resolution : float
    New resolution of the trust-region framework.
NrG   )r*   r(   s   &&r.   r(   rH   ´   s
   € ð &Ör1   c                ó   € V P                   # )zB
Penalty parameter.

Returns
-------
float
    Penalty parameter.
)r   r4   s   &r.   r   ÚTrustRegion.penaltyÀ   s   € ð �}‰}Ðr1   c                ó   € V P                   # )z‘
Models of the objective function and constraints.

Returns
-------
`cobyqa.models.Models`
    Models of the objective function and constraints.
)r   r4   s   &r.   ÚmodelsÚTrustRegion.modelsÌ   rC   r1   c                ó   € V P                   # )zh
Index of the best interpolation point.

Returns
-------
int
    Index of the best interpolation point.
)r   r4   s   &r.   Ú
best_indexÚTrustRegion.best_indexØ   s   € ð ×ÑÐr1   c                ó`   € V P                   P                  P                  V P                  4      # )z£
Best interpolation point.

Its value is interpreted as relative to the origin, not the base point.

Returns
-------
`numpy.ndarray`
    Best interpolation point.
)rM   ÚinterpolationÚpointrP   r4   s   &r.   r%   ÚTrustRegion.x_bestä   s#   € ð �{‰{×(Ñ(×.Ñ.¨t¯©Ó?Ð?r1   c                óP   € V P                   P                  V P                  ,          # )zv
Value of the objective function at `x_best`.

Returns
-------
float
    Value of the objective function at `x_best`.
)rM   Úfun_valrP   r4   s   &r.   Úfun_bestÚTrustRegion.fun_bestò   s   € ð �{‰{×"Ñ" 4§?¡?Õ3Ð3r1   c                óT   € V P                   P                  V P                  R3,          # )z·
Values of the nonlinear inequality constraints at `x_best`.

Returns
-------
`numpy.ndarray`, shape (m_nonlinear_ub,)
    Values of the nonlinear inequality constraints at `x_best`.
ºNNN)rM   Úcub_valrP   r4   s   &r.   Úcub_bestÚTrustRegion.cub_bestþ   ó"   € ð �{‰{×"Ñ" 4§?¡?°AÐ#5Õ6Ð6r1   c                óT   € V P                   P                  V P                  R3,          # )z³
Values of the nonlinear equality constraints at `x_best`.

Returns
-------
`numpy.ndarray`, shape (m_nonlinear_eq,)
    Values of the nonlinear equality constraints at `x_best`.
r[   )rM   Úceq_valrP   r4   s   &r.   Úceq_bestÚTrustRegion.ceq_best
  r_   r1   c                ó„  € V P                   P                  V4      V P                  V P                  P                  P
                  V,          V P                  P                  P                  ,
          ,          ,           V P                  V P                  P                  P                  V,          V P                  P                  P                  ,
          ,          ,           V P                  V P                   P                  V4      ,          ,           V P                  V P                   P                  V4      ,          ,           # )zß
Evaluate the Lagrangian model at a given point.

Parameters
----------
x : `numpy.ndarray`, shape (n,)
    Point at which the Lagrangian model is evaluated.

Returns
-------
float
    Value of the Lagrangian model at `x`.
)rM   Úfunr   r   ÚlinearÚa_ubÚb_ubr   Úa_eqÚb_eqr!   Úcubr#   Úceq©r*   Úxs   &&r.   Ú	lag_modelÚTrustRegion.lag_model  sÛ   € ð �K‰K�O‰O˜AÓØ× Ñ Ø�x‰x�‰×#Ñ# aÕ'¨$¯(©(¯/©/×*>Ñ*>Õ>õ@õ@ð × Ñ Ø�x‰x�‰×#Ñ# aÕ'¨$¯(©(¯/©/×*>Ñ*>Õ>õ@õ@ð
 ×#Ñ# d§k¡k§o¡o°aÓ&8Õ8õ9ð ×#Ñ# d§k¡k§o¡o°aÓ&8Õ8õ9ð	
r1   c                óÔ  € V P                   P                  V4      V P                  V P                  P                  P
                  ,          ,           V P                  V P                  P                  P                  ,          ,           V P                  V P                   P                  V4      ,          ,           V P                  V P                   P                  V4      ,          ,           # )a  
Evaluate the gradient of the Lagrangian model at a given point.

Parameters
----------
x : `numpy.ndarray`, shape (n,)
    Point at which the gradient of the Lagrangian model is evaluated.

Returns
-------
`numpy.ndarray`, shape (n,)
    Gradient of the Lagrangian model at `x`.
)rM   Úfun_gradr   r   rf   rg   r   ri   r!   Úcub_gradr#   Úceq_gradrm   s   &&r.   Úlag_model_gradÚTrustRegion.lag_model_grad.  s¥   € ð �K‰K× Ñ  Ó#Ø× Ñ  4§8¡8§?¡?×#7Ñ#7Õ7õ8à× Ñ  4§8¡8§?¡?×#7Ñ#7Õ7õ8ð ×#Ñ# d§k¡k×&:Ñ&:¸1Ó&=Õ=õ>ð ×#Ñ# d§k¡k×&:Ñ&:¸1Ó&=Õ=õ	>ð	
r1   c                óB  € V P                   P                  4       pV P                  ^ 8”  d2   WP                  V P                   P	                  4       ,          ,          pV P
                  ^ 8”  d2   WP                  V P                   P                  4       ,          ,          pV# )z©
Evaluate the Hessian matrix of the Lagrangian model at a given point.

Returns
-------
`numpy.ndarray`, shape (n, n)
    Hessian matrix of the Lagrangian model at `x`.
)rM   Úfun_hessr    r!   Úcub_hessr"   r#   Úceq_hess)r*   Úhesss   & r.   Úlag_model_hessÚTrustRegion.lag_model_hessD  sw   € ð �{‰{×#Ñ#Ó%ˆØ×Ñ Ô"Ø×)Ñ)¨D¯K©K×,@Ñ,@Ó,BÕBÕBˆDØ×Ñ Ô"Ø×)Ñ)¨D¯K©K×,@Ñ,@Ó,BÕBÕBˆDØˆr1   c                óü   € V P                   P                  V4      V P                  V P                   P                  V4      ,          ,           V P                  V P                   P                  V4      ,          ,           # )at  
Evaluate the right product of the Hessian matrix of the Lagrangian
model with a given vector.

Parameters
----------
v : `numpy.ndarray`, shape (n,)
    Vector with which the Hessian matrix of the Lagrangian model is
    multiplied from the right.

Returns
-------
`numpy.ndarray`, shape (n,)
    Right product of the Hessian matrix of the Lagrangian model with
    `v`.
)rM   Úfun_hess_prodr!   Úcub_hess_prodr#   Úceq_hess_prod©r*   Úvs   &&r.   Úlag_model_hess_prodÚTrustRegion.lag_model_hess_prodT  sa   € ð$ �K‰K×%Ñ% aÓ(Ø×#Ñ# d§k¡k×&?Ñ&?ÀÓ&BÕBõCà×#Ñ# d§k¡k×&?Ñ&?ÀÓ&BÕBõCð	
r1   c                óü   € V P                   P                  V4      V P                  V P                   P                  V4      ,          ,           V P                  V P                   P                  V4      ,          ,           # )a  
Evaluate the curvature of the Lagrangian model along a given direction.

Parameters
----------
v : `numpy.ndarray`, shape (n,)
    Direction along which the curvature of the Lagrangian model is
    evaluated.

Returns
-------
float
    Curvature of the Lagrangian model along `v`.
)rM   Úfun_curvr!   Úcub_curvr#   Úceq_curvr‚   s   &&r.   Úlag_model_curvÚTrustRegion.lag_model_curvk  s_   € ð  �K‰K× Ñ  Ó#Ø×#Ñ# d§k¡k×&:Ñ&:¸1Ó&=Õ=õ>à×#Ñ# d§k¡k×&:Ñ&:¸1Ó&=Õ=õ>ð	
r1   c                ó”   € VV P                   P                  V P                  4      RV P                  V4      ,          ,           ,          # )a%  
Evaluate the objective function of the SQP subproblem.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Step along which the objective function of the SQP subproblem is
    evaluated.

Returns
-------
float
    Value of the objective function of the SQP subproblem along `step`.
g      à?)rM   rr   r%   r„   ©r*   Ústeps   &&r.   Úsqp_funÚTrustRegion.sqp_fun€  s?   € ð Ø�K‰K× Ñ  §¡Ó-Ø�D×,Ñ,¨TÓ2Õ2õ3õ
ð 	
r1   c                ó®   € V P                   P                  V P                  4      V P                   P                  V P                  4      V,          ,           # )as  
Evaluate the linearization of the nonlinear inequality constraints.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Step along which the linearization of the nonlinear inequality
    constraints is evaluated.

Returns
-------
`numpy.ndarray`, shape (m_nonlinear_ub,)
    Value of the linearization of the nonlinear inequality constraints
    along `step`.
)rM   rk   r%   rs   r�   s   &&r.   Úsqp_cubÚTrustRegion.sqp_cub”  ó=   € ð" �K‰K�O‰O˜DŸK™KÓ(Ø�k‰k×"Ñ" 4§;¡;Ó/°$Õ6õ7ð	
r1   c                ó®   € V P                   P                  V P                  4      V P                   P                  V P                  4      V,          ,           # )am  
Evaluate the linearization of the nonlinear equality constraints.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Step along which the linearization of the nonlinear equality
    constraints is evaluated.

Returns
-------
`numpy.ndarray`, shape (m_nonlinear_ub,)
    Value of the linearization of the nonlinear equality constraints
    along `step`.
)rM   rl   r%   rt   r�   s   &&r.   Úsqp_ceqÚTrustRegion.sqp_ceq©  r”   r1   Nc                ó^  € Ve	   Ve   Vf   V P                  WP                  4      w  r#pTpV P                  R8”  dp   V P                   P                  WVR7      p\        P
                  ! V4      '       d7   WPP                  \        P                  P                  V4      ,          ,          pV# )aÞ  
Evaluate the merit function at a given point.

Parameters
----------
x : `numpy.ndarray`, shape (n,)
    Point at which the merit function is evaluated.
fun_val : float, optional
    Value of the objective function at `x`. If not provided, the
    objective function is evaluated at `x`.
cub_val : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
    Values of the nonlinear inequality constraints. If not provided,
    the nonlinear inequality constraints are evaluated at `x`.
ceq_val : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
    Values of the nonlinear equality constraints. If not provided,
    the nonlinear equality constraints are evaluated at `x`.

Returns
-------
float
    Value of the merit function at `x`.
r   )r\   ra   )r   r   r   Ú	violationr   Úcount_nonzeroÚlinalgÚnorm)r*   rn   rW   r\   ra   Úm_valÚc_vals   &&&&&  r.   ÚmeritÚTrustRegion.merit¾  s†   € ð. Š?˜gšo°²Ø(,¯©°·L±LÓ(AÑ%ˆG˜gØˆØ�=‰=˜3ÔØ—H‘H×&Ñ& qÀ7Ð&ÓKˆEÜ×Ò ×&Ò&ØŸ™¬¯©¯©¸Ó)>Õ>Õ>�Øˆr1   c                ó>  € \         P                  ! V P                  P                  P                  .V P
                  P                  V4      ..4      p\         P                  ! V P                  P                  P                  V P                  P                  P                  V,          ,
          V P
                  P                  V4      ) .4      p\         P                  ! V P                  P                  P                  .V P
                  P                  V4      ..4      p\         P                  ! V P                  P                  P                  V P                  P                  P                  V,          ,
          V P
                  P                  V4      ) .4      pW#WE3# )a»  
Get the linearizations of the constraints at a given point.

Parameters
----------
x : `numpy.ndarray`, shape (n,)
    Point at which the linearizations of the constraints are evaluated.

Returns
-------
`numpy.ndarray`, shape (m_linear_ub + m_nonlinear_ub, n)
    Left-hand side matrix of the linearized inequality constraints.
`numpy.ndarray`, shape (m_linear_ub + m_nonlinear_ub,)
    Right-hand side vector of the linearized inequality constraints.
`numpy.ndarray`, shape (m_linear_eq + m_nonlinear_eq, n)
    Left-hand side matrix of the linearized equality constraints.
`numpy.ndarray`, shape (m_linear_eq + m_nonlinear_eq,)
    Right-hand side vector of the linearized equality constraints.
)r   Úblockr   rf   rg   rM   rs   rh   rk   ri   rt   rj   rl   )r*   rn   ÚaubÚbubÚaeqÚbeqs   &&    r.   Úget_constraint_linearizationsÚ)TrustRegion.get_constraint_linearizationsÞ  s-  € ô( �hŠhà—‘—‘×%Ñ%Ð&Ø—‘×%Ñ% aÓ(Ð)ðó
ˆô �hŠhà—‘—‘×$Ñ$ t§x¡x§¡×';Ñ';¸aÕ'?Õ?Ø—‘—‘ Ó#Ð#ðó
ˆô �hŠhà—‘—‘×%Ñ%Ð&Ø—‘×%Ñ% aÓ(Ð)ðó
ˆô �hŠhà—‘—‘×$Ñ$ t§x¡x§¡×';Ñ';¸aÕ'?Õ?Ø—‘—‘ Ó#Ð#ðó
ˆð ˜Ð!Ð!r1   c                óÊ  € V P                  V P                  4      w  r#rEV P                  P                  P                  V P                  ,
          pV P                  P                  P
                  V P                  ,
          pV P                  \        P                  ,          V P                  ,          p\        VVVVVVVV\        P                  ,          3/ V P                  B p	V\        P                  ,          '       d¹   \        Wg4      p
\        P                  ! Wš,           V8  4      '       g&   \        P                  ! WyV
,
          8  4      '       d   \         P"                  ! R\$        ^4       \        P&                  P)                  V	4      RV,          8”  d   \         P"                  ! R\$        ^4       \        P*                  ! V P                  R,          W™,          ,
          4      pWi,          pWy,          p\        P,                  ! W2V	,          ,
          R4      pV P.                  P1                  V P                  4      V P3                  V	4      ,           pV P                  P4                  R	9   d<   \7        VV P2                  VVVV\        P                  ,          3/ V P                  B pM/\9        VV P2                  VVVVVVVR,          3	/ V P                  B pV\        P                  ,          '       dä   \        Wg4      p
\        P                  ! WÊ,           V8  4      '       g&   \        P                  ! W|V
,
          8  4      '       d   \         P"                  ! R\$        ^4       \        P&                  P)                  Wœ,           4      R\        P*                  ! R4      ,          V P                  ,          8”  d   \         P"                  ! R\$        ^4       Wœ3# )
a£  
Get the trust-region step.

The trust-region step is computed by solving the derivative-free
trust-region SQP subproblem using a Byrd-Omojokun composite-step
approach. For more details, see Section 5.2.3 of [1]_.

Parameters
----------
options : dict
    Options of the solver.

Returns
-------
`numpy.ndarray`, shape (n,)
    Normal step.
`numpy.ndarray`, shape (n,)
    Tangential step.

References
----------
.. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization
   Methods and Software*. PhD thesis, Department of Applied
   Mathematics, The Hong Kong Polytechnic University, Hong Kong, China,
   2022. URL: https://theses.lib.polyu.edu.hk/handle/200/12294.
z6the normal step does not respect the bound constraint.çš™™™™™ñ?z=the normal step does not respect the trust-region constraint.ç       @r   Údebugz;The tangential step does not respect the bound constraints.z<The trial step does not respect the trust-region constraint.)Úunconstrainedzbound-constrained)r§   r%   r   ÚboundsÚxlÚxur   r   ÚBYRD_OMOJOKUN_FACTORrA   r
   r   ÚDEBUGr   r   ÚanyÚwarningsÚwarnÚRuntimeWarningr›   rœ   ÚsqrtÚmaximumrM   rr   r„   Útyper   r   )r*   r,   r£   r¤   r¥   r¦   r¯   r°   rA   Únormal_stepÚtolÚg_bestÚtangential_steps   &&           r.   Úget_trust_region_stepÚ!TrustRegion.get_trust_region_step  sý  € ð8 "×?Ñ?ÀÇÁÓLÑˆ�#Ø�X‰X�_‰_×Ñ $§+¡+Õ-ˆØ�X‰X�_‰_×Ñ $§+¡+Õ-ˆð —‘¤×!?Ñ!?Õ@À4Ç;Á;ÕNˆÜ*ØØØØØØØØ”G—M‘MÕ"ñ

ð �o‰oñ

ˆð ”7—=‘=×!Ô!Ü  Ó(ˆCÜ—’�{Õ(¨2Ñ-×.Ò.Ü—v’v˜b°Õ#4Ñ4×5Ò5Ü—’ØLÜ"Øôô
 �y‰y�~‰~˜kÓ*¨S°6­\Ô9Ü—’ð"ä"Øô	ô —’˜Ÿ™ cÕ)¨KÕ,EÕEÓFˆØ
ÕˆØ
ÕˆÜ�jŠj˜ [Õ0Õ0°#Ó6ˆØ—‘×%Ñ% d§k¡kÓ2°T×5MÑ5MØó6
õ 
ˆð �8‰8�=‰=ÐBÔBÜ6ØØ×(Ñ(ØØØØœŸ™Õ&ñð —/‘/ñ‰Oô CØØ×(Ñ(ØØØØØØØ˜Õ ñð —/‘/ñˆOð ”7—=‘=×!Ô!Ü  Ó(ˆCÜ�vŠv�oÕ+¨bÑ0×1Ò1´R·V²VØ sÕ*Ñ*÷6ò 6ô —’ð#ä"Øô	ô —	‘	—‘˜{Õ<Ó=ØœŸš ›Õ$ t§{¡{Õ2ô3ô —’ð"ä"Øô	ð Ð+Ð+r1   c                ó4  a a€ V\         P                  ,          '       d   VS P                  8w  g   Q R4       h\        P                  ! \        P
                  ! ^S P                  P                  V4      4      p\        S P                  P                  VV\         P                  ,          4      oSP                  S P                  S P                  P                  4      pS P                  P                  P                  S P                  ,
          pS P                  P                  P                  S P                  ,
          p\!        RVVV 3R lVVS P"                  V\         P                  ,          4      pS P                  P%                  S P                  V,           V4      pS P                  P                  P&                  S P                  P                  P&                  RS P                  \        P(                  3,          ,
          p	V	RS P                  ^ .3,          V	R^ S P                  .3&   \+        RVVV 3R lV	R,          VVS P"                  V\         P                  ,          4      p
S P                  P%                  S P                  V
,           V4      p\-        V4      \-        V4      8”  d   T
pTpS P                  P.                  R9   Edå   S P1                  S P                  4      w  rÍrï\3        WV4      p\3        V4      pVV) 8*  pVV8¬  pVV8¬  p\5        VVVVV4      w  ppVRVR13,          VRVR13,          P6                  V,          ,          p\        P8                  P;                  V4      p^ Tu;8  d   S P                  P<                  8  Ed   M EMV\>        S P"                  ,          8”  Edû   S P"                  V,          V,          p
SPA                  V
S P                  P                  4      R8  d   V
) p
\        PB                  ! WZ,
          W¦,
          .4      pWÊ,          V,
          pWê,          V,
          p\E        R VV\        P,                  ! V4      3 4       4      p\        PD                  ! \        P,                  ! V
V( ,          4      RR7      p\        PD                  ! \        P,                  ! V
V( ,          4      VR7      p\        PD                  ! \        P,                  ! VV( R3,          V
,          4      VR7      p\G        R	V,          R
\        P8                  P;                  V
4      ,          4      pVV8:  de   S P                  P%                  S P                  V
,           V4      p\-        V4      R\-        V4      ,          8¼  d   \        PH                  ! W¥V4      pV\         P                  ,          '       dÄ   \3        WV4      p\        PJ                  ! VV,           V8  4      '       g&   \        PJ                  ! WgV,
          8  4      '       d   \L        PN                  ! R\P        ^4       \        P8                  P;                  V4      RS P"                  ,          8”  d   \L        PN                  ! R\P        ^4       V# )aæ  
Get the geometry-improving step.

Three different geometry-improving steps are computed and the best one
is returned. For more details, see Section 5.2.7 of [1]_.

Parameters
----------
k_new : int
    Index of the interpolation point to be modified.
options : dict
    Options of the solver.

Returns
-------
`numpy.ndarray`, shape (n,)
    Geometry-improving step.

Raises
------
`numpy.linalg.LinAlgError`
    If the computation of a determinant fails.

References
----------
.. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization
   Methods and Software*. PhD thesis, Department of Applied
   Mathematics, The Hong Kong Polytechnic University, Hong Kong, China,
   2022. URL: https://theses.lib.polyu.edu.hk/handle/200/12294.
z8The index `k_new` must be different from the best index.r   c                 óP   <€ SP                  V SP                  P                  4      # ©N©ÚcurvrM   rS   ©rƒ   Úlagr*   s   &€€r.   Ú<lambda>Ú/TrustRegion.get_geometry_step.<locals>.<lambda>³  ó   ø€ �c—h‘h˜q $§+¡+×";Ñ";Ô<r1   r[   c                 óP   <€ SP                  V SP                  P                  4      # rÂ   rÃ   rÅ   s   &€€r.   rÇ   rÈ   Æ  rÉ   r1   Nc              3   óR   "  € T F  p\         P                  ! VR R7      x € K  	  R# 5i)r   ©ÚinitialN)r   Úmax)Ú.0Úarrays   & r.   Ú	<genexpr>Ú0TrustRegion.get_geometry_step.<locals>.<genexpr>ò  s%   é € ð  á!8˜ô —F’F˜5¨#×.Ñ.Û!8ùs   ‚%'rÌ   ç      $@g{®Gáz„?gš™™™™™¹?z9The geometry step does not respect the bound constraints.rª   z?The geometry step does not respect the trust-region constraint.)r[   :é   NN)zlinearly constrainedznonlinearly constrained))r   r²   rP   r   ÚsqueezeÚeyerM   Únptr   rS   Úgradr%   r   r®   r¯   r°   r   rA   ÚdeterminantsÚxptÚnewaxisr	   Úabsr¹   r§   r   r   ÚTr›   rœ   r3   ÚTINYrÄ   r¢   rÎ   ÚminÚclipr³   r´   rµ   r¶   )r*   Úk_newr,   Ú	coord_vecÚg_lagr¯   r°   rŽ   ÚsigmarÚ   Ústep_altÚ	sigma_altr£   r¤   r¥   r¦   Útol_bdÚtol_ubÚfree_xlÚfree_xuÚfree_ubÚn_actÚqÚ
g_lag_projÚnorm_g_lag_projÚcbdrk   rl   Ú	maxcv_valr»   rÆ   s   f&&                           @r.   Úget_geometry_stepÚTrustRegion.get_geometry_step€  sò  ù€ ð> ”7—=‘=×!Ô!à˜Ÿ™Ô(ðJàIóJØ(ô —J’JœrŸvšv a¨¯©¯©¸%Ó@ÓAˆ	ÜØ�K‰K×%Ñ%ØØ”G—M‘MÕ"ó
ˆð
 —‘˜Ÿ™ d§k¡k×&?Ñ&?Ó@ˆð �X‰X�_‰_×Ñ $§+¡+Õ-ˆØ�X‰X�_‰_×Ñ $§+¡+Õ-ˆÜØØÝ<ØØØ�K‰KØ”G—M‘MÕ"ó
ˆð —‘×(Ñ(¨¯©°tÕ);¸UÓCˆð �K‰K×%Ñ%×)Ñ)Ø�k‰k×'Ñ'×+Ñ+¨A¨t¯©ÄÇ
Á
Ð,JÕKõLð 	ð (+¨1¨t¯©ÀÐ.BÐ+BÕ'CˆˆA��4—?‘?Ð#Ð#Ñ$Ü"ØØÝ<Ø��JØØØ�K‰KØ”G—M‘MÕ"ó	
ˆð —K‘K×,Ñ,¨T¯[©[¸8Õ-CÀUÓKˆ	Üˆy‹>œC ›JÔ&ØˆDØˆEð �8‰8�=‰=ð 
õ 
ð
 ×2Ñ2°4·;±;Ó?ñ ˆC�cä# BÓ+ˆFÜ# CÓ(ˆFØ˜V˜G‘mˆGØ˜F‘lˆGØ˜V‘mˆGô 3ØØØØØó‰HˆE�1ð ˜1˜e™f˜9�¨¨1¨e©f¨9­¯©¸%Õ)?Õ@ˆJÜ Ÿi™iŸn™n¨ZÓ8ˆOØ�5Ö%˜4Ÿ8™8Ÿ:™:×%Ñ%¨/¼DÀ4Ç;Á;Õ<NÕ*NØ ŸK™K¨/Õ9¸ZÕG�Ø—8‘8˜H d§k¡k×&?Ñ&?Ó@À3ÔFØ (˜y�Hô —h’h ¥¨x­}Ð=Ó>�Ø•n sÕ*�Ø•n sÕ*�Üñ  à"% s¬B¯FªF°3«KÑ!8ó ó �	ô —f’fœRŸVšV H¨g¨XÕ$6Ó7ÀÔE�Ü—f’fœRŸVšV H¨g¨XÕ$6Ó7ÀÔE�Ü—f’fœRŸVšV C¨¨°!¨Õ$4°xÕ$?Ó@È#ÔN�Ü˜$ �* d¬R¯Y©Y¯^©^¸HÓ-EÕ&EÓF�Ø Ô#Ø $§¡× 8Ñ 8ØŸ™ hÕ.°ó!�Iô ˜9“~¨¬s°5«zÕ)9Ô9Ü!Ÿwšw x°RÓ8˜à”7—=‘=×!Ô!Ü  Ó(ˆCÜ�vŠv�d˜S•j 2‘o×&Ò&¬"¯&ª&°¸Sµj±×*AÒ*AÜ—’ð#ä"Øô	ô �y‰y�~‰~˜dÓ# c¨D¯K©KÕ&7Ô7Ü—’ð/ä"Øô	ð ˆr1   c                óR  € V P                  V P                  4      w  r4rVV P                  P                  P                  V P                  ,
          pV P                  P                  P
                  V P                  ,
          p\        P                  P                  V4      p	\        VVVVVVV	V\        P                  ,          3/ V P                  B p
V\        P                  ,          '       d¹   \        Wx4      p\        P                  ! W«,           V8  4      '       g&   \        P                  ! WŠV,
          8  4      '       d   \        P                   ! R\"        ^4       \        P                  P                  V
4      RV	,          8”  d   \        P                   ! R\"        ^4       V
# )zñ
Get the second-order correction step.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Trust-region step.
options : dict
    Options of the solver.

Returns
-------
`numpy.ndarray`, shape (n,)
    Second-order correction step.
zHThe second-order correction step does not respect the bound constraints.rª   zNThe second-order correction step does not respect the trust-region constraint.)r§   r%   r   r®   r¯   r°   r   r›   rœ   r
   r   r²   r   r   r³   r´   rµ   r¶   )r*   rŽ   r,   r£   r¤   r¥   r¦   r¯   r°   rA   Úsoc_stepr»   s   &&&         r.   Ú get_second_order_correction_stepÚ,TrustRegion.get_second_order_correction_step  s6  € ð" "×?Ñ?ÀÇÁÓLÑˆ�#Ø�X‰X�_‰_×Ñ $§+¡+Õ-ˆØ�X‰X�_‰_×Ñ $§+¡+Õ-ˆÜ—‘—‘ Ó%ˆÜ'ØØØØØØØØ”G—M‘MÕ"ñ

ð �o‰oñ

ˆð ”7—=‘=×!Ô!Ü  Ó(ˆCÜ�vŠv�h•n rÑ)×*Ò*¬b¯fªf°RÀS½.Ñ5H×.IÒ.IÜ—’ð5ä"Øô	ô �y‰y�~‰~˜hÓ'¨#°­,Ô6Ü—’ð;ä"Øô	ð ˆr1   c                óÎ  € V P                  V P                  V P                  V P                  V P                  4      pV P                  V P                  V,           W#V4      pV P                  V P                  RV P
                  P                  V P                  4      V P
                  P                  V P                  4      4      pV P                  V P                  V,           V P                  V4      V P                  V4      V P                  V4      4      p\        Wx,
          4      \        \        WV,
          4      ,          8”  d   WV,
          \        Wx,
          4      ,          # R# )aº  
Get the reduction ratio.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Trust-region step.
fun_val : float
    Objective function value at the trial point.
cub_val : `numpy.ndarray`, shape (m_nonlinear_ub,)
    Nonlinear inequality constraint values at the trial point.
ceq_val : `numpy.ndarray`, shape (m_nonlinear_eq,)
    Nonlinear equality constraint values at the trial point.

Returns
-------
float
    Reduction ratio.
r   ç      ð¿)rŸ   r%   rX   r]   rb   rM   rk   rl   r�   r’   r–   rÜ   rÞ   )	r*   rŽ   rW   r\   ra   Ú	merit_oldÚ	merit_newÚmerit_model_oldÚmerit_model_news	   &&&&&    r.   Úget_reduction_ratioÚTrustRegion.get_reduction_ratioI  s  € ð( —J‘JØ�K‰KØ�M‰MØ�M‰MØ�M‰Mó	
ˆ	ð —J‘J˜tŸ{™{¨TÕ1°7ÀWÓMˆ	ØŸ*™*Ø�K‰KØØ�K‰K�O‰O˜DŸK™KÓ(Ø�K‰K�O‰O˜DŸK™KÓ(ó	
ˆð Ÿ*™*Ø�K‰K˜$ÕØ�L‰L˜ÓØ�L‰L˜ÓØ�L‰L˜Óó	
ˆô ˆÕ0Ó1´D¼3ØÕ!ó<
õ 5
ô 
ð Õ)¬SØÕ1ó.õ ð ð ˆKr1   c                ó6  € V P                  V P                  4      w  r#rE\        \        P                  P                  \        P                  ! \        P                  ! RV) 4      V.4      4      \        P                  P                  \        P                  ! \        P                  ! RW!,          V,
          4      WA,          V,
          .4      4      ,
          R4      pV P                  V4      p\        P                  P                  \        P                  ! V P                  V P                  V P                  V P                  .4      4      p\        V4      \        \        V4      ,          8”  d   \        W‡V,          4      pV P                  p	V P                   V P"                  \$        P&                  ,          V,          8:  dH   \        V P"                  \$        P(                  ,          V,          R4      V n        V P+                  4        W�P                  8H  # )zr
Increase the penalty parameter.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Trust-region step.
r   ç      ð?)r§   r%   rÎ   r   r›   rœ   r¢   r¸   r�   r   r   r!   r#   rÜ   rÞ   rP   r   r   r   ÚPENALTY_INCREASE_THRESHOLDÚPENALTY_INCREASE_FACTORr   )
r*   rŽ   r£   r¤   r¥   r¦   Ú	viol_diffÚsqp_valÚ	thresholdÚbest_index_saves
   &&        r.   Úincrease_penaltyÚTrustRegion.increase_penaltyy  s–  € ð "×?Ñ?ÀÇÁÓLÑˆ�#ÜÜ�I‰I�N‰NÜ—’äŸ
š
 3¨¨Ó-Øðóóô �i‰i�n‰nÜ—’äŸ
š
 3¨­
°SÕ(8Ó9Ø�
 SÕ(ðóóõð  ó#
ˆ	ð& —,‘,˜tÓ$ˆä—I‘I—N‘NÜ�HŠHà×&Ñ&Ø×&Ñ&Ø×)Ñ)Ø×)Ñ)ð	óó	
ˆ	ô ˆy‹>œD¤3 w£<Õ/Ô/Ü˜I°Õ':Ó;ˆIØŸ/™/ˆà�M‰MØ�‰œy×CÑCÕDØõôô  Ø—‘¤	× AÑ AÕBÀYÕNØóˆDŒMð ×ÑÔ!Ø§/¡/Ñ1Ð1r1   c                óx   € \        V P                  V P                  4       4      V n        V P                  4        R# )z!
Decrease the penalty parameter.
N)rß   r   Ú_get_low_penaltyr   r4   s   &r.   Údecrease_penaltyÚTrustRegion.decrease_penalty±  s+   € ô ˜DŸM™M¨4×+@Ñ+@Ó+BÓCˆŒØ×ÑÖr1   c           	     ó  € V P                   pV P                  V P                  V P                  P                  V,          V P                  P
                  VR3,          V P                  P                  VR3,          4      pV P                  P                  V P                  V P                  P
                  VR3,          V P                  P                  VR3,          4      pR\        ,          \        V P                  P                  V P                  P                  4      ,          \        \        V4      R4      ,          p\        V P                  P                  4       EF   pWPP                   8w  g   K  V P                  P                  P!                  V4      pV P                  VV P                  P                  V,          V P                  P
                  VR3,          V P                  P                  VR3,          4      pV P                  P                  VV P                  P
                  VR3,          V P                  P                  VR3,          4      pWr8  g   WrV,           8  g   EK  Wƒ8  g   EK  TpTpTpEK#  	  Wn        R# )z"
Set the index of the best point.
r[   rÓ   r  N)rP   rŸ   r%   rM   rW   r\   ra   r   ÚmaxcvÚEPSrÎ   r3   r×   rÜ   ÚrangerS   rT   r   )	r*   rP   Úm_bestÚr_bestr»   ÚkÚx_valr�   Úr_vals	   &        r.   r   ÚTrustRegion.set_best_index¸  sç  € ð —_‘_ˆ
Ø—‘Ø�K‰KØ�K‰K×Ñ 
Õ+Ø�K‰K×Ñ 
¨A Õ.Ø�K‰K×Ñ 
¨A Õ.ó	
ˆð —‘—‘Ø�K‰KØ�K‰K×Ñ 
¨A Õ.Ø�K‰K×Ñ 
¨A Õ.ó
ˆð Üõä�$—+‘+—-‘- §¡§¡Ó1õ2ô ”#�f“+˜sÓ#õ$ð 	ô �t—{‘{—‘×'ˆAØ—O‘OÖ#ØŸ™×1Ñ1×7Ñ7¸Ó:�ØŸ
™
ØØ—K‘K×'Ñ'¨Õ*Ø—K‘K×'Ñ'¨¨1¨Õ-Ø—K‘K×'Ñ'¨¨1¨Õ-ó	�ð Ÿ™Ÿ™ØØ—K‘K×'Ñ'¨¨1¨Õ-Ø—K‘K×'Ñ'¨¨1¨Õ-ó�ð
 ”> e°s­l×&:¸u¿~Ø!"�JØ"�FØ"“Fñ# (ð$ &Ör1   c                óì  € \         P                  ! V P                  P                  P                  V P                  P                  P                  RV P
                  \         P                  3,          ,
          R,          ^ R7      pVf   RpTpM™V P                  P                  V4      p\         P                  ! RV\        V P                  \        P                  ,          V P                  ,          V P                  4      R,          ,          4      R,          pRW@P
                  &   \         P                  ! V\         P                   ! V4      ,          4      pV\         P"                  ! W%,          4      3# )aO  
Get the index of the interpolation point to remove.

If `x_new` is not provided, the index returned should be used during
the geometry-improvement phase. Otherwise, the index returned is the
best index for included `x_new` in the interpolation set.

Parameters
----------
x_new : `numpy.ndarray`, shape (n,), optional
    New point to be included in the interpolation set.

Returns
-------
int
    Index of the interpolation point to remove.
float
    Distance between `x_best` and the removed point.

Raises
------
`numpy.linalg.LinAlgError`
    If the computation of a determinant fails.
r[   r«   ©Úaxisr  g      @rù   )r   ÚsumrM   rS   rÚ   rP   rÛ   rÙ   r¸   rÎ   r   r   ÚLOW_RADIUS_FACTORrA   r(   ÚargmaxrÜ   r·   )r*   Úx_newÚdist_sqrä   ÚweightsÚk_maxs   &&    r.   Úget_index_to_removeÚTrustRegion.get_index_to_removeâ  s"  € ô2 —&’&à—‘×)Ñ)×-Ñ-Ø—+‘+×+Ñ+×/Ñ/°°4·?±?ÄBÇJÁJÐ0NÕOõPð õ	ð
 ô
ˆð Š=ØˆEØ‰Gà—K‘K×,Ñ,¨UÓ3ˆEä—
’
ØØÜØŸ™¬	×(CÑ(CÕDØŸ+™+õ&àŸ™óð
 õõó	ð õ
ð ð (,ˆG—O‘OÑ$Ü—	’	˜'¤B§F¢F¨5£MÕ1Ó2ˆØ”b—g’g˜g�nÓ-Ð-Ð-r1   c                ó  € \         P                  P                  V4      pW P                  \        P
                  ,          8:  d;   V ;P                  V P                  \        P                  ,          ,          un        R# W P                  \        P                  ,          8:  dD   \        V P                  \        P                  ,          V P                  ,          V4      V n        R# \        V P                  \        P                  ,          V P                  ,          \        V P                  \        P                  ,          V P                  ,          V P                  \        P                  ,          V,          4      4      V n        R# )z•
Update the trust-region radius.

Parameters
----------
step : `numpy.ndarray`, shape (n,)
    Trust-region step.
ratio : float
    Reduction ratio.
N)r   r›   rœ   r   r   Ú	LOW_RATIOrA   ÚDECREASE_RADIUS_FACTORÚ
HIGH_RATIOrÎ   rß   ÚINCREASE_RADIUS_FACTORÚINCREASE_RADIUS_THRESHOLD)r*   rŽ   ÚratioÚs_norms   &&& r.   Úupdate_radiusÚTrustRegion.update_radius  sö   € ô —‘—‘ Ó%ˆØ—O‘O¤I×$7Ñ$7Õ8Ô8Ø�KŠK˜4Ÿ?™?¬9×+KÑ+KÕLÕL�KØ—o‘o¤i×&:Ñ&:Õ;Ô;ÜØ—‘¤	× @Ñ @ÕAØ—+‘+õàóˆDŽKô Ø—‘¤	× @Ñ @ÕAØ—+‘+õäØ—O‘O¤I×$DÑ$DÕEØ—k‘kõ"à—O‘O¤I×$GÑ$GÕHØõóó	ˆDŽKr1   c                óú  € V P                   \        P                  ,          V\        P                  ,          ,          V P
                  8  d:   V ;P
                  V P                   \        P                  ,          ,          un        MªV P                   \        P                  ,          V\        P                  ,          ,          V P
                  8  dC   \        P                  ! V P
                  V\        P                  ,          ,          4      V n        MV\        P                  ,          V n        \        V P                   \        P                  ,          V P                  ,          V P
                  4      V n        R# )zx
Enhance the resolution of the trust-region framework.

Parameters
----------
options : dict
    Options of the solver.
N)r   r   ÚLARGE_RESOLUTION_THRESHOLDr   ÚRHOENDr(   ÚDECREASE_RESOLUTION_FACTORÚMODERATE_RESOLUTION_THRESHOLDr   r·   rÎ   r&  r)   ©r*   r,   s   &&r.   Úenhance_resolutionÚTrustRegion.enhance_resolution9  sõ   € ð �O‰OœI×@Ñ@ÕAØ”g—n‘nÕ%õ&à�o‰oôð �OŠO˜tŸ™Ü×4Ñ4õ õ ŽOð �O‰OœI×CÑCÕDØ”g—n‘nÕ%õ&à�o‰oôô !Ÿgšg d§o¡oØ(/´·±Õ(?õ'@ó AˆD�Oð &¤g§n¡nÕ5ˆDŒOô Ø�O‰OœI×<Ñ<Õ=ÀÇÁÕLØ�O‰Oó
ˆŽr1   c                óz   € V P                   P                  \        P                  ! V P                  4      V4       R# )zd
Shift the base point to `x_best`.

Parameters
----------
options : dict
    Options of the solver.
N)rM   Úshift_x_baser   Úcopyr%   r3  s   &&r.   r7  ÚTrustRegion.shift_x_baseZ  s%   € ð 	�‰× Ñ ¤§¢¨¯©Ó!5°wÖ?r1   c           	     óh  € V P                   P                  P                  V,          V P                   P                  P                  8¬  pV P                  R8¬  pV P                   P
                  P                  V8¬  pV P                   P
                  P                  V8*  p\        P                  ! V4      p\        P                  ! V4      p\        P                  ! V4      p\        P                  ! V4      p	Wg,           V P                  ,           V P                  ,           ^ 8”  Ed�   \        P                  ! V P                   P                  4      p
\        P                  W¤R3,          ) W¥R3,          V P                   P                  P                  VR3,          V P                  P!                  W4      V P                   P                  P"                  V P                  P%                  V4      3,          pV P                  P'                  V4      p\        P(                  ! VP*                  ^ ,          \        P,                  ) 4      pRVRW‰,           V,           V,           % \/        VP0                  V) V\        P,                  3RR7      pVP2                  W‰,           W‰,           V,            V P4                  V&   RV P4                  V( &   VP2                  VV	,           V,           VV	,           V,           V,            V P6                  V&   RV P6                  V( &   VP2                  VV	,           V,           V,           VV	,           V,           V,           V P                  ,            V P8                  R&   VP2                  W‰,           V,           V,           V P                  ,           R V P:                  R&   R# R# )a	  
Set the Lagrange multipliers.

This method computes and set the Lagrange multipliers of the linear and
nonlinear constraints to be the QP multipliers.

Parameters
----------
x : `numpy.ndarray`, shape (n,)
    Point at which the Lagrange multipliers are computed.
r   r[   NÚbvls)r®   Úmethod)r   rf   rg   rh   r]   r®   r¯   r°   r   rš   r   r"   rÖ   r3   Úr_rM   rs   ri   rt   rr   ÚfullÚshapeÚinfr   rÝ   rn   r   r!   r   r#   )r*   rn   Úincl_linear_ubÚincl_nonlinear_ubÚincl_xlÚincl_xur   r    Úm_xlÚm_xuÚidentityÚc_jacr¼   Úxl_lmÚress   &&             r.   r$   ÚTrustRegion.set_multiplierse  s  € ð Ÿ™Ÿ™×-Ñ-°Õ1°T·X±X·_±_×5IÑ5IÑIˆØ ŸM™M¨SÑ0ÐØ—(‘(—/‘/×$Ñ$¨Ñ)ˆØ—(‘(—/‘/×$Ñ$¨Ñ)ˆÜ×&Ò& ~Ó6ˆÜ×)Ò)Ð*;Ó<ˆÜ×Ò Ó(ˆÜ×Ò Ó(ˆð Õ(¨4×+;Ñ+;Õ;Ø×%Ñ%õ&Ø()õ*ô —v’v˜dŸh™hŸj™jÓ)ˆHÜ—E‘EØ 1˜*Õ%Ð%Ø !˜Õ$Ø—‘—‘×$Ñ$ ^°QÐ%6Õ7Ø—‘×$Ñ$ QÓ:Ø—‘—‘×$Ñ$Ø—‘×$Ñ$ QÓ'ð)õˆEð —[‘[×)Ñ)¨!Ó,ˆFÜ—G’G˜EŸK™K¨�N¬R¯V©V¨GÓ4ˆEØBEˆEÐ>�D•K +Õ-°Õ>Ð?ÜØ—‘Ø�ØœrŸv™v�Øô	ˆCð 25·±Ø•˜D�K¨+Õ5ð2ˆD×Ñ˜~Ñ.ð 36ˆD×Ñ ˜Ñ/Ø7:·u±uØØõàõà"Øõàõð !õ!ð8ˆD×!Ñ!Ð"3Ñ4ð 9<ˆD×!Ñ!Ð#4Ð"4Ñ5Ø$'§E¡EØØõàõð !õ!ð "&Øõ"àõ"ð !õ"!ð ×"Ñ"õ	"#ð		%ˆD×Ñ˜qÑ!ð (+§u¡uØ•˜kÕ)¨NÕ:¸T×=MÑ=MÕMÐNð(ˆD×!Ñ! !Ó$ña*r1   c                óè  € \         P                  V P                  P                  P                  \         P
                  R 3,          V P                  P                  P                  P                  ,           V P                  P                  P                  P                  ,          V P                  P                  P                  \         P
                  R 3,          ,
          V P                  P                  3,          pV P                  P                  P                  \         P
                  R 3,          V P                  P                  P                  P                  ,           V P                  P                  P                  P                  ,          V P                  P                  P                  \         P
                  R 3,          ,
          p\         P                  ! VV) V P                  P                   V P                  P                   ) .4      p\         P                  ! W.4      p\         P"                  ! V^ R7      p\         P$                  ! V^ R7      pVV P&                  \(        P*                  ,          V,          8  p\         P,                  ! V4      '       dÑ   \         P"                  ! V P                  P.                  4      p\         P$                  ! V P                  P.                  4      p\         P0                  ! RWF,          4      p	\         P2                  ! WV,          V	,
          4      p
V
\4        W‡,
          ,          8”  d   W‡,
          V
,          pV# \         P6                  p V# RpV# )r[   r  r   )r   Úc_rM   rS   Úx_baserÛ   rÚ   rÝ   r   rf   rg   rh   r\   ri   rj   r¢   ra   ÚnanminÚnanmaxr   r   ÚTHRESHOLD_RATIO_CONSTRAINTSr³   rW   Úminimumrß   rÞ   r@  )r*   Úr_val_ubÚr_val_eqr  Úc_minÚc_maxÚindicesÚf_minÚf_maxÚ	c_min_negÚc_diffr   s   &           r.   r  ÚTrustRegion._get_low_penalty°  sa  € Ü—5‘5à—‘×)Ñ)×0Ñ0´·±¸Q°Õ?Ø—+‘+×+Ñ+×/Ñ/×1Ñ1õ2ð �h‰h�o‰o×"Ñ"×$Ñ$õ	%ð
 �h‰h�o‰o×"Ñ"¤2§:¡:¨q =Õ1õ2ð �K‰K×Ñð!õ
ˆð �K‰K×%Ñ%×,Ñ,¬R¯Z©Z¸¨]Õ;Ø�k‰k×'Ñ'×+Ñ+×-Ñ-õ.à�H‰H�O‰O× Ñ ×"Ñ"õ#ð &*§X¡X§_¡_×%9Ñ%9¼"¿*¹*Àa¸-Õ%HõIˆô —8’8àØ�	Ø—‘×#Ñ#Ø—‘×$Ñ$Ð$ð	ó
ˆô —’˜(Ð-Ó.ˆÜ—	’	˜% aÔ(ˆÜ—	’	˜% aÔ(ˆàØ�o‰oœi×CÑCÕDÀuÕLñMð 	ô �6Š6�'�?Š?Ü—I’I˜dŸk™k×1Ñ1Ó2ˆEÜ—I’I˜dŸk™k×1Ñ1Ó2ˆEÜŸ
š
 3¨­Ó7ˆIÜ—V’V˜E�N¨YÕ6Ó7ˆFØœ ¥Õ.Ô.Ø �=¨FÕ2�ð
 ˆô Ÿ&™&‘ð ˆð ˆGØˆr1   )r   r   r   r   r#   r!   r   r   r   r)   r'   rA   r(   )NNNrÂ   )/Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r/   Úpropertyr3   r   r   r    r"   rA   Úsetterr(   r   rM   rP   r%   rX   r]   rb   ro   ru   r|   r„   rŠ   r�   r’   r–   rŸ   r§   r¾   rò   rö   rþ   r  r  r   r"  r,  r4  r7  r$   r  Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r.   r   r      sä  ø‡ € ñò.'ð` ñ	ó ð	ð ñ	$ó ð	$ð ñ	$ó ð	$ð ñ	'ó ð	'ð ñ	'ó ð	'ð ñ	ó ð	ð ‡]�]ñ+ó ð+ð" ñ ó ð ð ×Ññ	&ó ð	&ð ñ	ó ð	ð ñ	ó ð	ð ñ	 ó ð	 ð ñ@ó ð@ð ñ	4ó ð	4ð ñ	7ó ð	7ð ñ	7ó ð	7ò
ò0
ò,ò 
ò.
ò*
ò(
ò*
ô*ò@,"ò\r,òhUòn0òd.ò`62òpò(&ôT5.ònò@
òB	@òI÷V(ð (r1   r   )r´   Únumpyr   Úscipy.optimizer   rM   r   r   Úsettingsr   r   Ú
subsolversr   r	   r
   r   r   Úsubsolvers.optimr   Úutilsr   ÚfinfoÚfloatÚtinyrÞ   Úepsr  r   © r1   r.   Ú<module>rr     sZ   ðÛ ã Ý %ç %ß (÷õ õ :Ý !ð 
‡x‚x�ƒ×Ñ€Ø‡h‚hˆuƒo×Ñ€÷Aó Ar1   