penjadwalan-ga/resources/views/admin/exports/presentation/sheet1-dataset.blade.php

176 lines
11 KiB
PHP

<!DOCTYPE html>
<html>
<head><meta charset="utf-8"></head>
<body>
<table>
<!-- Header Judul Sheet -->
<tr>
<td colspan="8" style="font-size: 14pt; font-weight: bold; color: #1E293B; height: 30px;">1. DATASET SAMPEL (10 KELAS) &amp; PARAMETER ENGINE GA</td>
</tr>
<tr>
<td colspan="8" style="font-size: 10pt; color: #64748B;">Digunakan untuk simulasi visual presentasi alur Algoritma Genetika LKP Robotku</td>
</tr>
<tr><td colspan="8" style="height: 10px;">&nbsp;</td></tr>
<!-- Parameter Engine GA -->
<tr>
<td colspan="3" style="background-color: #1E293B; color: #FFFFFF; font-weight: bold;">PARAMETER ENGINE GA SIMULASI</td>
<td colspan="5" style="background-color: #1E293B; color: #FFFFFF; font-weight: bold;">HARD CONSTRAINTS (B1 s/d B7)</td>
</tr>
<tr>
<td style="font-weight: bold;">Ukuran Populasi (N)</td>
<td style="text-align: center; font-weight: bold;">6 Individu</td>
<td>Populasi 6 Kromosom Gen 0</td>
<td style="font-weight: bold; color: #DC2626;">B1: Bentrok Guru</td>
<td colspan="4">1 Guru max 1 kelas pada slot (Hari, Sesi) sama</td>
</tr>
<tr>
<td style="font-weight: bold;">Crossover Rate (Pc)</td>
<td style="text-align: center; font-weight: bold;">0.8 (80%)</td>
<td>Probabilitas pindah silang induk</td>
<td style="font-weight: bold; color: #DC2626;">B2: Bentrok Ruangan</td>
<td colspan="4">1 Ruang reguler max 1 kelas pada slot sama</td>
</tr>
<tr>
<td style="font-weight: bold;">Mutation Rate (Pm)</td>
<td style="text-align: center; font-weight: bold;">0.1 (10%)</td>
<td>Probabilitas mutasi acak gen</td>
<td style="font-weight: bold; color: #DC2626;">B3: Ketersediaan Guru</td>
<td colspan="4">Guru HARUS diplot pada slot ketersediaannya</td>
</tr>
<tr>
<td style="font-weight: bold;">Tournament Size (k)</td>
<td style="text-align: center; font-weight: bold;">3 Candidates</td>
<td>Kandidat acak per seleksi induk</td>
<td style="font-weight: bold; color: #DC2626;">B4: Bentrok Kelas</td>
<td colspan="4">1 Kelas max 1 sesi pada slot (Hari, Sesi) sama</td>
</tr>
<tr>
<td style="font-weight: bold;">Elitism Count (n)</td>
<td style="text-align: center; font-weight: bold;">2 Best</td>
<td>Individu terbaik langsung lolos</td>
<td style="font-weight: bold; color: #DC2626;">B5: Kualifikasi Level</td>
<td colspan="4">Level Max Guru &ge; Level Program Kelas</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
<td style="font-weight: bold; color: #DC2626;">B6: Sebaran Hari</td>
<td colspan="4">Kelas 2x/minggu berjarak min 2 hari</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
<td style="font-weight: bold; color: #DC2626;">B7: Konsistensi Guru</td>
<td colspan="4">Kelas 2x/minggu diajar pengajar yang sama</td>
</tr>
<tr><td colspan="8" style="height: 15px;">&nbsp;</td></tr>
<!-- Tabel MASTER RESOURCE SISTEM (Hari, Sesi, Ruangan) -->
<tr>
<td colspan="8" style="font-size: 11pt; font-weight: bold; color: #1E293B;">MASTER DATASET RESOURCE SISTEM (HARI, SESI &amp; RUANGAN)</td>
</tr>
<tr>
<td colspan="2" style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center;">Master Hari (5 Hari Kerja)</td>
<td colspan="3" style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center;">Master Sesi Jam (4 Sesi)</td>
<td colspan="3" style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center;">Master Ruangan (Reguler &amp; Ekskul)</td>
</tr>
@php
$maxRows = max(count($sim['hariList']), count($sim['sesiList']), count($sim['ruanganList']));
$hariKeys = array_keys($sim['hariList']);
@endphp
@for($r = 0; $r < $maxRows; $r++)
<tr>
<!-- Hari -->
@if(isset($hariKeys[$r]))
@php $hId = $hariKeys[$r]; $hName = $sim['hariList'][$hId]; @endphp
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #F8FAFC;">H{{ $hId }}</td>
<td style="border: 1px solid #CBD5E1;">{{ $hName }}</td>
@else
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
@endif
<!-- Sesi -->
@if(isset($sim['sesiList'][$r]))
@php $s = $sim['sesiList'][$r]; @endphp
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #F8FAFC;">S{{ $s['id'] }}</td>
<td style="border: 1px solid #CBD5E1; font-weight: bold;">{{ $s['nama'] }}</td>
<td style="border: 1px solid #CBD5E1; color: #475569;">{{ $s['jam'] }}</td>
@else
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
@endif
<!-- Ruangan -->
@if(isset($sim['ruanganList'][$r]))
@php $ru = $sim['ruanganList'][$r]; @endphp
<td style="text-align: center; border: 1px solid #CBD5E1; font-weight: bold; background-color: #F8FAFC;">R{{ $ru['id'] }}</td>
<td style="border: 1px solid #CBD5E1; font-weight: bold;">{{ $ru['nama'] }}</td>
<td style="border: 1px solid #CBD5E1; color: {{ str_contains($ru['tipe'], 'Ekstra') ? '#0C5460' : '#856404' }}; background-color: {{ str_contains($ru['tipe'], 'Ekstra') ? '#D1ECF1' : '#FFF3CD' }}; text-align: center;">{{ $ru['tipe'] }}</td>
@else
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
<td style="border: 1px solid #CBD5E1;">&nbsp;</td>
@endif
</tr>
@endfor
<tr><td colspan="8" style="height: 15px;">&nbsp;</td></tr>
<!-- Tabel 10 Kelas Sampel -->
<tr>
<td colspan="8" style="font-size: 11pt; font-weight: bold; color: #1E293B;">TABEL SAMPEL 10 KELAS (TARGET VARIABEL YANG AKAN DIAKAI &amp; DICARI OLEH GA ENGINE)</td>
</tr>
<thead>
<tr>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 60px;">ID</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 220px;">Nama Kelas Sampel</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 120px;">Tipe Kelas</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 220px;">Penugasan Pengajar (Guru)</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 200px;">Alokasi Ruangan</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 220px;">Alokasi Hari &amp; Sesi Jam</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 60px;">Lvl</th>
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 160px;">Frekuensi Minggu</th>
</tr>
</thead>
<tbody>
@foreach($sim['kelas'] as $k)
<tr>
<td style="text-align: center; border: 1px solid #E2E8F0; font-weight: bold;">K{{ sprintf('%02d', $k['id']) }}</td>
<td style="border: 1px solid #E2E8F0; font-weight: bold; color: #1E293B;">{{ $k['nama'] }}</td>
<td style="text-align: center; border: 1px solid #E2E8F0; background-color: {{ $k['tipe'] == 'Reguler' ? '#FFF3CD' : '#D1ECF1' }}; font-weight: bold; color: {{ $k['tipe'] == 'Reguler' ? '#856404' : '#0C5460' }};">{{ $k['tipe'] }}</td>
<td style="border: 1px solid #E2E8F0; font-weight: bold; color: #D97706; background-color: #FFFBEB;">{{ $k['guru_status'] }}</td>
<td style="border: 1px solid #E2E8F0; font-weight: bold; color: {{ $k['tipe'] == 'Reguler' ? '#D97706' : '#1E293B' }}; background-color: {{ $k['tipe'] == 'Reguler' ? '#FFFBEB' : '#FFFFFF' }};">{{ $k['ruang_info'] }}</td>
<td style="border: 1px solid #E2E8F0; font-weight: bold; color: {{ $k['tipe'] == 'Reguler' ? '#2563EB' : '#059669' }}; background-color: {{ $k['tipe'] == 'Reguler' ? '#EFF6FF' : '#ECFDF5' }};">{{ $k['status_jadwal'] }}</td>
<td style="text-align: center; border: 1px solid #E2E8F0;">Lvl {{ $k['level'] }}</td>
<td style="text-align: center; border: 1px solid #E2E8F0;">{{ $k['freq'] }}</td>
</tr>
@endforeach
</tbody>
<tr><td colspan="8" style="height: 15px;">&nbsp;</td></tr>
<!-- Tabel Ketersediaan Guru B3 -->
<tr>
<td colspan="8" style="font-size: 11pt; font-weight: bold; color: #1E293B;">MATRIKS KETERSEDIAAN GURU (AVAILABILITY SLOTS - B3)</td>
</tr>
<thead>
<tr>
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 60px;">ID</th>
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 220px;">Nama Pengajar</th>
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 100px;">Max Level</th>
<th style="background-color: #334155; color: #FFFFFF; font-weight: bold; text-align: left; border: 1px solid #0F172A; width: 350px;" colspan="5">Deskripsi Hari &amp; Sesi Tersedia</th>
</tr>
</thead>
<tbody>
@foreach($sim['guruList'] as $g)
<tr>
<td style="text-align: center; border: 1px solid #E2E8F0; font-weight: bold;">G{{ $g['id'] }}</td>
<td style="border: 1px solid #E2E8F0; font-weight: bold;">{{ $g['nama'] }}</td>
<td style="text-align: center; border: 1px solid #E2E8F0;">Lvl {{ $g['level_max'] }}</td>
<td style="border: 1px solid #E2E8F0; background-color: #F0FDF4; color: #166534; font-weight: bold;" colspan="5">Tersedia: {{ $g['ketersediaan'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>