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|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
function hitungPOT() {
|
| 91 |
const capex = parseFloat(document.getElementById('capex').value);
|
| 92 |
const oilPrice = parseFloat(document.getElementById('oilPrice').value);
|
|
@@ -94,19 +444,25 @@ function hitungPOT() {
|
|
| 94 |
const serviceYearly = parseFloat(document.getElementById('serviceYearly').value);
|
| 95 |
const taxRate = parseFloat(document.getElementById('taxRate').value) / 100.0;
|
| 96 |
|
| 97 |
-
const qi = parseFloat(document.getElementById('qi').value);
|
| 98 |
-
const decline = parseFloat(document.getElementById('decline').value) / 100.0;
|
| 99 |
const years = parseInt(document.getElementById('years').value, 10);
|
| 100 |
-
const qlim = parseFloat(document.getElementById('qlim').value);
|
| 101 |
|
| 102 |
const tbody = document.querySelector('#resultTable tbody');
|
| 103 |
tbody.innerHTML = '';
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
let cfKumulatif = -capex;
|
| 106 |
-
let potYear = null;
|
| 107 |
let potExact = null;
|
| 108 |
|
| 109 |
-
// Baris tahun 0
|
| 110 |
let row0 = document.createElement('tr');
|
| 111 |
row0.innerHTML = `
|
| 112 |
<td class="left">0</td>
|
|
@@ -114,7 +470,7 @@ function hitungPOT() {
|
|
| 114 |
<td>-</td>
|
| 115 |
<td>0</td>
|
| 116 |
<td>0</td>
|
| 117 |
-
<td>
|
| 118 |
<td>${formatNumber(-capex)}</td>
|
| 119 |
<td>${formatNumber(cfKumulatif)}</td>
|
| 120 |
`;
|
|
@@ -139,6 +495,7 @@ function hitungPOT() {
|
|
| 139 |
let opex = maintDaily * 365.0 + serviceYearly;
|
| 140 |
let netCF = revenueAfterTax - opex;
|
| 141 |
|
|
|
|
| 142 |
cfKumulatif += netCF;
|
| 143 |
|
| 144 |
let row = document.createElement('tr');
|
|
@@ -154,26 +511,35 @@ function hitungPOT() {
|
|
| 154 |
`;
|
| 155 |
tbody.appendChild(row);
|
| 156 |
|
| 157 |
-
|
| 158 |
-
if (potYear === null && cfKumulatif >= 0) {
|
| 159 |
-
let prevCFK = cfKumulatif - netCF;
|
| 160 |
let fraction = (0 - prevCFK) / (cfKumulatif - prevCFK);
|
| 161 |
-
potYear = t;
|
| 162 |
potExact = (t - 1) + fraction;
|
| 163 |
}
|
| 164 |
|
| 165 |
qiYear = qEnd;
|
| 166 |
}
|
| 167 |
|
| 168 |
-
document.getElementById('
|
| 169 |
|
|
|
|
| 170 |
if (potExact !== null) {
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
} else {
|
| 175 |
-
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
}
|
| 178 |
}
|
| 179 |
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<title>Kalkulator Pay Out Time Sumur Minyak</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 7 |
<style>
|
| 8 |
+
:root {
|
| 9 |
+
--bg-color: #f4f6f8;
|
| 10 |
+
--card-bg: #ffffff;
|
| 11 |
+
--primary: #1f4f7b;
|
| 12 |
+
--primary-soft: #e5edf7;
|
| 13 |
+
--border-color: #d0d7e2;
|
| 14 |
+
--text-main: #1f2933;
|
| 15 |
+
--text-muted: #6b7280;
|
| 16 |
+
--accent: #0f766e;
|
| 17 |
+
--danger: #b91c1c;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
* {
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
body {
|
| 25 |
+
margin: 0;
|
| 26 |
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 27 |
+
background: radial-gradient(circle at top left, #e5edf7, #f4f6f8);
|
| 28 |
+
color: var(--text-main);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.page {
|
| 32 |
+
max-width: 1200px;
|
| 33 |
+
margin: 0 auto;
|
| 34 |
+
padding: 24px 16px 40px;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.header {
|
| 38 |
+
display: flex;
|
| 39 |
+
flex-wrap: wrap;
|
| 40 |
+
justify-content: space-between;
|
| 41 |
+
align-items: center;
|
| 42 |
+
margin-bottom: 20px;
|
| 43 |
+
gap: 12px;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.title-block h1 {
|
| 47 |
+
margin: 0;
|
| 48 |
+
font-size: 24px;
|
| 49 |
+
color: var(--primary);
|
| 50 |
+
letter-spacing: 0.03em;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.title-block p {
|
| 54 |
+
margin: 4px 0 0;
|
| 55 |
+
font-size: 13px;
|
| 56 |
+
color: var(--text-muted);
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.badge {
|
| 60 |
+
padding: 4px 10px;
|
| 61 |
+
border-radius: 999px;
|
| 62 |
+
font-size: 11px;
|
| 63 |
+
background: var(--primary-soft);
|
| 64 |
+
color: var(--primary);
|
| 65 |
+
border: 1px solid var(--border-color);
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.layout {
|
| 69 |
+
display: grid;
|
| 70 |
+
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
|
| 71 |
+
gap: 20px;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
@media (max-width: 900px) {
|
| 75 |
+
.layout {
|
| 76 |
+
grid-template-columns: 1fr;
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.card {
|
| 81 |
+
background: var(--card-bg);
|
| 82 |
+
border-radius: 10px;
|
| 83 |
+
padding: 16px 18px 18px;
|
| 84 |
+
box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
|
| 85 |
+
border: 1px solid rgba(148, 163, 184, 0.35);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.card-header {
|
| 89 |
+
display: flex;
|
| 90 |
+
justify-content: space-between;
|
| 91 |
+
align-items: center;
|
| 92 |
+
margin-bottom: 10px;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.card-header h2 {
|
| 96 |
+
margin: 0;
|
| 97 |
+
font-size: 16px;
|
| 98 |
+
color: var(--primary);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.card-header span {
|
| 102 |
+
font-size: 11px;
|
| 103 |
+
color: var(--text-muted);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.note {
|
| 107 |
+
font-size: 12px;
|
| 108 |
+
background: #f9fafb;
|
| 109 |
+
border-radius: 8px;
|
| 110 |
+
padding: 10px 10px 10px 12px;
|
| 111 |
+
border: 1px dashed var(--border-color);
|
| 112 |
+
margin-bottom: 10px;
|
| 113 |
+
color: var(--text-muted);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.note b {
|
| 117 |
+
color: var(--text-main);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
fieldset {
|
| 121 |
+
border: 1px solid var(--border-color);
|
| 122 |
+
border-radius: 8px;
|
| 123 |
+
padding: 10px 12px 12px;
|
| 124 |
+
margin: 0 0 10px;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
legend {
|
| 128 |
+
padding: 0 6px;
|
| 129 |
+
font-size: 12px;
|
| 130 |
+
color: var(--text-muted);
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
label {
|
| 134 |
+
display: flex;
|
| 135 |
+
flex-direction: column;
|
| 136 |
+
margin-top: 6px;
|
| 137 |
+
font-size: 12px;
|
| 138 |
+
color: var(--text-main);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
label span {
|
| 142 |
+
margin-bottom: 2px;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
input[type="number"] {
|
| 146 |
+
padding: 6px 8px;
|
| 147 |
+
border-radius: 6px;
|
| 148 |
+
border: 1px solid var(--border-color);
|
| 149 |
+
font-size: 13px;
|
| 150 |
+
outline: none;
|
| 151 |
+
transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
input[type="number"]:focus {
|
| 155 |
+
border-color: var(--primary);
|
| 156 |
+
box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
|
| 157 |
+
background: #f9fafb;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
button {
|
| 161 |
+
margin-top: 8px;
|
| 162 |
+
padding: 7px 14px;
|
| 163 |
+
border-radius: 999px;
|
| 164 |
+
border: none;
|
| 165 |
+
font-size: 13px;
|
| 166 |
+
font-weight: 500;
|
| 167 |
+
background: linear-gradient(135deg, var(--primary), #2563eb);
|
| 168 |
+
color: #ffffff;
|
| 169 |
+
cursor: pointer;
|
| 170 |
+
box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
|
| 171 |
+
transition: transform 0.1s, box-shadow 0.1s, filter 0.1s;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
button:hover {
|
| 175 |
+
filter: brightness(1.03);
|
| 176 |
+
transform: translateY(-1px);
|
| 177 |
+
box-shadow: 0 10px 22px rgba(37, 99, 235, 0.4);
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
button:active {
|
| 181 |
+
transform: translateY(0);
|
| 182 |
+
box-shadow: 0 5px 10px rgba(37, 99, 235, 0.25);
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.result-main {
|
| 186 |
+
font-size: 14px;
|
| 187 |
+
margin-bottom: 4px;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.result-main.success {
|
| 191 |
+
color: var(--accent);
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
.result-main.warning {
|
| 195 |
+
color: var(--danger);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
.result-sub {
|
| 199 |
+
font-size: 12px;
|
| 200 |
+
color: var(--text-muted);
|
| 201 |
+
margin-bottom: 6px;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.pill-row {
|
| 205 |
+
display: flex;
|
| 206 |
+
flex-wrap: wrap;
|
| 207 |
+
gap: 6px;
|
| 208 |
+
margin-bottom: 2px;
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.pill {
|
| 212 |
+
font-size: 11px;
|
| 213 |
+
padding: 4px 8px;
|
| 214 |
+
border-radius: 999px;
|
| 215 |
+
background: #f3f4f6;
|
| 216 |
+
color: var(--text-muted);
|
| 217 |
+
border: 1px solid #e5e7eb;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
table {
|
| 221 |
+
border-collapse: collapse;
|
| 222 |
+
width: 100%;
|
| 223 |
+
margin-top: 10px;
|
| 224 |
+
font-size: 11px;
|
| 225 |
+
table-layout: fixed;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
th, td {
|
| 229 |
+
border: 1px solid #e5e7eb;
|
| 230 |
+
padding: 4px 5px;
|
| 231 |
+
text-align: right;
|
| 232 |
+
white-space: nowrap;
|
| 233 |
+
overflow: hidden;
|
| 234 |
+
text-overflow: ellipsis;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
th {
|
| 238 |
+
background: #f3f4f6;
|
| 239 |
+
font-weight: 600;
|
| 240 |
+
color: #4b5563;
|
| 241 |
+
position: sticky;
|
| 242 |
+
top: 0;
|
| 243 |
+
z-index: 1;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
td.left, th.left {
|
| 247 |
+
text-align: left;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
.table-wrapper {
|
| 251 |
+
max-height: 420px;
|
| 252 |
+
overflow: auto;
|
| 253 |
+
border-radius: 8px;
|
| 254 |
+
border: 1px solid #e5e7eb;
|
| 255 |
+
margin-top: 8px;
|
| 256 |
+
background: #ffffff;
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.footer-note {
|
| 260 |
+
margin-top: 6px;
|
| 261 |
+
font-size: 11px;
|
| 262 |
+
color: var(--text-muted);
|
| 263 |
+
}
|
| 264 |
</style>
|
| 265 |
</head>
|
| 266 |
<body>
|
| 267 |
|
| 268 |
+
<div class="page">
|
| 269 |
+
<div class="header">
|
| 270 |
+
<div class="title-block">
|
| 271 |
+
<h1>Pay Out Time Analyzer</h1>
|
| 272 |
+
<p>Simulasi keekonomian sumur minyak berbasis decline curve & cash flow tahunan.</p>
|
| 273 |
+
</div>
|
| 274 |
+
<div class="badge">Oil & Gas • Investment Tool</div>
|
| 275 |
+
</div>
|
| 276 |
+
|
| 277 |
+
<div class="layout">
|
| 278 |
+
<!-- PANEL INPUT -->
|
| 279 |
+
<div class="card">
|
| 280 |
+
<div class="card-header">
|
| 281 |
+
<h2>Input Parameter</h2>
|
| 282 |
+
<span>Step 1 · Isi data</span>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<div class="note">
|
| 286 |
+
<b>Cara penggunaan singkat</b><br>
|
| 287 |
+
Isi parameter investasi, biaya operasi, dan data produksi di bawah, lalu tekan tombol
|
| 288 |
+
<b>Hitung POT</b>. Sistem akan menghitung revenue, cash flow, dan tahun tercapainya pay out time.
|
| 289 |
+
</div>
|
| 290 |
+
|
| 291 |
+
<form id="potForm" onsubmit="event.preventDefault(); hitungPOT();">
|
| 292 |
+
<fieldset>
|
| 293 |
+
<legend>Investasi & Ekonomi</legend>
|
| 294 |
+
|
| 295 |
+
<label>
|
| 296 |
+
<span>Investasi awal (Capex) [USD]</span>
|
| 297 |
+
<input type="number" id="capex" value="2000000" step="1000" min="0" required>
|
| 298 |
+
</label>
|
| 299 |
+
|
| 300 |
+
<label>
|
| 301 |
+
<span>Harga minyak [USD/bbl]</span>
|
| 302 |
+
<input type="number" id="oilPrice" value="70" step="0.1" min="0" required>
|
| 303 |
+
</label>
|
| 304 |
+
|
| 305 |
+
<label>
|
| 306 |
+
<span>Biaya maintenance harian [USD/hari]</span>
|
| 307 |
+
<input type="number" id="maintDaily" value="800" step="1" min="0" required>
|
| 308 |
+
</label>
|
| 309 |
+
|
| 310 |
+
<label>
|
| 311 |
+
<span>Biaya service tahunan [USD/tahun]</span>
|
| 312 |
+
<input type="number" id="serviceYearly" value="50000" step="1000" min="0" required>
|
| 313 |
+
</label>
|
| 314 |
+
|
| 315 |
+
<label>
|
| 316 |
+
<span>Pajak + royalty (% dari revenue)</span>
|
| 317 |
+
<input type="number" id="taxRate" value="20" step="1" min="0" max="100" required>
|
| 318 |
+
</label>
|
| 319 |
+
</fieldset>
|
| 320 |
+
|
| 321 |
+
<fieldset>
|
| 322 |
+
<legend>Produksi & Decline</legend>
|
| 323 |
+
|
| 324 |
+
<label>
|
| 325 |
+
<span>Produksi awal tahun pertama [bbl/hari]</span>
|
| 326 |
+
<input type="number" id="qi" value="800" step="1" min="0" required>
|
| 327 |
+
</label>
|
| 328 |
+
|
| 329 |
+
<label>
|
| 330 |
+
<span>Decline rate tahunan (exponential) [%/tahun]</span>
|
| 331 |
+
<input type="number" id="decline" value="15" step="0.1" min="0" max="100" required>
|
| 332 |
+
</label>
|
| 333 |
+
|
| 334 |
+
<label>
|
| 335 |
+
<span>Jumlah tahun simulasi (maksimum)</span>
|
| 336 |
+
<input type="number" id="years" value="15" step="1" min="1" required>
|
| 337 |
+
</label>
|
| 338 |
+
|
| 339 |
+
<label>
|
| 340 |
+
<span>Batas economic limit produksi [bbl/hari]</span>
|
| 341 |
+
<input type="number" id="qlim" value="50" step="1" min="0" required>
|
| 342 |
+
</label>
|
| 343 |
+
</fieldset>
|
| 344 |
+
|
| 345 |
+
<button type="submit">Hitung POT</button>
|
| 346 |
+
</form>
|
| 347 |
+
|
| 348 |
+
<div class="footer-note">
|
| 349 |
+
Catatan: Model ini menggunakan decline exponential tahunan dan pendekatan laju rata-rata
|
| 350 |
+
untuk estimasi produksi tahunan.
|
| 351 |
+
</div>
|
| 352 |
+
</div>
|
| 353 |
+
|
| 354 |
+
<!-- PANEL HASIL -->
|
| 355 |
+
<div class="card">
|
| 356 |
+
<div class="card-header">
|
| 357 |
+
<h2>Hasil Perhitungan</h2>
|
| 358 |
+
<span>Step 2 · Interpretasi</span>
|
| 359 |
+
</div>
|
| 360 |
+
|
| 361 |
+
<div id="resultSummary">
|
| 362 |
+
<div class="result-main warning">
|
| 363 |
+
Belum ada perhitungan. Isi parameter di kiri lalu tekan Hitung POT.
|
| 364 |
+
</div>
|
| 365 |
+
<div class="result-sub">
|
| 366 |
+
Sistem akan menampilkan estimasi waktu balik modal (pay out time) dan tabel cash flow tahunan.
|
| 367 |
+
</div>
|
| 368 |
+
</div>
|
| 369 |
+
|
| 370 |
+
<div class="pill-row">
|
| 371 |
+
<div class="pill" id="pillCapex">Capex: -</div>
|
| 372 |
+
<div class="pill" id="pillPrice">Harga Minyak: -</div>
|
| 373 |
+
<div class="pill" id="pillQi">q<sub>i</sub> awal: -</div>
|
| 374 |
+
<div class="pill" id="pillDecline">Decline: -</div>
|
| 375 |
+
<div class="pill" id="pillYears">Horizon: -</div>
|
| 376 |
+
</div>
|
| 377 |
+
|
| 378 |
+
<div class="table-wrapper" id="tableWrapper" style="display:none;">
|
| 379 |
+
<table id="resultTable">
|
| 380 |
+
<thead>
|
| 381 |
+
<tr>
|
| 382 |
+
<th class="left">Tahun</th>
|
| 383 |
+
<th>q awal (bbl/h)</th>
|
| 384 |
+
<th>q akhir (bbl/h)</th>
|
| 385 |
+
<th>Q tahunan (bbl)</th>
|
| 386 |
+
<th>Revenue (USD)</th>
|
| 387 |
+
<th>Opex (USD)</th>
|
| 388 |
+
<th>Net CF (USD)</th>
|
| 389 |
+
<th>CF Kumulatif (USD)</th>
|
| 390 |
+
</tr>
|
| 391 |
+
</thead>
|
| 392 |
+
<tbody></tbody>
|
| 393 |
+
</table>
|
| 394 |
+
</div>
|
| 395 |
+
|
| 396 |
+
<div class="footer-note">
|
| 397 |
+
Interpretasi umum:
|
| 398 |
+
jika cash flow kumulatif berubah dari negatif menjadi positif, titik tersebut
|
| 399 |
+
adalah waktu tercapainya pay out time (POT).
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
</div>
|
| 403 |
+
</div>
|
| 404 |
|
| 405 |
<script>
|
| 406 |
+
/*
|
| 407 |
+
RINGKASAN LOGIKA PERHITUNGAN
|
| 408 |
+
|
| 409 |
+
1. Decline exponential:
|
| 410 |
+
q(t) = q_i * e^(-D * t) (D dalam satuan per tahun, desimal).
|
| 411 |
+
|
| 412 |
+
2. Untuk tiap tahun t:
|
| 413 |
+
- q_start = laju awal tahun (bbl/hari)
|
| 414 |
+
- q_end = q_start * e^(-D)
|
| 415 |
+
- q_avg = (q_start + q_end) / 2
|
| 416 |
+
- jika q_avg < q_limit → produksi = 0 (sumur dianggap tidak ekonomis).
|
| 417 |
+
|
| 418 |
+
Produksi tahunan:
|
| 419 |
+
Q_year = q_avg * 365
|
| 420 |
+
|
| 421 |
+
3. Revenue & biaya:
|
| 422 |
+
- Revenue kotor = Q_year * harga_minyak
|
| 423 |
+
- Revenue setelah pajak/royalty:
|
| 424 |
+
Rev_after_tax = Revenue * (1 - taxRate)
|
| 425 |
+
- Opex = maintDaily * 365 + serviceYearly
|
| 426 |
+
- NetCF = Rev_after_tax - Opex
|
| 427 |
+
|
| 428 |
+
4. Cash flow kumulatif:
|
| 429 |
+
- Tahun 0: CF_0 = -Capex
|
| 430 |
+
- Tahun t: CF_t = NetCF_t
|
| 431 |
+
CFK_t = CFK_(t-1) + CF_t
|
| 432 |
+
|
| 433 |
+
5. Pay Out Time:
|
| 434 |
+
- Cari t di mana CFK berubah dari negatif ke positif.
|
| 435 |
+
- Interpolasi linier:
|
| 436 |
+
fraction = (0 - CFK_(t-1)) / (CFK_t - CFK_(t-1))
|
| 437 |
+
POT_exact = (t - 1) + fraction (tahun sejak mulai produksi).
|
| 438 |
+
*/
|
| 439 |
+
|
| 440 |
function hitungPOT() {
|
| 441 |
const capex = parseFloat(document.getElementById('capex').value);
|
| 442 |
const oilPrice = parseFloat(document.getElementById('oilPrice').value);
|
|
|
|
| 444 |
const serviceYearly = parseFloat(document.getElementById('serviceYearly').value);
|
| 445 |
const taxRate = parseFloat(document.getElementById('taxRate').value) / 100.0;
|
| 446 |
|
| 447 |
+
const qi = parseFloat(document.getElementById('qi').value);
|
| 448 |
+
const decline = parseFloat(document.getElementById('decline').value) / 100.0;
|
| 449 |
const years = parseInt(document.getElementById('years').value, 10);
|
| 450 |
+
const qlim = parseFloat(document.getElementById('qlim').value);
|
| 451 |
|
| 452 |
const tbody = document.querySelector('#resultTable tbody');
|
| 453 |
tbody.innerHTML = '';
|
| 454 |
|
| 455 |
+
// Update pill info
|
| 456 |
+
document.getElementById('pillCapex').textContent = 'Capex: ' + formatNumber(capex) + ' USD';
|
| 457 |
+
document.getElementById('pillPrice').textContent = 'Harga Minyak: ' + formatNumber(oilPrice) + ' USD/bbl';
|
| 458 |
+
document.getElementById('pillQi').textContent = 'qᵢ awal: ' + formatNumber(qi) + ' bbl/hari';
|
| 459 |
+
document.getElementById('pillDecline').textContent = 'Decline: ' + (decline * 100).toFixed(1) + ' %/tahun';
|
| 460 |
+
document.getElementById('pillYears').textContent = 'Horizon: ' + years + ' tahun';
|
| 461 |
+
|
| 462 |
let cfKumulatif = -capex;
|
|
|
|
| 463 |
let potExact = null;
|
| 464 |
|
| 465 |
+
// Baris tahun 0
|
| 466 |
let row0 = document.createElement('tr');
|
| 467 |
row0.innerHTML = `
|
| 468 |
<td class="left">0</td>
|
|
|
|
| 470 |
<td>-</td>
|
| 471 |
<td>0</td>
|
| 472 |
<td>0</td>
|
| 473 |
+
<td>0</td>
|
| 474 |
<td>${formatNumber(-capex)}</td>
|
| 475 |
<td>${formatNumber(cfKumulatif)}</td>
|
| 476 |
`;
|
|
|
|
| 495 |
let opex = maintDaily * 365.0 + serviceYearly;
|
| 496 |
let netCF = revenueAfterTax - opex;
|
| 497 |
|
| 498 |
+
let prevCFK = cfKumulatif;
|
| 499 |
cfKumulatif += netCF;
|
| 500 |
|
| 501 |
let row = document.createElement('tr');
|
|
|
|
| 511 |
`;
|
| 512 |
tbody.appendChild(row);
|
| 513 |
|
| 514 |
+
if (potExact === null && prevCFK < 0 && cfKumulatif >= 0) {
|
|
|
|
|
|
|
| 515 |
let fraction = (0 - prevCFK) / (cfKumulatif - prevCFK);
|
|
|
|
| 516 |
potExact = (t - 1) + fraction;
|
| 517 |
}
|
| 518 |
|
| 519 |
qiYear = qEnd;
|
| 520 |
}
|
| 521 |
|
| 522 |
+
document.getElementById('tableWrapper').style.display = 'block';
|
| 523 |
|
| 524 |
+
const summaryDiv = document.getElementById('resultSummary');
|
| 525 |
if (potExact !== null) {
|
| 526 |
+
summaryDiv.innerHTML = `
|
| 527 |
+
<div class="result-main success">
|
| 528 |
+
Pay Out Time tercapai sekitar tahun ke-${potExact.toFixed(2)} (± ${potExact.toFixed(2)} tahun sejak mulai produksi).
|
| 529 |
+
</div>
|
| 530 |
+
<div class="result-sub">
|
| 531 |
+
Cash flow kumulatif menjadi positif sebelum atau pada tahun simulasi terakhir. Nilai POT dihitung dengan interpolasi linier antar tahun.
|
| 532 |
+
</div>
|
| 533 |
+
`;
|
| 534 |
} else {
|
| 535 |
+
summaryDiv.innerHTML = `
|
| 536 |
+
<div class="result-main warning">
|
| 537 |
+
Pay Out Time belum tercapai dalam horizon ${years} tahun simulasi.
|
| 538 |
+
</div>
|
| 539 |
+
<div class="result-sub">
|
| 540 |
+
Cash flow kumulatif tetap negatif. Pertimbangkan optimasi biaya, peningkatan produksi, atau perpanjangan horizon simulasi untuk evaluasi lebih lanjut.
|
| 541 |
+
</div>
|
| 542 |
+
`;
|
| 543 |
}
|
| 544 |
}
|
| 545 |
|