
    N<h                         d dl Z d dlZd dlmZmZ d dlmZ d dlmZmZm	Z	 d dl
Z
 G d d          Zd Zedk    r e            \  ZZdS dS )	    N)datetime	timedelta)LocationInfo)sun	elevationazimuthc                   D    e Zd Zd ZddZd Zd ZddZddZd	 Z	d
 Z
dS )BifacialSolarSimulationc                     d| _         d| _        d| _        d| _        t	          ddddd	          | _        t          j        d          | _        d
| _        d| _	        d S )Ni  g?g?g@z
Lago BrownChilezAmerica/Santiagog@+Gg_2QRi  333333?)
panel_powerpanel_efficiencybifaciality_factor
panel_arear   locationpytztimezonedni_clear_skyground_albedo)selfs    :/home/www/claudev.cz/orb3/solar_simulation_astronomical.py__init__z BifacialSolarSimulation.__init__	   si     %"&' %\7<NP[]hii&899 ! "    r   c                     t          |j        |j        |j        ||d          }| j                            |          }t          | j        j        |          }t          | j        j        |          }||fS )z:Get precise solar position using astronomical calculationsr   )
r   yearmonthdayr   localizer   r   observerr   )r   datehourminutedtsolar_elevationsolar_azimuths          r   get_solar_positionz*BifacialSolarSimulation.get_solar_position   si    diTXtVQGG]##B'' $DM$:B?? 6;;--r   c                    |dk    rdS t          j        |          }t          j        |          }t          j        |          }t          j        |          }t          j        |          t          j        |          z  t          j        |          t          j        |          z  t          j        ||z
            z  z   }	|	S )z:Calculate angle of incidence between sun and panel surfacer   )mathradianssincos)
r   r%   r&   
panel_tiltpanel_azimuthse_radsa_radpt_radpa_radcos_incidences
             r   calculate_angle_of_incidencez4BifacialSolarSimulation.calculate_angle_of_incidence%   s    a1 o..m,,j))m,, HVtx///HVtx///$(6F?2K2KKL 	
 r   c                 h   |dk    rdS |                      ||||          }|dz   dz  }|                      ||||          }t          ||z
            }|dk    rd|z
  }t          ||z
            }	|	dk    rd|	z
  }	|dk     r| j        t          d|          z  }
d}n|	dk     rPd}
|dk    rE|dk     r'|dk    rd}n t          d|z
            dz  }d	d
|z  z
  }nd	}| j        |z  | j        z  |z  }nAd}n>| j        t          d|          z  dz  }
| j        t          d|          z  | j        z  dz  }|
|fS )z1Calculate irradiance with proper bifacial physicsr   r   r      ih  Z      g333333?     V@      ?皙?      ?)r4   absr   maxr   )r   r%   r&   r-   r.   	front_cosback_azimuthback_cosazimuth_to_frontazimuth_to_back	front_irrback_irrbifacial_geometry_factorvertical_deviations                 r   calculate_bifacial_irradiancez5BifacialSolarSimulation.calculate_bifacial_irradiance8   s   a4 55o}V`bopp	 &+s244_mU_amnn }}<==c!!"%55ml:;;S  !O3O b  *SI->->>IHHr!!I!||"R''!R''3600 .1j-A-AD-H*36?Q9Q3Q00/2,-84;RRUmm *SI->->>DI)C8,<,<<t?VVY\\H(""r   tiltedc                 "   |                      |||          \  }}|dk    rdS |dk    r|                     |||d          }	|                     |||d          }
|	|
k    r+|	dk    r%| j        |	z  }|
dk    r| j        |
z  | j        z  nd}nH|
dk    r
| j        |
z  nd}|	dk    r| j        |	z  | j        z  nd}n|                     ||||          \  }}d}| j        |z  }|dt          j        t          j        |                    z   z  dz  }|dt          j        t          j        |                    z
  z  dz  }| j        t          j        t          j        |                    z  | j	        z  }|dt          j        t          j        |                    z
  z  dz  }|dt          j        t          j        |                    z   z  dz  }t          d|z
            }d	|d
z  z
  }| j        dd|z  z   z  }||z   |z   }|||z   |z  z   }||fS )zFCalculate irradiance using simplified but physically accurate approachr   r6   ew_verticalr8   i  r         r;   r:   r<   g333333?)r'   r4   r   r   rI   r)   r,   r*   r+   r   r>   )r   r!   r"   r#   r-   r.   
panel_type
solar_elevsolar_azeast_coswest_cosfront_directback_directdiffuse_factorsky_diffusefront_diffuseback_diffuseground_reflectedfront_groundback_groundangle_from_verticalbifacial_efficiencyback_indirect_factorfront_irradianceback_irradiances                            r   calculate_panel_irradiancez2BifacialSolarSimulation.calculate_panel_irradiancej   sr   #66tT6JJ
H??4&&88Xz[]^^H88Xz[^__H(""x!||#1H<YadeYeYed08;d>UUUkl@H1t1H<<RSYadeYeYed08;d>UUUkl )-(J(JHj-)A )A%L+ (>9#q48DL4L4L+M+M'MNQRR"a$(4<
3K3K*L*L&LMPQQ  -j9Q9Q0R0RRUYUgg'1txZ8P8P/Q/Q+QRUVV&!dht|J7O7O.P.P*PQTUU ""z/22!%84%?@#6#FY@Y:YZ (-7,F%)CG[([[00r   c                 <   i }t          dd          D ]}t          d|d          }d}g }t          d          D ]$}	|	dz  }
|	dz  dk    rdnd}|                     ||
||||          \  }}|dk    s|dk    r||z   }|d	z  | j        z  }||d
z  z  }|dk    r||z  dz  nd}|
dd|d}|                    |t          |                     ||
|          d         d          t          |d          t          |d          t          |d          t          |d          t          |d          d           |
dd|d}|                    |ddddddd           &g d|dz
           }||z  d	z  }t          |d          t          |d          |d||<   |S )zACalculate monthly energy production for given panel configurationrM           r   0   rN   r9   i  r=   d   02d:)timer%   r`   ra   total_irradiancepowerbifacial_contribution)      ro   r9   ro   r9   ro   ro   r9   ro   r9   ro   )
energy_kwhdaily_productionhalf_hourly_data)ranger   rb   r   appendroundr'   )r   r-   r.   rO   monthly_productionr   r!   rr   rs   	half_hourr"   r#   rE   rF   rl   rm   rn   time_strdays_in_monthmonthly_energys                       r   calculate_monthly_productionz4BifacialSolarSimulation.calculate_monthly_production   sl   1b\\ 8	 8	ED%,,D ! #2YY & &	 A~'!mq00b&*&E&EdDRXZdfsu  'A  'A#	8q==HqLL'08';$ .48HHE %3$ TdfgSgSgX8H-H3-N-Nmn)"&999V999H$++ (+01H1HtU[1\1\]^1_ab+c+c,1)Q,?,?+01+=+=,12BA,F,F!&ua167La1P1P- -     #'999V999H$++ (+,,-+,,-!"12- -     MLLUSTWUM-=DN $NA66$)*:A$>$>$4) )u%% "!r   c                    dddddddddddd	dd
ddddd
ddddd
ddddd
ddddd
dg}i }|D ]N}t          d|d                     |                     |d         |d         |d                   }|||d         <   O|S )z%Run simulation for all configurationsVertical North-Southr8   r   ns_vertical)nametiltr   typeVertical East-WestrL   	   Tilt 20°   rJ   	   Tilt 30°r9   	   Tilt 45°-   	   Tilt 60°<   	   Tilt 70°F   z  - r   r   r   r   )printr|   )r   configurationsresultsconfig
productions        r   run_simulationz&BifacialSolarSimulation.run_simulation   s     ,RA}]])2"m\\ "HMM "HMM "HMM "HMM "HMM
 $ 	1 	1F)))***::6&>6R[K\^dek^lmmJ&0GF6N##r   c           
      \  " i }|                                 D ]3\  }"t          "fdt          dd          D                       }|||<   4t          ||j                  }||         }g d}g d}d}	dD ]#}t          ||                   }
|	d	| d
|
 dz  }	$|	d| dt          |           dz  }	g d}t          dd          D ]d}||dz
           }|dv rdnd}|	d| d| d| dz  }	|D ]8}||         |         d         }|dv rdnd}|r|r|dz  }n|rd}|	d| d| dz  }	9|	dz  }	e|	dz  }	|D ]}||         }
|dv rdnd}|	d| d|
ddz  }	 |	dz  }	|	dz  }	t          |          D ]\  }}|dk    rd nd}|	d!| d"| d#| d$z  }	|	d%z  }	t          dd          D ]E}||dz
           }||dz
           }|dk    rd nd}|	d&| d'| d(| d)z  }	i }|D ]}||         |         d*         ||<   g }t          d+|d,          }t          d-          D ]U}|d.z  }|d.z  dk    rdnd/}|                     |||          \  }}|dk    r!|d0d1|d0}|	                    |||f           V|rq|D ]m\  }}}|	d2| d3|dd4|d5d6z  }	|D ]N}d}d}||         D ] } | d7         |k    r| d8         }| d9         } n!|dk    r|	d:|dd;|dd<z  }	D|	d:|dd=z  }	O|	dz  }	nn|	d>z  }	|	d?z  }	G|	d@z  }	t          dAdBdCD          5 }!|!                    |	           dEdEdE           dES # 1 swxY w Y   dES )Fz"Generate comprehensive HTML reportc              3   4   K   | ]}|         d          V  dS rq   N .0r   datas     r   	<genexpr>z?BifacialSolarSimulation.generate_html_report.<locals>.<genexpr>   s,      SSUtE{<8SSSSSSr   rM   rd   key)Ledenu   Únoru   BřezenDubenu   Květenu   Červenu	   ČervenecSrpenu   Záříu   ŘíjenListopadProsinec)JanuaryFebruaryMarchAprilMayJuneJulyAugust	SeptemberOctoberNovemberDecemberu%&  <!DOCTYPE html>
<html lang="cs">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Analýza výkonu bifaciálního panelu - Lago Brown, Chile</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f8f9fa;
        }
        
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        .header h1 {
            margin: 0;
            font-size: 2.5em;
            font-weight: 300;
        }
        
        .header p {
            margin: 10px 0 0 0;
            font-size: 1.1em;
            opacity: 0.9;
        }
        
        .specs {
            background: white;
            padding: 25px;
            border-radius: 10px;
            margin-bottom: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .specs h2 {
            color: #667eea;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }
        
        .spec-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        
        .spec-card {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            border-left: 4px solid #667eea;
        }
        
        .spec-card h3 {
            margin: 0 0 15px 0;
            color: #495057;
        }
        
        .spec-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            padding: 5px 0;
            border-bottom: 1px solid #e9ecef;
        }
        
        .spec-item:last-child {
            border-bottom: none;
        }
        
        .section {
            background: white;
            margin-bottom: 30px;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .section h2 {
            background: #667eea;
            color: white;
            margin: 0;
            padding: 20px 25px;
            font-size: 1.5em;
        }
        
        .section-content {
            padding: 25px;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        
        th {
            background: #667eea;
            color: white;
            padding: 15px 10px;
            text-align: left;
            font-weight: 600;
        }
        
        .highlight-column {
            background-color: #e3f2fd !important;
            font-weight: bold;
        }
        
        .highlight-row {
            background-color: #fff3e0 !important;
            font-weight: bold;
        }
        
        .highlight-column.highlight-row {
            background-color: #ffecb3 !important;
            font-weight: bold;
        }
        
        td {
            padding: 12px 10px;
            border-bottom: 1px solid #e9ecef;
        }
        
        tr:hover {
            background-color: #f8f9fa;
        }
        
        tr:last-child td {
            font-weight: bold;
            background-color: #e7f3ff;
        }
        
        .summary-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .summary-card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            border-top: 4px solid #28a745;
        }
        
        .summary-card h3 {
            margin: 0 0 10px 0;
            font-size: 0.9em;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .summary-card .value {
            font-size: 2em;
            font-weight: bold;
            color: #28a745;
            margin: 0;
        }
        
        .summary-card .unit {
            font-size: 0.8em;
            color: #666;
        }
        
        .chart-placeholder {
            background: #f8f9fa;
            border: 2px dashed #dee2e6;
            border-radius: 8px;
            padding: 40px;
            text-align: center;
            color: #6c757d;
            margin: 20px 0;
        }
        
        .hourly-section {
            margin-top: 30px;
        }
        
        .month-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 20px;
        }
        
        .month-tab {
            background: #e9ecef;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .month-tab.active {
            background: #667eea;
            color: white;
        }
        
        .month-tab:hover {
            background: #6c757d;
            color: white;
        }
        
        .month-content {
            display: none;
        }
        
        .month-content.active {
            display: block;
        }
        
        .note {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            padding: 15px;
            border-radius: 8px;
            margin: 20px 0;
        }
        
        .note h4 {
            margin: 0 0 10px 0;
            color: #856404;
        }
        
        .legend {
            background: #e8f4fd;
            border: 1px solid #bee5eb;
            padding: 15px;
            border-radius: 8px;
            margin: 20px 0;
        }
        
        .legend h4 {
            margin: 0 0 10px 0;
            color: #0c5460;
        }
        
        .legend-item {
            display: inline-block;
            margin-right: 20px;
            margin-bottom: 5px;
        }
        
        .elevation-info {
            color: #dc3545;
            font-weight: bold;
        }
        
        .azimuth-info {
            color: #fd7e14;
            font-weight: bold;
        }
        
        .bifacial-info {
            color: #198754;
            font-weight: bold;
        }
        
        .footer {
            text-align: center;
            padding: 30px;
            color: #6c757d;
            border-top: 1px solid #e9ecef;
            margin-top: 50px;
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .header h1 {
                font-size: 2em;
            }
            
            .spec-grid {
                grid-template-columns: 1fr;
            }
            
            .summary-cards {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>🌞 Analýza výkonu bifaciálního panelu</h1>
        <p>Hanersun N-TOPCon 700W • Lago Brown, Chile • Astronomická simulace</p>
    </div>
    
    <div class="specs">
        <h2>Specifikace panelu a lokace</h2>
        <div class="spec-grid">
            <div class="spec-card">
                <h3>Panel Hanersun N-TOPCon</h3>
                <div class="spec-item">
                    <span>Výkon:</span>
                    <strong>700 W</strong>
                </div>
                <div class="spec-item">
                    <span>Účinnost:</span>
                    <strong>22.5%</strong>
                </div>
                <div class="spec-item">
                    <span>Bifacialita:</span>
                    <strong>75-85%</strong>
                </div>
                <div class="spec-item">
                    <span>Rozměry:</span>
                    <strong>2384 × 1303 mm</strong>
                </div>
                <div class="spec-item">
                    <span>Hmotnost:</span>
                    <strong>38.7 kg</strong>
                </div>
            </div>
            
            <div class="spec-card">
                <h3>Lokace Lago Brown</h3>
                <div class="spec-item">
                    <span>Zeměpisná šířka:</span>
                    <strong>-47.39°</strong>
                </div>
                <div class="spec-item">
                    <span>Zeměpisná délka:</span>
                    <strong>-72.32°</strong>
                </div>
                <div class="spec-item">
                    <span>Nadmořská výška:</span>
                    <strong>165 m</strong>
                </div>
                <div class="spec-item">
                    <span>Klimatická oblast:</span>
                    <strong>Patagonská Chile</strong>
                </div>
                <div class="spec-item">
                    <span>Albedo terénu:</span>
                    <strong>0.15 (jíl)</strong>
                </div>
            </div>
        </div>
    </div>
    
    <div class="section">
        <h2>📊 Roční souhrn výroby energie</h2>
        <div class="section-content">
            <div class="summary-cards">
)r~   r   r   r   r   r   r   zD
                <div class="summary-card">
                    <h3>z-</h3>
                    <div class="value">zR</div>
                    <div class="unit">kWh/rok</div>
                </div>
u   
            </div>
            
            <div class="chart-placeholder">
                📈 Graf porovnání ročních výnosů by byl zde<br>
                <small>Nejlepší výkon:  (u   kWh/rok)</small>
            </div>
        </div>
    </div>
    
    <div class="section">
        <h2>📅 Měsíční výroba energie</h2>
        <div class="section-content">
            <table>
<thead><tr><th>Month</th><th class='highlight-column'>Vertical North-South</th><th>Vertical East-West</th><th>Tilt 20°</th><th>Tilt 30°</th><th>Tilt 45°</th><th>Tilt 60°</th><th class='highlight-column'>Tilt 70°</th></tr></thead><tbody>)            zhighlight-row z<tr class='z'><td class='z'>z</td>rq   )r~   r   zhighlight-columnz highlight-rowz<td class='z</tr>z<tr><td>ANNUAL TOTAL</td>.1fuw  
            </tbody>
            </table>
            
            <div class="note">
                <h4>💡 Poznámky k měsíční výrobě:</h4>
                <ul>
                    <li>Hodnoty jsou v kWh za měsíc</li>
                    <li>Simulace používá přesné astronomické výpočty pro pozici slunce</li>
                    <li>Počítá s ideálními podmínkami: jasná obloha, bez mraků, bez zastínění</li>
                    <li>Bifaciální efekt je zahrnut ve všech konfiguracích</li>
                    <li>Panely směřují na sever (jižní polokoule)</li>
                </ul>
            </div>
        </div>
    </div>
    
    <div class="section">
        <h2>⏰ Půlhodinová výroba (15. den v měsíci)</h2>
        <div class="section-content">
            <div class="half-hourly-section">
                <div class="month-tabs">r   activez<button class="month-tab z" onclick="showMonth('z')">z	</button>z</div>z<div class="month-content z" id="u   "><h3>Půlhodinová výroba - u    (15. den)</h3><table><thead><tr><th>Time (Elevation/Azimuth)</th><th>Vertical North-South</th><th>Vertical East-West</th><th>Tilt 20°</th><th>Tilt 30°</th><th>Tilt 45°</th><th>Tilt 60°</th><th>Tilt 70°</th></tr></thead><tbody>rs   re   rf   rg   rN   r9   ri   rj   z<tr><td>z"<br>(<span class='elevation-info'>u%   °</span>/<span class='azimuth-info'>z.0fu   °</span>)</td>rk   rm   rn   z<td>z# W<br>(<span class='bifacial-info'>z%</span>)</td>z W</td>u?   <tr><td colspan='8'>Žádná výroba v tomto měsíci</td></tr>z</tbody></table></div>u5
  
            </div>
            
            <div class="legend">
                <h4>🎨 Legenda barevného označení:</h4>
                <div class="legend-item">
                    <span class="elevation-info">9.7°</span> - Elevace slunce (výška nad horizontem)
                </div>
                <div class="legend-item">
                    <span class="azimuth-info">39°</span> - Azimut slunce (směr od severu)
                </div>
                <div class="legend-item">
                    <span class="bifacial-info">7.6%</span> - Bifaciální příspěvek (% ze zadní strany panelu)
                </div>
            </div>
            
            <div class="note">
                <h4>⚡ Poznámky k půlhodinové výrobě:</h4>
                <ul>
                    <li>Hodnoty jsou ve wattech (W) pro každých 30 minut</li>
                    <li>Simulováno pro 15. den každého měsíce</li>
                    <li>Používá přesné astronomické výpočty pozice slunce</li>
                    <li>Půlhodinová data zahrnují bifaciální efekt zadní strany panelu</li>
                    <li>Zobrazeny pouze časy s výrobou energie</li>
                    <li><strong>Elevace:</strong> čím vyšší, tím silnější slunce</li>
                    <li><strong>Azimut:</strong> 0°=sever, 90°=východ, 180°=jih, 270°=západ</li>
                    <li><strong>Bifaciální %:</strong> podíl energie ze zadní strany panelu</li>
                </ul>
            </div>
        </div>
    </div>
    
    <div class="footer">
        <p>Astronomická simulace vytvořena pro panel Hanersun N-TOPCon 700W v lokalitě Lago Brown, Chile<br>
        <small>Datum: 12.08.2025<br>
        Poznámka: Simulace používá přesné astronomické výpočty a předpokládá ideální podmínky - jasná obloha bez mraků</small></p>
    </div>
    
    <script>
        function showMonth(monthName) {
            // Hide all month contents
            const contents = document.querySelectorAll('.month-content');
            contents.forEach(content => content.classList.remove('active'));
            
            // Remove active class from all tabs
            const tabs = document.querySelectorAll('.month-tab');
            tabs.forEach(tab => tab.classList.remove('active'));
            
            // Show selected month content
            document.getElementById(monthName).classList.add('active');
            
            // Add active class to clicked tab
            event.target.classList.add('active');
        }
    </script>
</body>
</html>z1/home/www/claudev.cz/orb3/solar_panel_report.htmlwzutf-8)encodingN)itemssumrt   r?   getint	enumerater   r'   ru   openwrite)#r   r   annual_totalsconfig_nameannual_totalbest_config
best_valuemonths_czechmonths_englishhtml_contentannual_valueconfig_orderr   
month_name	row_classr   value	col_classiactive_classmonth_name_enrs   	all_timesr!   rx   r"   r#   rP   rQ   ry   rm   bifacial_contrib	time_datafr   s#                                     @r   generate_html_reportz,BifacialSolarSimulation.generate_html_report   s    !( 	6 	6KSSSSeArllSSSSSL)5M+&& -]->???";/
[ [ [[ [ [sl K 	 	K}[9::L $  )5   LL 	 u
 ,7u u
 ;>j//u u u 	u" G  G  G1b\\ 	$ 	$E'a0J+0L+@+@bI`)``)``z````L& H H.|<28<a2a2a..gi	 0 0!11II 0 /I Gi G G5 G G GGG#LL 	33" 	O 	OF(0L.48].].]**ceIN)NN|NNNNNLL , 	,0 '|44 	F 	FMAz'(Avv882L  F  F  F_i  F  Fpz  F  F  F  FLL  1b\\ *	5 *	5E%eAg.J*573M',zz88rL  s<  s  sz  s  s  zG  s  s  s  sL  "& V V+26?5+ABT+U (( ID%,,D"2YY G G	 A~'!mq00b'+'>'>tT6'R'R$
H>>"&999V999H$$h
H%EFFF b6? , ,2Hj(   %nx  %n  %n[e  %n  %n  %n  QY  %n  %n  %n  %n  nL". F F !+,()9&)A & &I(0H<<(1'(:3<=T3U 0 %  = ,a//(  -F5  -F  -F  -Faq  -F  -F  -F  -F  FLL(,E5,E,E,E,EELL G+LL,   aa44LL 8 8	t EsU\]]] 	"abGGL!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s   >L!!L%(L%N)r   )rJ   )__name__
__module____qualname__r   r'   r4   rI   rb   r|   r   r   r   r   r   r
   r
      s        " " ""	. 	. 	. 	.  &0# 0# 0#d,1 ,1 ,1 ,1\>" >" >" >"@  *A	" A	" A	" A	" A	"r   r
   c                  6  	 t                      } t          d           t          d           t          d| j        j         d| j        j         d           t          d           t                       t          d           |                                 }i }|                                D ]3\  }	t          	fdt          d	d
          D                       }|||<   4t                       t          d           |                                D ]\  }}t          d| d|dd           | 	                    |           t                       t          d           t          ||j                  }||         }t          d| d|dd           ||fS )NuU   🌞 Spouštím astronomickou simulaci bifaciálního panelu pro Lago Brown, Chile...z&Panel: Hanersun N-TOPCon 700W BifacialzLokace: u   °,    °uA   Konfigurace: Vertikální N-S, Vertikální E-W, Sklony 20°-70°z9Running astronomical simulation for all configurations...c              3   4   K   | ]}|         d          V  dS r   r   r   s     r   r   zmain.<locals>.<genexpr>@  s,      OO4;|4OOOOOOr   rM   rd   u$   📊 Souhrn roční výroby energie:z  z: r   z kWh/roku6   ✅ HTML report byl vytvořen: solar_panel_report.htmlr   u   🎯 Nejlepší konfigurace: r   z	 kWh/rok))r
   r   r   latitude	longituder   r   r   rt   r   r?   r   )

simulationr   r   r   r   r   totalr   r   r   s
            @r   mainr   0  s   (**J	
abbb	
3444	
XZ(1
X
Xz7J7T
X
X
XYYY	
MNNN	GGG 

EFFF''))G M$]]__ 2 2TOOOO%2,,OOOOO%1k""	GGG	
0111&,,.. 2 20600U00001111 ##G,,,	GGG	
BCCC m):;;;K{+J	
R+
R
R
R
R
R
RSSSM!!r   __main__)r)   jsonr   r   astralr   
astral.sunr   r   r   r   r
   r   r   r   r   r   r   r   <module>r      s      ( ( ( ( ( ( ( (       . . . . . . . . . . f" f" f" f" f" f" f" f"P"" "" ""H z!TVVG]]] r   