penjadwalan-ga/resources/views/admin/exports/presentation/sheet4-crossover.blade.php

95 lines
5.8 KiB
PHP

<!DOCTYPE html>
<html>
<head><meta charset="utf-8"></head>
<body>
<table>
<!-- Header Info -->
<tr>
<td colspan="12" style="font-size: 14pt; font-weight: bold; color: #1E293B; height: 30px;">4. SIMULASI OPERATOR CROSSOVER (PINDAH SILANG INDUK A &amp; INDUK B)</td>
</tr>
<tr>
<td colspan="12" style="font-size: 10pt; color: #64748B;">Probabilitas Crossover Pc = 0.8 (80%). Menukarkan segmen gen pada Crossover Split Point = Gen ke-5 untuk membentuk Anak 1 &amp; Anak 2</td>
</tr>
<tr><td colspan="12" style="height: 10px;">&nbsp;</td></tr>
<!-- Induk A & B -->
<tr>
<td colspan="12" style="background-color: #1E293B; color: #FFFFFF; font-weight: bold;">VEKTOR GEN INDUK TERPILIH (BEFORE CROSSOVER)</td>
</tr>
<thead>
<tr>
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 140px;">Induk</th>
@for($i = 1; $i <= 10; $i++)
<th style="background-color: {{ $i <= 5 ? '#1E3A8A' : '#1E293B' }}; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 110px;">
Gen {{ $i }} (K{{ sprintf('%02d', $i) }})<br>
<span style="font-size: 7.5pt; font-weight: normal;">{{ $i <= 5 ? '[Segmen 1]' : '[Segmen 2]' }}</span>
</th>
@endfor
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 100px;">Fitness</th>
</tr>
</thead>
<tbody>
<!-- Parent A -->
<tr>
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #FFF3CD;">Induk A [Ind {{ $sim['parentA']['index'] }}]</td>
@foreach($sim['parentA']['genes'] as $idx => $g)
<td style="text-align: center; border: 1px solid #CBD5E1; font-family: monospace; font-size: 8.5pt; background-color: {{ $idx < 5 ? '#FEF3C7' : '#FFFFFF' }};">
[G{{ $g['guru_id'] }},R{{ $g['ruang_id'] }},S{{ $g['sesi_id'] }},H{{ $g['hari_id'] }}]
</td>
@endforeach
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold;">{{ number_format($sim['parentA']['fitness'], 4) }}</td>
</tr>
<!-- Parent B -->
<tr>
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #D1ECF1;">Induk B [Ind {{ $sim['parentB']['index'] }}]</td>
@foreach($sim['parentB']['genes'] as $idx => $g)
<td style="text-align: center; border: 1px solid #CBD5E1; font-family: monospace; font-size: 8.5pt; background-color: {{ $idx >= 5 ? '#E0F2FE' : '#FFFFFF' }};">
[G{{ $g['guru_id'] }},R{{ $g['ruang_id'] }},S{{ $g['sesi_id'] }},H{{ $g['hari_id'] }}]
</td>
@endforeach
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold;">{{ number_format($sim['parentB']['fitness'], 4) }}</td>
</tr>
</tbody>
<tr><td colspan="12" style="height: 15px;">&nbsp;</td></tr>
<!-- Anak 1 & 2 (Hasil Crossover) -->
<tr>
<td colspan="12" style="background-color: #166534; color: #FFFFFF; font-weight: bold;">VEKTOR GEN ANAK (OFFSPRING HASIL CROSSOVER)</td>
</tr>
<thead>
<tr>
<th style="background-color: #14532D; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 140px;">Anak</th>
@for($i = 1; $i <= 10; $i++)
<th style="background-color: #14532D; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 110px;">
Gen {{ $i }} (K{{ sprintf('%02d', $i) }})
</th>
@endfor
<th style="background-color: #14532D; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 100px;">Sumber Segmen</th>
</tr>
</thead>
<tbody>
<!-- Offspring 1 -->
<tr>
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #DCFCE7;">Anak 1 (Offspring 1)</td>
@foreach($sim['child1Genes'] as $idx => $g)
<td style="text-align: center; border: 1px solid #CBD5E1; font-family: monospace; font-size: 8.5pt; background-color: {{ $idx < 5 ? '#FEF3C7' : '#E0F2FE' }}; font-weight: bold;">
[G{{ $g['guru_id'] }},R{{ $g['ruang_id'] }},S{{ $g['sesi_id'] }},H{{ $g['hari_id'] }}]
</td>
@endforeach
<td style="text-align: center; border: 1px solid #CBD5E1; font-size: 8.5pt;">Seg 1: Induk A | Seg 2: Induk B</td>
</tr>
<!-- Offspring 2 -->
<tr>
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #DCFCE7;">Anak 2 (Offspring 2)</td>
@foreach($sim['child2Genes'] as $idx => $g)
<td style="text-align: center; border: 1px solid #CBD5E1; font-family: monospace; font-size: 8.5pt; background-color: {{ $idx < 5 ? '#E0F2FE' : '#FEF3C7' }}; font-weight: bold;">
[G{{ $g['guru_id'] }},R{{ $g['ruang_id'] }},S{{ $g['sesi_id'] }},H{{ $g['hari_id'] }}]
</td>
@endforeach
<td style="text-align: center; border: 1px solid #CBD5E1; font-size: 8.5pt;">Seg 1: Induk B | Seg 2: Induk A</td>
</tr>
</tbody>
</table>
</body>
</html>