o
    0eIj                     @   s   d Z ddlmZ dd ZdS )uB   Aggregate commercial upside vs exposure → launch recommendation.    )compute_risk_exposurec                 C   s8  t | j}t | j}t| j|}|jddd|d di| | jdd}| jd	d
}| jdd}t|d | d}t|| d}	|rIdnd}
|
||t | j	| j
|d |||	||d|
 d| dt | j	 d| d|	dd|d ddd}|| _|jd d|d i| |jdddd| j
|||d |	d	 |S )!Ntoolr   textu   ≤4% turnover · up to €max_exposure_eurz,.0fprojected_contribution_eurr   demand_indexg      ?wtp_premium_pctz9-15%gQ?zGREEN-LIGHT WITH CONDITIONSzGREEN-LIGHTd   z	: launch /z substantiated claims; drop u    unprovable; €u    projected upside vs up to €z fine exposure avoided.)recommendationclearedblockedtotal_claims
confidencer   r   positioning_uplift_eurnet_upside_eurwtp_premiumr   	cited_pctsummary	synthesisDeterminationr   metriccoordinatorzrun complete)r   r   r   r   r   exposure_eurr   )r   r   )r   r   )lenr   r   r   turnover_euremit
commercialgetroundclaimsr   determination)ledgereventsr   r   riskupside
demand_idxwtppositioning_uplift
net_upsiderecdet r,   2/opt/greenlight/greenlight/agents/determination.py
synthesize   sX   

 r.   N)__doc__greenlight.toolsr   r.   r,   r,   r,   r-   <module>   s    