-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecision.html
More file actions
398 lines (356 loc) · 31.6 KB
/
Copy pathdecision.html
File metadata and controls
398 lines (356 loc) · 31.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en" class="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Decision Matrix Calculator | STEMKit</title>
<meta name="title" content="Decision Matrix Calculator | STEMKit">
<meta name="description" content="Calculate the mathematically optimal choice for any complex decision using a Weighted Decision Matrix. Remove emotion and analyze options securely in your browser.">
<meta name="keywords" content="decision matrix, weighted decision, optimal choice calculator, pro and con alternative, decision making tool">
<link rel="canonical" href="https://stemkit.net/decision.html">
<meta property="og:url" content="https://stemkit.net/decision.html">
<meta property="twitter:url" content="https://stemkit.net/decision.html">
<meta property="og:title" content="Decision Matrix Calculator | STEMKit">
<meta property="twitter:title" content="Decision Matrix Calculator | STEMKit">
<meta property="og:description" content="Calculate the mathematically optimal choice for any complex decision.">
<meta property="twitter:description" content="Calculate the mathematically optimal choice for any complex decision.">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "STEMKit Decision Matrix",
"url": "https://stemkit.net/decision.html",
"description": "Calculate the mathematically optimal choice using a Weighted Decision Matrix.",
"author": { "@type": "Person", "name": "Olanrewaju M. Daramola" },
"applicationCategory": "UtilityApplication",
"operatingSystem": "All",
"browserRequirements": "Requires JavaScript",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"featureList": [ "Weighted Criteria Calculation", "Dynamic Matrix Generation", "100% Client-Side" ]
}
</script>
<meta name="author" content="Olanrewaju M. Daramola">
<meta name="theme-color" content="#4f46e5">
<meta property="og:type" content="website">
<meta property="og:image" content="https://stemkit.net/assets/og-image.webp">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:image" content="https://stemkit.net/assets/og-image.webp">
<link rel="icon" type="image/x-icon" href="https://stemkit.net/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="https://stemkit.net/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://stemkit.net/assets/favicon-16x16.png">
<link rel="apple-touch-icon" href="https://stemkit.net/assets/apple-touch-icon.png">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/all.min.css">
<style>
.tool-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.tool-card:hover { transform: translateY(-6px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.dark .tool-card:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
.hero-bg { background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%); }
.dark .hero-bg { background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%); }
</style>
<style>
/* STEMKit docs / how-to / FAQ | self-contained styles */
.stk-section { padding: 3rem 0; border-top: 1px solid rgba(148,163,184,.2); }
.stk-wrap { max-width: 80rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.stk-chip { display:inline-flex; align-items:center; gap:.45rem; font-size:.68rem; font-weight:800;
text-transform:uppercase; letter-spacing:.12em; padding:.3rem .7rem; border-radius:9999px;
background:#eef2ff; color:#4338ca; border:1px solid #e0e7ff; }
.dark .stk-chip { background:rgba(67,56,202,.18); color:#a5b4fc; border-color:rgba(99,102,241,.3); }
.stk-h2 { font-size:1.6rem; font-weight:800; letter-spacing:-.02em; margin:.75rem 0 .5rem; }
.stk-lead { max-width:48rem; color:#64748b; line-height:1.6; }
.dark .stk-lead { color:#94a3b8; }
.stk-grid { display:grid; gap:1rem; grid-template-columns:1fr; margin-top:1.5rem; }
@media (min-width:768px){ .stk-grid-3{grid-template-columns:repeat(3,1fr);} .stk-grid-2{grid-template-columns:repeat(2,1fr);} }
.stk-card { border-radius:1rem; border:1px solid rgba(148,163,184,.25); padding:1.4rem; background:#fff; }
.dark .stk-card { background:#0f172a; border-color:rgba(51,65,85,.8); }
.stk-step { display:flex; gap:.85rem; align-items:flex-start; }
.stk-num { width:2rem; height:2rem; border-radius:9999px; display:inline-flex; align-items:center;
justify-content:center; font-weight:800; font-size:.85rem; flex-shrink:0;
background:#4f46e5; color:#fff; }
.stk-step h3 { font-weight:700; font-size:.95rem; margin-bottom:.15rem; }
.stk-step p { font-size:.85rem; color:#64748b; line-height:1.5; }
.dark .stk-step p { color:#94a3b8; }
.stk-note { display:flex; gap:.6rem; align-items:flex-start; font-size:.82rem; line-height:1.55;
background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:.75rem; padding:.9rem 1rem; }
.dark .stk-note { background:rgba(120,53,15,.15); border-color:rgba(180,83,9,.4); color:#fcd34d; }
.stk-faq { border-bottom:1px solid rgba(148,163,184,.22); }
.stk-faq > summary { list-style:none; cursor:pointer; padding:1rem 0; font-weight:600; font-size:.95rem;
display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.stk-faq > summary::-webkit-details-marker { display:none; }
.stk-faq > summary::after { content:"+"; font-weight:700; color:#6366f1; font-size:1.2rem; line-height:1; }
.stk-faq[open] > summary::after { content:"\2212"; }
.stk-faq > div { padding:0 0 1.1rem; font-size:.88rem; line-height:1.6; color:#475569; }
.dark .stk-faq > div { color:#94a3b8; }
.stk-refs { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1rem; }
.stk-refs a { display:inline-flex; align-items:center; gap:.4rem; font-size:.82rem; font-weight:600;
color:#4f46e5; text-decoration:none; border:1px solid #e0e7ff; background:#eef2ff;
padding:.4rem .8rem; border-radius:.6rem; }
.dark .stk-refs a { color:#a5b4fc; background:rgba(67,56,202,.15); border-color:rgba(99,102,241,.3); }
.stk-refs a:hover { text-decoration:underline; }
.stk-byline { font-size:.8rem; color:#94a3b8; margin-top:.35rem; }
.stk-credit { margin-top:2rem; font-size:.8rem; color:#94a3b8; }
/* Method & equations (MathML) */
.stk-math { overflow-x:auto; padding:1rem 1.1rem; margin:.6rem 0 1rem; border:1px solid rgba(148,163,184,.25);
border-radius:.75rem; background:#f8fafc; font-size:1.15rem; }
.dark .stk-math { background:#0f172a; }
.stk-math math { color:inherit; }
.stk-eqn-label { font-size:.9rem; font-weight:600; color:#475569; margin-top:1.1rem; }
.dark .stk-eqn-label { color:#cbd5e1; }
.stk-where { font-size:.85rem; color:#64748b; line-height:1.75; margin-top:.5rem; }
.dark .stk-where { color:#94a3b8; }
.stk-model-list { list-style:none; padding:0; margin:.6rem 0 0; display:grid; gap:.55rem; }
.stk-model-list li { font-size:.92rem; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.stk-model-list b { min-width:9rem; color:#475569; font-weight:600; }
.dark .stk-model-list b { color:#cbd5e1; }
.stk-refs-h { font-weight:700; font-size:1rem; margin-top:1.9rem; margin-bottom:.5rem; }
.stk-refs-list { font-size:.82rem; color:#64748b; line-height:1.75; padding-left:1.2rem; }
.dark .stk-refs-list { color:#94a3b8; }
.stk-refs-list li { margin-bottom:.45rem; }
.stk-refs-list a { color:#4f46e5; text-decoration:none; }
.dark .stk-refs-list a { color:#a5b4fc; }
.stk-refs-list a:hover { text-decoration:underline; }
</style>
<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "HowTo", "name": "How to use the Weighted Decision Matrix", "totalTime": "PT2M", "step": [{"@type": "HowToStep", "position": 1, "name": "List your options", "text": "Enter the choices you are deciding between (e.g. Job A, Job B, Job C) in the Options box, separated by commas."}, {"@type": "HowToStep", "position": 2, "name": "List your criteria", "text": "Enter the factors that matter (e.g. Salary, Growth, Commute). Click Build Matrix to generate the grid."}, {"@type": "HowToStep", "position": 3, "name": "Weight and score", "text": "Give each criterion a weight (1–5) for how much it matters, then score every option on each criterion (1–10)."}, {"@type": "HowToStep", "position": 4, "name": "Calculate", "text": "Click Calculate Optimal Choice to see a ranked result with each option’s percentage of the maximum possible score."}]}
</script>
<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Is my data uploaded anywhere?", "acceptedAnswer": {"@type": "Answer", "text": "No. Everything runs in your browser; nothing you type is sent to a server."}}, {"@type": "Question", "name": "What method is this based on?", "acceptedAnswer": {"@type": "Answer", "text": "The Simple Additive Weighting (SAW) / Weighted Sum Model, a standard multi-criteria decision analysis (MCDA) technique."}}, {"@type": "Question", "name": "How should I choose weights?", "acceptedAnswer": {"@type": "Answer", "text": "Weights express relative importance. A criterion weighted 4 counts twice as much as one weighted 2. Only the ratios matter."}}, {"@type": "Question", "name": "What happens with a tie?", "acceptedAnswer": {"@type": "Answer", "text": "If two or more options share the top weighted total, they are all shown as tied top choices."}}, {"@type": "Question", "name": "Can I handle “lower is better” criteria?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, invert them when scoring, so the most favourable option (lowest cost, shortest commute) gets the highest score."}}]}
</script>
<link rel="stylesheet" href="src/home.css">
<link rel="stylesheet" href="src/output.css">
</head>
<body class="bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 min-h-screen flex flex-col transition-colors duration-300">
<nav class="sticky top-0 z-50 w-full bg-white/80 dark:bg-slate-950/80 backdrop-blur-md border-b border-slate-200 dark:border-slate-800 transition-colors duration-300">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16 sm:h-20">
<a href="index.html" class="flex items-center gap-2 hover:opacity-80 transition-opacity">
<div class="bg-indigo-600 text-white p-2 sm:p-2.5 rounded-lg shadow-sm flex items-center justify-center">
<i class="fa-solid fa-flask text-lg sm:text-xl"></i>
</div>
<span class="text-xl sm:text-2xl font-black tracking-tighter text-slate-900 dark:text-white">STEMKit</span>
</a>
<div class="hidden md:flex items-center gap-6 text-sm font-semibold text-slate-600 dark:text-slate-300">
<a href="index.html#data-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Data</a>
<a href="index.html#comp-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Compute</a>
<a href="index.html#pub-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Writing & Citations</a>
<a href="index.html#focus-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Focus</a>
<div class="h-5 w-px bg-slate-200 dark:bg-slate-700"></div>
<button class="themeToggle p-2 rounded-full hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors" aria-label="Toggle dark mode">
<i class="fa-solid fa-moon dark:hidden text-lg"></i>
<i class="fa-solid fa-sun hidden dark:block text-yellow-400 text-lg"></i>
</button>
<a href="plot-digitizer.html" class="bg-indigo-600 hover:bg-indigo-700 text-white px-5 py-2.5 rounded-full text-sm font-bold transition-all shadow-md hover:shadow-lg">
<i class="fa-solid fa-crosshairs mr-1"></i> Plot Digitizer
</a>
</div>
<div class="flex items-center gap-2 md:hidden">
<button class="themeToggle p-2 rounded-full hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors text-slate-600 dark:text-slate-300">
<i class="fa-solid fa-moon dark:hidden text-lg"></i>
<i class="fa-solid fa-sun hidden dark:block text-yellow-400 text-lg"></i>
</button>
<button id="mobile-menu-btn" class="text-slate-600 dark:text-slate-300 hover:text-indigo-600 p-2 focus:outline-none">
<i class="fa-solid fa-bars text-2xl" id="menu-icon"></i>
</button>
</div>
</div>
</div>
<div id="mobile-menu" class="hidden md:hidden bg-white/95 dark:bg-slate-900/95 backdrop-blur-md border-b border-slate-200 dark:border-slate-800 absolute w-full shadow-xl">
<div class="px-4 pt-2 pb-6 space-y-2 text-base font-semibold text-slate-600 dark:text-slate-300">
<a href="index.html#data-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Data & Stats</a>
<a href="index.html#comp-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Compute</a>
<a href="index.html#pub-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Writing & Citations</a>
<a href="index.html#focus-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Focus & Flow</a>
<div class="pt-4 mt-2 border-t border-slate-100 dark:border-slate-800">
<a href="plot-digitizer.html" class="block text-center bg-indigo-600 hover:bg-indigo-700 text-white py-3 rounded-xl shadow-md transition-colors">Digitizer Pro</a>
</div>
</div>
</div>
</nav>
<main class="max-w-6xl mx-auto px-6 py-12 w-full flex-grow">
<div class="text-center mb-12">
<h1 class="text-4xl md:text-5xl font-black mb-4 tracking-tight">Decision Matrix</h1>
<p class="text-slate-500 dark:text-slate-400 max-w-2xl mx-auto">Remove the emotion. Define your options, weight your criteria, and let the algorithm calculate the optimal path.</p>
<p class="text-xs text-slate-400 mt-3">Simple Additive Weighting · 100% client-side</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
<div class="lg:col-span-1 bg-white dark:bg-slate-900 p-8 rounded-3xl border border-slate-200 dark:border-slate-800 shadow-xl">
<h2 class="text-xl font-bold mb-6 flex items-center gap-2"><i class="fa-solid fa-sliders text-indigo-500"></i> Parameters</h2>
<div class="mb-6">
<label class="block text-sm font-bold text-slate-700 dark:text-slate-300 mb-2">1. Options (Comma separated)</label>
<input type="text" id="input-options" placeholder="e.g. React, Vue, Angular" class="w-full p-4 rounded-xl bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-indigo-500 outline-none transition-all">
</div>
<div class="mb-8">
<label class="block text-sm font-bold text-slate-700 dark:text-slate-300 mb-2">2. Criteria (Comma separated)</label>
<input type="text" id="input-criteria" placeholder="e.g. Salary, Learning Curve, Fun" class="w-full p-4 rounded-xl bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-indigo-500 outline-none transition-all">
</div>
<button id="btn-example" class="w-full mb-3 text-xs font-semibold text-indigo-600 dark:text-indigo-400 hover:underline">Load an example</button>
<button id="btn-generate" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-4 rounded-xl font-bold shadow-lg hover:shadow-xl transition-all hover:-translate-y-1">
Build Matrix
</button>
</div>
<div class="lg:col-span-2 bg-indigo-50 dark:bg-indigo-900/10 p-8 rounded-3xl border border-indigo-100 dark:border-indigo-500/20 flex flex-col items-center justify-center text-center min-h-[300px]">
<div id="results-container" class="w-full">
<i class="fa-solid fa-calculator text-4xl text-indigo-300 dark:text-indigo-700 mb-4"></i>
<h3 class="text-xl font-medium text-slate-500 dark:text-slate-400">Your calculated result will appear here.</h3>
</div>
</div>
</div>
<div id="matrix-wrapper" class="hidden bg-white dark:bg-slate-900 rounded-3xl border border-slate-200 dark:border-slate-800 shadow-xl overflow-hidden">
<div class="overflow-x-auto p-8" id="matrix-container">
</div>
<div class="bg-slate-50 dark:bg-slate-800 p-6 border-t border-slate-200 dark:border-slate-700 flex justify-end">
<button id="btn-calculate" class="bg-emerald-500 hover:bg-emerald-600 text-white px-8 py-3 rounded-xl font-bold shadow-md transition-all">
Calculate Optimal Choice
</button>
</div>
</div>
<section class="stk-section" id="how-to-use" aria-label="How to use this tool">
<div class="stk-wrap">
<span class="stk-chip"><i class="fa-solid fa-scale-balanced"></i> How-To Guide</span>
<h2 class="stk-h2">How to use the Weighted Decision Matrix</h2>
<p class="stk-lead">A decision matrix turns a messy “gut feeling” choice into a transparent, weighted calculation. Here is the workflow.</p>
<div class="stk-grid stk-grid-2">
<div class="stk-step"><span class="stk-num">1</span><div><h3>List your options</h3><p>Enter the choices you are deciding between (e.g. <em>Job A, Job B, Job C</em>) in the Options box, separated by commas.</p></div></div><div class="stk-step"><span class="stk-num">2</span><div><h3>List your criteria</h3><p>Enter the factors that matter (e.g. <em>Salary, Growth, Commute</em>). Click <strong>Build Matrix</strong> to generate the grid.</p></div></div><div class="stk-step"><span class="stk-num">3</span><div><h3>Weight and score</h3><p>Give each criterion a weight (1–5) for how much it matters, then score every option on each criterion (1–10).</p></div></div><div class="stk-step"><span class="stk-num">4</span><div><h3>Calculate</h3><p>Click <strong>Calculate Optimal Choice</strong> to see a ranked result with each option’s percentage of the maximum possible score.</p></div></div>
</div>
</div>
</section>
<section class="stk-section" id="how-it-works" aria-label="How it works">
<div class="stk-wrap">
<h2 class="stk-h2">How the calculation works</h2>
<div class="stk-grid stk-grid-2">
<div class="stk-card"><h3 style="font-weight:700;margin-bottom:.4rem;">Weighted Sum Model</h3><p style="font-size:.88rem;color:#64748b;line-height:1.6;">Each option’s total is the sum of <code>score × weight</code> across all criteria. This is the <strong>Simple Additive Weighting (SAW)</strong> method, one of the oldest and most widely used multi-criteria decision techniques. The option with the highest weighted total is highlighted as the optimal choice.</p></div><div class="stk-card"><h3 style="font-weight:700;margin-bottom:.4rem;">Normalised & ranked</h3><p style="font-size:.88rem;color:#64748b;line-height:1.6;">Because raw totals depend on how many criteria you use, results are also shown as a percentage of the maximum possible score, and every option is ranked so you can see runners-up and ties, not just the winner.</p></div>
</div>
<div class="stk-note" style="margin-top:1rem;">
<i class="fa-solid fa-circle-info" style="margin-top:.15rem;"></i>
<div><strong>Scoring tip.</strong> Keep every criterion on the same 1–10 “higher is better” scale. For a “lower is better” factor such as <em>cost</em> or <em>commute time</em>, score the option that is cheapest/shortest highest. Weights are relative, so what matters is their ratio, not their absolute size.</div>
</div>
</div>
</section>
<section class="stk-section" id="method" aria-label="Method and equations">
<div class="stk-wrap" style="max-width:52rem;">
<span class="stk-chip"><i class="fa-solid fa-square-root-variable"></i> Method & Equations</span>
<h2 class="stk-h2">The math behind the matrix</h2>
<p class="stk-lead">This tool implements <strong>Simple Additive Weighting (SAW)</strong> (also called the Weighted Sum Model) the most widely used compensatory multi-criteria decision method.</p>
<p class="stk-eqn-label">Weighted score of option <em>i</em> (Simple Additive Weighting):</p>
<div class="stk-math"><math display="block"><msub><mi>S</mi><mi>i</mi></msub><mo>=</mo><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>n</mi></mrow></munderover><msub><mi>w</mi><mi>j</mi></msub><mo>·</mo><msub><mi>r</mi><mrow><mi>i</mi><mi>j</mi></mrow></msub></math></div>
<p class="stk-eqn-label">Expressed as a percentage of the maximum attainable score:</p>
<div class="stk-math"><math display="block"><msubsup><mi>S</mi><mi>i</mi><mrow><mo>(%)</mo></mrow></msubsup><mo>=</mo><mn>100</mn><mo>×</mo><mfrac><msub><mi>S</mi><mi>i</mi></msub><mrow><msub><mi>r</mi><mi>max</mi></msub><mo>·</mo><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>n</mi></mrow></munderover><msub><mi>w</mi><mi>j</mi></msub></mrow></mfrac></math></div>
<p class="stk-where">where <math><msub><mi>S</mi><mi>i</mi></msub></math> is the total score of option <em>i</em>;
<math><msub><mi>w</mi><mi>j</mi></msub></math> the weight of criterion <em>j</em> (1–5);
<math><msub><mi>r</mi><mrow><mi>i</mi><mi>j</mi></mrow></msub></math> the rating of option <em>i</em> on criterion <em>j</em> (1–10);
<math><msub><mi>r</mi><mi>max</mi></msub></math> = 10 the maximum rating; and <em>n</em> the number of criteria.
The recommended option is the one that maximises <math><msub><mi>S</mi><mi>i</mi></msub></math>.</p>
<h3 class="stk-refs-h">References & documentation</h3>
<ol class="stk-refs-list">
<li>Fishburn, P. C. (1967). Additive utilities with incomplete product sets: Application to priorities and assignments. <em>Operations Research</em>, 15(3), 537–542.</li>
<li>Triantaphyllou, E. (2000). <em>Multi-Criteria Decision Making Methods: A Comparative Study</em>. Springer.</li>
<li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Weighted_sum_model" target="_blank" rel="noopener">Weighted sum model</a> · <a href="https://en.wikipedia.org/wiki/Multiple-criteria_decision_analysis" target="_blank" rel="noopener">Multiple-criteria decision analysis</a>.</li>
</ol>
</div>
</section>
<section class="stk-section" id="faq" aria-label="Frequently asked questions">
<div class="stk-wrap" style="max-width:52rem;">
<h2 class="stk-h2">Frequently asked questions</h2>
<div style="margin-top:1rem;">
<details class="stk-faq"><summary>Is my data uploaded anywhere?</summary><div>No. Everything runs in your browser; nothing you type is sent to a server.</div></details><details class="stk-faq"><summary>What method is this based on?</summary><div>The Simple Additive Weighting (SAW) / Weighted Sum Model, a standard multi-criteria decision analysis (MCDA) technique.</div></details><details class="stk-faq"><summary>How should I choose weights?</summary><div>Weights express relative importance. A criterion weighted 4 counts twice as much as one weighted 2. Only the ratios matter.</div></details><details class="stk-faq"><summary>What happens with a tie?</summary><div>If two or more options share the top weighted total, they are all shown as tied top choices.</div></details><details class="stk-faq"><summary>Can I handle “lower is better” criteria?</summary><div>Yes, invert them when scoring, so the most favourable option (lowest cost, shortest commute) gets the highest score.</div></details>
</div>
<div class="stk-refs">
<a href="https://en.wikipedia.org/wiki/Weighted_sum_model" target="_blank" rel="noopener"><i class="fa-solid fa-square-root-variable"></i> Weighted Sum Model (overview)</a><a href="https://en.wikipedia.org/wiki/Multiple-criteria_decision_analysis" target="_blank" rel="noopener"><i class="fa-solid fa-scale-balanced"></i> Multi-criteria decision analysis</a>
</div>
<p class="stk-credit">Runs entirely in your browser, no data leaves your device.</p>
</div>
</section>
</main>
<footer class="mt-auto border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-950 py-12">
<div class="max-w-7xl mx-auto px-6">
<div class="stk-dir mb-12">
<div>
<h4><i class="fa-solid fa-chart-pie text-indigo-500 text-xs"></i> Data & Stats</h4>
<ul>
<li><a href="plot-digitizer.html">Plot Digitizer</a></li>
<li><a href="data-cleaner.html">Data Cleaner</a></li>
<li><a href="stats-calculator.html">Stat Calculator</a></li>
<li><a href="error-bar-generator.html">Error Bar Gen</a></li>
<li><a href="outlier-detector.html">Outlier Detector</a></li>
<li><a href="curve-fitter.html">Curve Fitter</a></li>
<li><a href="plot-builder.html">Plot Builder</a></li>
<li><a href="xvg-visualizer.html">XVG Visualizer</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-microchip text-orange-500 text-xs"></i> Compute</h4>
<ul>
<li><a href="structure-inspector.html">3D Inspector</a></li>
<li><a href="coordinate-manipulator.html">Coordinate Manipulator</a></li>
<li><a href="scientific-converter.html">Energy Conversions</a></li>
<li><a href="script-generator.html">HPC Script Gen</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-book-open text-teal-500 text-xs"></i> Writing & Citations</h4>
<ul>
<li><a href="latex-formatter.html">Equation Formatter</a></li>
<li><a href="latex-tables.html">Visual LaTeX Tables</a></li>
<li><a href="doi-fetcher.html">DOI to BibTeX</a></li>
<li><a href="bibtex-deduplicator.html">BibTeX Deduplicator</a></li>
<li><a href="bibtex-sanitizer.html">BibTeX Sanitizer</a></li>
<li><a href="journal-abbreviator.html">Journal Abbrev</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-headphones text-fuchsia-500 text-xs"></i> Focus & Flow</h4>
<ul>
<li><a href="pomodoro.html">Ambient Pomodoro</a></li>
<li><a href="decision.html">Decision Matrix</a></li>
<li><a href="sandbox.html">Kinetic Sandbox</a></li>
</ul>
</div>
</div>
<div class="border-t border-slate-200 dark:border-slate-800 pt-8 flex flex-col md:flex-row items-center justify-between text-slate-500 dark:text-slate-400 gap-4">
<div class="flex items-center gap-2">
<i class="fa-solid fa-flask text-xl text-slate-300 dark:text-slate-700"></i>
<span class="font-bold text-slate-700 dark:text-slate-300">STEMKit</span>
</div>
<div class="text-center text-sm font-medium">© 2026 STEMKit. Built by <a href="https://github.com/LD-Shell" target="_blank" rel="noopener" class="font-semibold hover:text-indigo-500 transition-colors">Olanrewaju M. Daramola</a>.</div>
<div class="flex gap-6 text-sm font-medium">
<a href="privacy.html#privacy" class="hover:text-indigo-500 transition-colors">Privacy Policy</a>
<a href="privacy.html#terms" class="hover:text-indigo-500 transition-colors">Terms of Service</a>
</div>
</div>
</div>
</footer>
<script src="js/decision.js"></script>
<script>
// 1. Theme toggle logic (Mobile & Desktop)
document.querySelectorAll('.themeToggle').forEach(btn => {
btn.addEventListener('click', () => {
document.documentElement.classList.toggle('dark');
localStorage.theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
});
});
// 2. Mobile menu logic
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
const mobileMenu = document.getElementById('mobile-menu');
const menuIcon = document.getElementById('menu-icon');
if(mobileMenuBtn) {
mobileMenuBtn.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
if(mobileMenu.classList.contains('hidden')) {
menuIcon.classList.remove('fa-xmark');
menuIcon.classList.add('fa-bars');
} else {
menuIcon.classList.remove('fa-bars');
menuIcon.classList.add('fa-xmark');
}
});
document.querySelectorAll('.mobile-link').forEach(link => {
link.addEventListener('click', () => {
mobileMenu.classList.add('hidden');
menuIcon.classList.remove('fa-xmark');
menuIcon.classList.add('fa-bars');
});
});
}
</script>
</body>
</html>