§
    fŠtjè^  ã                   óx  — d Z ddgZddlZddlmZ ddlmZ ddl	m
Z
mZmZmZmZmZ dd	lmZ dd
lmZmZ ddlmZ ddlmZ ddlmZ ddlmZ dZ ej         ej         ej!        ¦  «        j"        ¦  «        Z#d„ Z$dddddddddddddde#dfd„Z%dddddddde#dddfd„Z&dedede'de(de(f
d„Z)dedede'de(de(f
d„Z*dS )a  
This module implements the Sequential Least Squares Programming optimization
algorithm (SLSQP), originally developed by Dieter Kraft.
See http://www.netlib.org/toms/733

Functions
---------
.. autosummary::
   :toctree: generated/

    approx_jacobian
    fmin_slsqp

Úapprox_jacobianÚ
fmin_slsqpé    Né   )Úslsqp)Únorm)ÚOptimizeResultÚ_check_unknown_optionsÚ_prepare_scalar_functionÚ_clip_x_for_funcÚ_check_clip_xÚ_wrap_callback)Úapprox_derivative)Úold_bound_to_newÚ_arr_to_scalar)Úarray_namespace)Úarray_api_extra)Ú_call_callback_maybe_halt)ÚNDArrayzrestructuredtext enc                 óR   — t          || d||¬¦  «        }t          j        |¦  «        S )a“  
    Approximate the Jacobian matrix of a callable function.

    Parameters
    ----------
    x : array_like
        The state vector at which to compute the Jacobian matrix.
    func : callable f(x,*args)
        The vector-valued function.
    epsilon : float
        The perturbation used to determine the partial derivatives.
    args : sequence
        Additional arguments passed to func.

    Returns
    -------
    An array of dimensions ``(lenf, lenx)`` where ``lenf`` is the length
    of the outputs of `func`, and ``lenx`` is the number of elements in
    `x`.

    Notes
    -----
    The approximation is done using forward differences.

    ú2-point)ÚmethodÚabs_stepÚargs)r   ÚnpÚ
atleast_2d)ÚxÚfuncÚepsilonr   Újacs        úV/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/scipy/optimize/_slsqp_py.pyr   r   $   s5   € õ6 ˜D !¨IÀØ!%ð'ñ 'ô '€Cõ Œ=˜ÑÔÐó    © éd   g�íµ ÷Æ°>c                 óz  ‡
— |�|}t          |d¦  «        }||||dk    ||dœ}d}|t          ˆ
fd„|D ¦   «         ¦  «        z  }|t          ˆ
fd„|D ¦   «         ¦  «        z  }|r|d||‰
d	œfz  }|r|d
||	‰
d	œfz  }t          | |‰
f|||dœ|¤Ž}|r%|d         |d         |d         |d         |d         fS |d         S )aC  
    Minimize a function using Sequential Least Squares Programming

    Python interface function for the SLSQP Optimization subroutine
    originally implemented by Dieter Kraft.

    Parameters
    ----------
    func : callable f(x,*args)
        Objective function.  Must return a scalar.
    x0 : 1-D ndarray of float
        Initial guess for the independent variable(s).
    eqcons : list, optional
        A list of functions of length n such that
        eqcons[j](x,*args) == 0.0 in a successfully optimized
        problem.
    f_eqcons : callable f(x,*args), optional
        Returns a 1-D array in which each element must equal 0.0 in a
        successfully optimized problem. If f_eqcons is specified,
        eqcons is ignored.
    ieqcons : list, optional
        A list of functions of length n such that
        ieqcons[j](x,*args) >= 0.0 in a successfully optimized
        problem.
    f_ieqcons : callable f(x,*args), optional
        Returns a 1-D ndarray in which each element must be greater or
        equal to 0.0 in a successfully optimized problem. If
        f_ieqcons is specified, ieqcons is ignored.
    bounds : list, optional
        A list of tuples specifying the lower and upper bound
        for each independent variable [(xl0, xu0),(xl1, xu1),...]
        Infinite values will be interpreted as large floating values.
    fprime : callable ``f(x,*args)``, optional
        A function that evaluates the partial derivatives of func.
    fprime_eqcons : callable ``f(x,*args)``, optional
        A function of the form ``f(x, *args)`` that returns the m by n
        array of equality constraint normals. If not provided,
        the normals will be approximated. The array returned by
        fprime_eqcons should be sized as ( len(eqcons), len(x0) ).
    fprime_ieqcons : callable ``f(x,*args)``, optional
        A function of the form ``f(x, *args)`` that returns the m by n
        array of inequality constraint normals. If not provided,
        the normals will be approximated. The array returned by
        fprime_ieqcons should be sized as ( len(ieqcons), len(x0) ).
    args : sequence, optional
        Additional arguments passed to func and fprime.
    iter : int, optional
        The maximum number of iterations.
    acc : float, optional
        Requested accuracy.
    iprint : int, optional
        The verbosity of fmin_slsqp :

        * iprint <= 0 : Silent operation
        * iprint == 1 : Print summary upon completion (default)
        * iprint >= 2 : Print status of each iterate and summary
    disp : int, optional
        Overrides the iprint interface (preferred).
    full_output : bool, optional
        If False, return only the minimizer of func (default).
        Otherwise, output final objective function and summary
        information.
    epsilon : float, optional
        The step size for finite-difference derivative estimates.
    callback : callable, optional
        Called after each iteration, as ``callback(x)``, where ``x`` is the
        current parameter vector.

    Returns
    -------
    out : ndarray of float
        The final minimizer of func.
    fx : ndarray of float, if full_output is true
        The final value of the objective function.
    its : int, if full_output is true
        The number of iterations.
    imode : int, if full_output is true
        The exit mode from the optimizer (see below).
    smode : string, if full_output is true
        Message describing the exit mode from the optimizer.

    See also
    --------
    minimize: Interface to minimization algorithms for multivariate
        functions. See the 'SLSQP' `method` in particular.

    Notes
    -----
    Exit modes are defined as follows:

    - ``-1`` : Gradient evaluation required (g & a)
    - ``0`` : Optimization terminated successfully
    - ``1`` : Function evaluation required (f & c)
    - ``2`` : More equality constraints than independent variables
    - ``3`` : More than 3*n iterations in LSQ subproblem
    - ``4`` : Inequality constraints incompatible
    - ``5`` : Singular matrix E in LSQ subproblem
    - ``6`` : Singular matrix C in LSQ subproblem
    - ``7`` : Rank-deficient equality constraint subproblem HFTI
    - ``8`` : Positive directional derivative for linesearch
    - ``9`` : Iteration limit reached

    Examples
    --------
    Examples are given :ref:`in the tutorial <tutorial-sqlsp>`.

    Nr   r   )ÚmaxiterÚftolÚiprintÚdispÚepsÚcallbackr"   c              3   ó$   •K  — | ]
}d |‰dœV — ŒdS )Úeq©ÚtypeÚfunr   Nr"   ©Ú.0Úcr   s     €r    ú	<genexpr>zfmin_slsqp.<locals>.<genexpr>Ç   s-   øè è € ÐIÐI¸Q˜4¨°4Ð8Ð8ÐIÐIÐIÐIÐIÐIr!   c              3   ó$   •K  — | ]
}d |‰dœV — ŒdS )Úineqr-   Nr"   r0   s     €r    r3   zfmin_slsqp.<locals>.<genexpr>È   s-   øè è € ÐLÐL¸q˜6¨!°TÐ:Ð:ÐLÐLÐLÐLÐLÐLr!   r,   )r.   r/   r   r   r5   )r   ÚboundsÚconstraintsr   r/   ÚnitÚstatusÚmessage)r   ÚtupleÚ_minimize_slsqp)r   Úx0ÚeqconsÚf_eqconsÚieqconsÚ	f_ieqconsr6   ÚfprimeÚfprime_eqconsÚfprime_ieqconsr   ÚiterÚaccr'   r(   Úfull_outputr   r*   ÚoptsÚconsÚress             `          r    r   r   F   sW  ø€ ð` ÐØˆõ ˜h¨Ñ0Ô0€HàØØØ˜a’KØØ ð"ð "€Dð €Dð 	�EÐIÐIÐIÐIÀ&ÐIÑIÔIÑIÔIÑI€DØ�EÐLÐLÐLÐLÀGÐLÑLÔLÑLÔLÑL€Dð ð #Ø˜$ x¸Øð ð  ð #ñ 	#ˆàð #Ø˜&¨¸>Øð ð  ð #ñ 	#ˆõ ˜$  Dð 4¨f¸VØ&*ð4ð 4Ø.2ð4ð 4€Càð Ø�3Œx˜˜Uœ S¨¤Z°°X´ÀÀIÄÐNÐNà�3Œxˆr!   Fc                 óÈ  ‡‡‡1‡2‡3— t          |¦  «         |}|
Š1|	sd}t          |¦  «        }t          j        |                     |¦  «        d|¬¦  «        }|j        }|                     |j        d¦  «        r|j        }|                     | 	                    ||¦  «        d¦  «        Š3|�t          |¦  «        dk    rt          j         t          j        fŠ2nt          |¦  «        Š2t          j        ‰3‰2d         ‰2d         ¦  «        Š3t          |t           ¦  «        r|f}dddœ}t#          |¦  «        D �]\  }}	 |d	                              ¦   «         }|dvrt'          d
|d	         › d�¦  «        ‚n`# t(          $ r}t)          d|› d�¦  «        |‚d}~wt*          $ r}t+          d¦  «        |‚d}~wt,          $ r}t+          d¦  «        |‚d}~ww xY wd|vrt'          d|› d�¦  «        ‚|                     d¦  «        }|€ˆ1ˆˆˆ2fd„} ||d         ¦  «        }||xx         |d         ||                     dd¦  «        dœfz  cc<   �Œddddddddddd d!œ}t1          t3          t          ˆ3fd"„|d#         D ¦   «         ¦  «        ¦  «        }t1          t3          t          ˆ3fd$„|d%         D ¦   «         ¦  «        ¦  «        }||z   }t          ‰3¦  «        }|�t          |¦  «        dk    rvt          j        |t6          ¬&¦  «        }t          j        |t6          ¬&¦  «        }|                     t          j        ¦  «         |                     t          j        ¦  «         �nRt          j        d'„ |D ¦   «         t6          ¦  «        } | j        d         |k    rtA          d(¦  «        ‚t          j!        d)¬*¦  «        5  | dd…df         | dd…df         k    }!ddd¦  «         n# 1 swxY w Y   |! "                    ¦   «         r0t'          d+d, #                    d-„ |!D ¦   «         ¦  «        › d.�¦  «        ‚| dd…df          $                    ¦   «         | dd…df          $                    ¦   «         }}t          j%        | ¦  «         }"t          j        ||"dd…df         <   t          j        ||"dd…df         <   tM          | ‰3‰||
‰‰2|¬/¦  «        }#tO          |#j(        ‰2¦  «        }$tO          |#j)        ‰2¦  «        }%i d0|“d1d2“d3d2“d4d2“d5d2“d6d2“d7d2“d8d2“d9d2“d:d2“d;d<|z  “d=d“d>d“d?d“d@d“dAtU          |¦  «        “dBd“||d|dCœ¥}&|dDk    rtW          dEdF›dGdHdF›dGdIdJ›dGdKdJ›�¦  «         t          j,        t[          |dD|z  z   dDz   d¦  «        gt          j.        ¬&¦  «        }'||dz   z  dDz  dL|z  |z  z   |dM|z  z   dNz   |z  z
  dO|z  z   dP|z  |z  z   dQ|z  z   ||z  z   dRz   }(|dk    r|(dD|z  |dz   z  z  }(t          j,        t[          |(d¦  «        t          j        ¬&¦  «        }) |$‰3¦  «        }* |%‰3¦  «        }+t          j,        t[          d|dD|z  z   dDz   ¦  «        gt          j        ¬&¦  «        },t          j,        t[          d|¦  «        |gt          j        dS¬T¦  «        }-t          j,        t[          d|¦  «        gt          j        ¬&¦  «        }.t_          |-‰3|||¦  «         ta          |.‰3|||¦  «         d}/	 tc          |&|*|+|-|.‰3|,|||)|'¦  «         |&dV         dk    r(|# (                    ‰3¦  «        }*ta          |.‰3|||¦  «         |&dV         dk    r(|# )                    ‰3¦  «        }+t_          |-‰3|||¦  «         |&d@         |/k    rr|�4te          t          j$        ‰3¦  «        |*¬W¦  «        }0tg          ||0¦  «        rn`|dDk    r6tW          |&d@         dX›dG|#j4        dX›dG|*dY›dGtk          |+¦  «        dY›�¦  «         tm          |&dV         ¦  «        dk    rn
|&d@         }/�Œ#|dk    rxtW          ||&dV                  dZ|&dV         › d[�z   ¦  «         tW          d\|*¦  «         tW          d]|&d@         ¦  «         tW          d^|#j4        ¦  «         tW          d_|#j7        ¦  «         te          ‰3|*|+|&d@         |#j4        |#j7        |&dV         ||&dV                  |&dV         dk    |,d|…         ¬`¦
  «
        S )aaØ  
    Minimize a scalar function of one or more variables using Sequential
    Least Squares Programming (SLSQP).

    Parameters
    ----------
    ftol : float
        Precision target for the value of f in the stopping criterion. This value
        controls the final accuracy for checking various optimality conditions;
        gradient of the lagrangian and absolute sum of the constraint violations
        should be lower than ``ftol``. Similarly, computed step size and the
        objective function changes are checked against this value. Default is 1e-6.
    eps : float
        Step size used for numerical approximation of the Jacobian.
    disp : bool
        Set to True to print convergence messages. If False,
        `verbosity` is ignored and set to 0.
    maxiter : int, optional
        Maximum number of iterations. Default value is 100.
    finite_diff_rel_step : None or array_like, optional
        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
        use for numerical approximation of `jac`. The absolute step
        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
        possibly adjusted to fit into the bounds. For ``method='3-point'``
        the sign of `h` is ignored. If None (default) then step is selected
        automatically.
    workers : int, map-like callable, optional
        A map-like callable, such as `multiprocessing.Pool.map` for evaluating
        any numerical differentiation in parallel.
        This evaluation is carried out as ``workers(fun, iterable)``.

        .. versionadded:: 1.16.0

    Returns
    -------
    res : OptimizeResult
        The optimization result represented as an `OptimizeResult` object.
        In this dict-like object the following fields are of particular importance:
        ``x`` the solution array, ``success`` a Boolean flag indicating if the
        optimizer exited successfully, ``message`` which describes the reason for
        termination, and ``multipliers`` which contains the Karush-Kuhn-Tucker
        (KKT) multipliers for the QP approximation used in solving the original
        nonlinear problem. See ``Notes`` below. See also `OptimizeResult` for a
        description of other attributes.

    Notes
    -----
    The KKT multipliers are returned in the ``OptimizeResult.multipliers``
    attribute as a NumPy array. Denoting the dimension of the equality constraints
    with ``meq``, and of inequality constraints with ``mineq``, then the returned
    array slice ``m[:meq]`` contains the multipliers for the equality constraints,
    and the remaining ``m[meq:meq + mineq]`` contains the multipliers for the
    inequality constraints. The multipliers corresponding to bound inequalities
    are not returned. See [1]_ pp. 321 or [2]_ for an explanation of how to interpret
    these multipliers. The internal QP problem is solved using the methods given
    in [3]_ Chapter 25.

    Note that if new-style `NonlinearConstraint` or `LinearConstraint` were
    used, then ``minimize`` converts them first to old-style constraint dicts.
    It is possible for a single new-style constraint to simultaneously contain
    both inequality and equality constraints. This means that if there is mixing
    within a single constraint, then the returned list of multipliers will have
    a different length than the original new-style constraints.

    References
    ----------
    .. [1] Nocedal, J., and S J Wright, 2006, "Numerical Optimization", Springer,
       New York.
    .. [2] Kraft, D., "A software package for sequential quadratic programming",
       1988, Tech. Rep. DFVLR-FB 88-28, DLR German Aerospace Center, Germany.
    .. [3] Lawson, C. L., and R. J. Hanson, 1995, "Solving Least Squares Problems",
       SIAM, Philadelphia, PA.

    r   r   )ÚndimÚxpzreal floatingéÿÿÿÿNr"   )r,   r5   r.   zUnknown constraint type 'z'.zConstraint z has no type defined.z/Constraints must be defined using a dictionary.z#Constraint's type must be a string.r/   z has no function defined.r   c                 ó   •‡ — ˆˆˆ ˆˆfd„}|S )Nc                 ó€   •— t          | ‰¦  «        } ‰dv rt          ‰| ‰|‰‰¬¦  «        S t          ‰| d‰|‰¬¦  «        S )N)r   z3-pointÚcs)r   r   Úrel_stepr6   r   )r   r   r   r6   )r   r   )r   r   r   Úfinite_diff_rel_stepr/   r   Ú
new_boundss     €€€€€r    Úcjacz3_minimize_slsqp.<locals>.cjac_factory.<locals>.cjaca  sr   ø€ Ý% a¨Ñ4Ô4�AàÐ:Ð:Ð:Ý0°°aÀÈ$Ø:NØ8Bð Dñ  Dô  Dð Dõ  1°°aÀ	Ø:AÈØ8Bð Dñ  Dô  Dð Dr!   r"   )r/   rU   r   rS   r   rT   s   ` €€€€r    Úcjac_factoryz%_minimize_slsqp.<locals>.cjac_factory`  sA   øø€ ð
Dð 
Dð 
Dð 
Dð 
Dð 
Dð 
Dð 
Dð 
Dð �r!   r   )r/   r   r   z$Gradient evaluation required (g & a)z$Optimization terminated successfullyz$Function evaluation required (f & c)z4More equality constraints than independent variablesz*More than 3*n iterations in LSQ subproblemz#Inequality constraints incompatiblez#Singular matrix E in LSQ subproblemz#Singular matrix C in LSQ subproblemz2Rank-deficient equality constraint subproblem HFTIz.Positive directional derivative for linesearchzIteration limit reached)rN   r   r   é   é   é   é   é   é   é   é	   c           	      ó^   •— g | ])}t          j         |d          ‰g|d         ¢R Ž ¦  «        ‘Œ*S ©r/   r   ©r   Ú
atleast_1d©r1   r2   r   s     €r    ú
<listcomp>z#_minimize_slsqp.<locals>.<listcomp>ƒ  sM   ø€ ð #ð #ð #Øõ œ h a¨¤h¨qÐ&=°1°V´9Ð&=Ð&=Ð&=Ñ>Ô>ð #ð #ð #r!   r,   c           	      ó^   •— g | ])}t          j         |d          ‰g|d         ¢R Ž ¦  «        ‘Œ*S r`   ra   rc   s     €r    rd   z#_minimize_slsqp.<locals>.<listcomp>…  sM   ø€ ð &ð &ð &Øõ œ x q¨¤x°Ð'>°A°f´IÐ'>Ð'>Ð'>Ñ?Ô?ð &ð &ð &r!   r5   )Údtypec                 óP   — g | ]#\  }}t          |¦  «        t          |¦  «        f‘Œ$S r"   )r   )r1   ÚloÚups      r    rd   z#_minimize_slsqp.<locals>.<listcomp>“  sA   € ð .ð .ð .Ù"˜2˜rõ )¨Ñ,Ô,­n¸RÑ.@Ô.@ÐAð .ð .ð .r!   zDSLSQP Error: the length of bounds is not compatible with that of x0.Úignore)ÚinvalidzSLSQP Error: lb > ub in bounds z, c              3   ó4   K  — | ]}t          |¦  «        V — Œd S )N)Ústr)r1   Úbs     r    r3   z"_minimize_slsqp.<locals>.<genexpr>ž  s(   è è € Ð)AÐ)A°Q­#¨a©&¬&Ð)AÐ)AÐ)AÐ)AÐ)AÐ)Ar!   ú.)r   r   r   rS   r6   ÚworkersrF   Úalphag        Úf0ÚgsÚh1Úh2Úh3Úh4ÚtÚt0Útolg      $@ÚexactÚinconsistentÚresetrE   ÚitermaxÚline)ÚmÚmeqÚmodeÚnrW   ÚNITz>5ú ÚFCÚOBJFUNz>16ÚGNORMrX   rZ   r\   r^   r]   é#   é   ÚF)rf   ÚorderTr‚   )r   r/   Ú5dz16.6Ez    (Exit mode ú)z#            Current function value:z            Iterations:z!            Function evaluations:z!            Gradient evaluations:)
r   r/   r   r8   ÚnfevÚnjevr9   r:   ÚsuccessÚmultipliers)8r	   r   ÚxpxÚ
atleast_ndÚasarrayÚfloat64Úisdtyperf   ÚreshapeÚastypeÚlenr   Úinfr   ÚclipÚ
isinstanceÚdictÚ	enumerateÚlowerÚ
ValueErrorÚKeyErrorÚ	TypeErrorÚAttributeErrorÚgetÚsumÚmapÚemptyÚfloatÚfillÚnanÚarrayÚshapeÚ
IndexErrorÚerrstateÚanyÚjoinÚcopyÚisfiniter
   r   r/   ÚgradÚintÚprintÚzerosÚmaxÚint32Ú_eval_con_normalsÚ_eval_constraintr   r   r   r�   ÚlanormÚabsÚngev)4r   r=   r   r   r6   r7   r%   r&   r'   r(   r)   r*   rS   rp   Úunknown_optionsrF   rM   rf   rI   ÚicÚconÚctypeÚerU   rV   Ú
exit_modesr�   Úmieqr€   rƒ   ÚxlÚxuÚbndsÚbnderrÚinfbndÚsfÚwrapped_funÚwrapped_gradÚ
state_dictÚindicesÚbuffer_sizeÚbufferÚfxÚgÚmultÚCÚdÚ	iter_prevÚintermediate_resultr   rT   r   s4      `        `                                    @@@r    r<   r<   Û   sT  øøøøø€ õ^ ˜?Ñ+Ô+Ð+Ø
€CØ€Gàð Øˆõ 
˜Ñ	Ô	€BÝ	Œ˜Ÿ
š
 2™œ¨Q°2Ð	6Ñ	6Ô	6€BØŒJ€EØ	‡z‚z�"”(˜OÑ,Ô,ð Ø”ˆØ
�
Š
�2—9’9˜R Ñ'Ô'¨Ñ,Ô,€Að €~�˜V™œ¨Ò)Ð)Ý”v�g�rœvÐ&ˆ
ˆ
å% fÑ-Ô-ˆ
õ 	Œ��:˜a”= *¨Q¤-Ñ0Ô0€Aõ �+�tÑ$Ô$ð &Ø"�oˆà˜bÐ!Ð!€DÝ˜[Ñ)Ô)ð +9ñ +9‰ˆˆCð	NØ˜”K×%Ò%Ñ'Ô'ˆEð ˜NÐ*Ð*Ý Ð!L¸SÀ¼[Ð!LÐ!LÐ!LÑMÔMÐMð +øõ ð 	Kð 	Kð 	KÝÐB¨ÐBÐBÐBÑCÔCÈÐJøøøøÝð 	2ð 	2ð 	2Ýð *ñ +ô +Ø01ð2øøøøåð 	Jð 	Jð 	JÝÐAÑBÔBÈÐIøøøøð	Jøøøð ˜ÐÐÝÐH¨2ÐHÐHÐHÑIÔIÐIð �wŠw�u‰~Œ~ˆØˆ<ðð ð ð ð ð ð ð ð  �<  E¤
Ñ+Ô+ˆDð 	ˆUˆˆŒ  E¤
Ø $Ø!$§¢¨°Ñ!4Ô!4ð6ð 6ð 9ñ 	9ˆˆ‰‰ð =Ø<Ø<ØLØBØ;Ø;Ø;ØJØFØ/ð
1ð 
1€Jõ �c•#ð #ð #ð #ð #Ø˜D”zð#ñ #ô #ñ $ô $ñ %ô %€Cå�s•3ð &ð &ð &ð &Ø˜Vœð&ñ &ô &ñ 'ô 'ñ (ô (€Dð 	ˆd‰
€AåˆA‰Œ€Að €~�˜V™œ¨Ò)Ð)ÝŒX�a�uÐ%Ñ%Ô%ˆÝŒX�a�uÐ%Ñ%Ô%ˆØ
�Š•”‰ŒˆØ
�Š•”‰Œˆ‰åŒxð .ð .Ø&,ð.ñ .ô .Ý/4ñ6ô 6ˆàŒ:�aŒ=˜AÒÐÝð ;ñ <ô <ð <õ Œ[ Ð*Ñ*Ô*ð 	-ð 	-Ø˜!˜!˜!˜Q˜$”Z $ q q q¨! t¤*Ò,ˆFð	-ð 	-ð 	-ñ 	-ô 	-ð 	-ð 	-ð 	-ð 	-ð 	-ð 	-øøøð 	-ð 	-ð 	-ð 	-ð �:Š:‰<Œ<ð 	FÝð EØ $§	¢	Ð)AÐ)A¸&Ð)AÑ)AÔ)AÑ AÔ AðEð Eð Eñ Fô Fð Fà�a�a�a˜�d”—’Ñ"Ô" D¨¨¨¨A¨¤J§O¢OÑ$5Ô$5ˆBˆõ ”+˜dÑ#Ô#Ð#ˆÝœ6ˆˆ6�!�!�!�Q�$Œ<ÑÝœ6ˆˆ6�!�!�!�Q�$Œ<Ñõ 
" $¨¨s¸ÀsØ7KØ)3¸Wð
Fñ 
Fô 
F€Bõ
 # 2¤6¨:Ñ6Ô6€KÝ# B¤G¨ZÑ8Ô8€Lð.Øˆsðà�ðð 	ˆcðð 	ˆcð	ð
 	ˆcðð 	ˆcðð 	ˆcðð 	ˆcðð 	ˆSðð 	ˆcðð 	ˆt�C‰xðð 	�ðð 	˜ðð 	�ðð 	�ðð  	•3�w‘<”<ð!ð" 	�ð#ð$ ØØØð+ð ð €Jð2 �‚{€{Ý�ÐBÐBÐB˜DÐBÐBÐB hÐBÐBÐB°WÐBÐBÐBÑCÔCÐCõ Œh�˜A  !¡™G a™K¨Ñ+Ô+Ð,µB´HÐ=Ñ=Ô=€Gð 	
ˆ1ˆQ‰3‰�‰
�Q�q‘S˜‘UÑ˜a ! A¡#™g¨™k¨3Ñ.Ñ.°°1±Ñ4°q¸±s¸1±uÑ<¸rÀ!¹tÑCÀcÈ#ÁgÑMÐPRÑRð ð
 ˆq‚y€yØ�q˜‘s˜A ™E‘{Ñ"ˆÝŒX•c˜+ qÑ)Ô)µ´Ð<Ñ<Ô<€Fð
 
ˆ�Q‰Œ€BØˆ�Q‰Œ€Aõ Œ8•S˜˜A  !¡™G a™KÑ(Ô(Ð)µ´Ð<Ñ<Ô<€Dõ 	Œ•#�a˜‘)”)˜Q�¥r¤z¸Ð=Ñ=Ô=€AÝ
Œ•#�a˜‘)”)�¥B¤JÐ/Ñ/Ô/€AÝ�a˜˜D ! SÑ)Ô)Ð)Ý�Q˜˜4  CÑ(Ô(Ð(à€Ið'åˆj˜"˜a  A q¨$°°B¸ÀÑHÔHÐHà�fÔ Ò"Ð"Ø—’˜‘”ˆBÝ˜Q  4¨¨CÑ0Ô0Ð0à�fÔ Ò#Ð#Ø—’˜‘
”
ˆAÝ˜a  D¨!¨SÑ1Ô1Ð1à�fÔ 	Ò)Ð)àÐ#Ý&4Ý”g˜a‘j”jØð'ñ 'ô 'Ð#õ -¨XÐ7JÑKÔKð Øð ˜Š{ˆ{Ý˜ FÔ+Ð>ð 6ð 6°´Ð>ð 6ð 6ØÐ5ð6ð 6Ý$*¨1¡I¤IÐ5ð6ð 6ñ 7ô 7ð 7õ ˆz˜&Ô!Ñ"Ô" aÒ'Ð'Øà˜vÔ&ˆ	ñ?'ðD �‚{€{ÝØ�z &Ô)Ô*Ð-T¸zÈ&Ô?QÐ-TÐ-TÐ-TÑTñ	
ô 	
ð 	
õ 	Ð3°RÑ8Ô8Ð8ÝÐ'¨°FÔ);Ñ<Ô<Ð<ÝÐ1°2´7Ñ;Ô;Ð;ÝÐ1°2´7Ñ;Ô;Ð;åØ
�˜ 
¨6Ô 2¸¼ÀrÄwØ˜&Ô!¨:°jÀÔ6HÔ+IØ˜FÔ# qÒ(°t¸B¸Q¸B´xðñ ô ð sB   Ä<E4Å4
GÅ>FÆGÆF/Æ/GÆ<GÇGÎ:O!Ï!O%Ï(O%rÖ   r   rI   r€   r�   c                 óê  — |dk    rd S |dk    rod}|d         D ]d}t          j         |d         |g|d         ¢R Ž ¦  «                             ¦   «         }|| ||t          |¦  «        z   …<   |t          |¦  «        z  }Œe||k    ro|}|d         D ]d}t          j         |d         |g|d         ¢R Ž ¦  «                             ¦   «         }|| ||t          |¦  «        z   …<   |t          |¦  «        z  }Œed S )Nr   r,   r/   r   r5   )r   rb   Úravelrš   )rÖ   r   rI   r€   r�   ÚrowrÁ   Útemps           r    r»   r»   9  s  € ØˆA‚v€vØˆð ˆQ‚w€wØˆØ˜”:ð 	ð 	ˆCÝ”=   U¤¨AÐ!<°°F´Ð!<Ð!<Ð!<Ñ=Ô=×CÒCÑEÔEˆDØ%)ˆAˆc�#�˜D™	œ	‘/Ð!Ñ"Ø•3�t‘9”9ÑˆCˆCàˆ3‚w€wØˆØ˜”<ð 	ð 	ˆCÝ”=   U¤¨AÐ!<°°F´Ð!<Ð!<Ð!<Ñ=Ô=×CÒCÑEÔEˆDØ%)ˆAˆc�#�˜D™	œ	‘/Ð!Ñ"Ø•3�t‘9”9ÑˆCˆCà
€Fr!   rÕ   c                 ó¢  — |dk    rd S |dk    r]d}|d         D ]R}t          j         |d         |g|d         ¢R Ž ¦  «        }|| |||j        d         z   …d d …f<   ||j        d         z  }ŒS||k    r]|}|d         D ]R}t          j         |d         |g|d         ¢R Ž ¦  «        }|| |||j        d         z   …d d …f<   ||j        d         z  }ŒSd S )Nr   r,   r   r   r5   )r   r   r­   )rÕ   r   rI   r€   r�   rÛ   rÁ   rÜ   s           r    rº   rº   R  s  € ØˆA‚v€vØˆà
ˆQ‚w€wØˆØ˜”:ð 	!ð 	!ˆCÝ”=   U¤¨AÐ!<°°F´Ð!<Ð!<Ð!<Ñ=Ô=ˆDØ,0ˆAˆc�#˜œ
 1œÑ%Ð% q q qÐ(Ñ)Ø�4”:˜a”=Ñ ˆCˆCàˆ3‚w€wØˆØ˜”<ð 	!ð 	!ˆCÝ”=   U¤¨AÐ!<°°F´Ð!<Ð!<Ð!<Ñ=Ô=ˆDØ,0ˆAˆc�#˜œ
 1œÑ%Ð% q q qÐ(Ñ)Ø�4”:˜a”=Ñ ˆCˆCà
€Fr!   )+Ú__doc__Ú__all__Únumpyr   Ú	_slsqplibr   Úscipy.linalgr   r¼   Ú	_optimizer   r	   r
   r   r   r   Ú_numdiffr   Ú_constraintsr   r   Úscipy._lib._array_apir   Ú
scipy._libr   r“   Úscipy._lib._utilr   Únumpy.typingr   Ú__docformat__ÚsqrtÚfinfor–   r)   Ú_epsilonr   r   r<   rž   rµ   r»   rº   r"   r!   r    ú<module>rî      s6  ððð ð ˜lÐ
+€à Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ð7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð 7ð (Ð 'Ð 'Ð 'Ð 'Ð 'Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø -Ð -Ð -Ð -Ð -Ð -Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø  Ð  Ð  Ð  Ð  Ð  à%€àˆ2Œ7�8�2”8˜BœJÑ'Ô'Ô+Ñ,Ô,€ðð ð ðD !#¨T¸2ÈØ °TØ"¨°#¸6Ø˜d°¸8Øð	Rð Rð Rð Rðj $&¨4¸Ø "Ø f°Q¸UØ ¨4ÀdØ ð	[ð [ð [ð [ð|
˜ð  Gð °4ð ¸Cð Àcð ð ð ð ð2˜ð  Wð °Dð ¸Sð Àsð ð ð ð ð ð r!   