handleiding_nieuw:sub_spacematrix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
handleiding_nieuw:sub_spacematrix [2025/04/15 15:33] – support | handleiding_nieuw:sub_spacematrix [2025/04/15 15:51] (current) – support | ||
---|---|---|---|
Line 86: | Line 86: | ||
<div class=" | <div class=" | ||
</ | </ | ||
- | |||
- | <button onclick=" | ||
<div style=" | <div style=" | ||
Line 129: | Line 127: | ||
row.innerHTML = ` | row.innerHTML = ` | ||
<td style=" | <td style=" | ||
- | < | + | < |
- | < | + | < |
<td id=" | <td id=" | ||
<td id=" | <td id=" | ||
Line 171: | Line 169: | ||
const fsi = parseFloat(document.getElementById(" | const fsi = parseFloat(document.getElementById(" | ||
const voorzieningPerc = parseFloat(document.getElementById(" | const voorzieningPerc = parseFloat(document.getElementById(" | ||
- | |||
const laadvermogen = opp * fsi; | const laadvermogen = opp * fsi; | ||
const woonBVO = laadvermogen * (1 - voorzieningPerc); | const woonBVO = laadvermogen * (1 - voorzieningPerc); | ||
Line 180: | Line 177: | ||
for (let i = 0; i < types.length; | for (let i = 0; i < types.length; | ||
- | const perc = parseFloat(document.getElementById(`perc_${i}`).value); | + | const perc = parseFloat(document.getElementById(`perc_${i}`).value) |
- | const bvo = parseFloat(document.getElementById(`bvo_${i}`).value); | + | const bvo = parseFloat(document.getElementById(`bvo_${i}`).value) |
gewogenBVO += (perc / 100) * bvo; | gewogenBVO += (perc / 100) * bvo; | ||
totalPerc += perc; | totalPerc += perc; | ||
Line 187: | Line 184: | ||
} | } | ||
- | if (totalPerc === 0) return; | + | if (totalPerc |
const totaalWoningenExact = woonBVO / gewogenBVO; | const totaalWoningenExact = woonBVO / gewogenBVO; | ||
Line 194: | Line 191: | ||
let wonPerType = []; | let wonPerType = []; | ||
- | // Bereken voorlopige aantallen woningen per type | ||
let restant = Math.round(totaalWoningenExact); | let restant = Math.round(totaalWoningenExact); | ||
for (let i = 0; i < details.length; | for (let i = 0; i < details.length; | ||
Line 204: | Line 200: | ||
} | } | ||
- | // Verdeel overgebleven woningen over hoogste decimalen | ||
const decimaalSort = details.map((d, | const decimaalSort = details.map((d, | ||
i, rest: ((d.perc / 100) * totaalWoningenExact) % 1 | i, rest: ((d.perc / 100) * totaalWoningenExact) % 1 | ||
Line 213: | Line 208: | ||
} | } | ||
- | // Output tonen | ||
for (let i = 0; i < details.length; | for (let i = 0; i < details.length; | ||
const aant = wonPerType[i]; | const aant = wonPerType[i]; | ||
Line 237: | Line 231: | ||
</ | </ | ||
</ | </ | ||
+ |
handleiding_nieuw/sub_spacematrix.1744731193.txt.gz · Last modified: 2025/04/15 15:33 by support