more realistics numbers in the roi calculator
This commit is contained in:
parent
07df4336e9
commit
86d4b6412e
3 changed files with 207 additions and 130 deletions
|
|
@ -132,55 +132,55 @@ class ROICalculatorApp {
|
|||
const investmentAmount = inputs.investmentAmount;
|
||||
const baseInvestment = 500000;
|
||||
|
||||
// Calculate instance scaling factor
|
||||
// Calculate market-realistic instance scaling factor
|
||||
let scalingFactor;
|
||||
if (investmentAmount <= baseInvestment) {
|
||||
scalingFactor = investmentAmount / baseInvestment;
|
||||
} else if (investmentAmount <= 1000000) {
|
||||
const ratio = investmentAmount / baseInvestment;
|
||||
scalingFactor = Math.pow(ratio, 1.2);
|
||||
scalingFactor = 1.0 + ((ratio - 1.0) * 0.5); // Linear scaling to 1.5x
|
||||
} else if (investmentAmount <= 1500000) {
|
||||
const ratio = investmentAmount / baseInvestment;
|
||||
scalingFactor = Math.pow(ratio, 1.3);
|
||||
const progress = (investmentAmount - 1000000) / 500000;
|
||||
scalingFactor = 1.5 + (progress * 0.3); // Up to 1.8x
|
||||
} else {
|
||||
const ratio = investmentAmount / baseInvestment;
|
||||
scalingFactor = Math.pow(ratio, 1.4);
|
||||
const progress = (investmentAmount - 1500000) / 500000;
|
||||
scalingFactor = 1.8 + (progress * 0.2); // Max 2.0x
|
||||
}
|
||||
|
||||
// Calculate revenue premium
|
||||
// Calculate sustainable revenue premium
|
||||
let revenuePremium;
|
||||
if (investmentAmount >= 2000000) {
|
||||
revenuePremium = 60;
|
||||
revenuePremium = 20; // Maximum 20% premium
|
||||
} else if (investmentAmount >= 1500000) {
|
||||
revenuePremium = 40;
|
||||
revenuePremium = 15; // 15% premium
|
||||
} else if (investmentAmount >= 1000000) {
|
||||
revenuePremium = 20;
|
||||
revenuePremium = 10; // 10% premium
|
||||
} else {
|
||||
revenuePremium = 0;
|
||||
}
|
||||
|
||||
// Calculate grace period
|
||||
// Calculate commercially viable grace period
|
||||
const baseGracePeriod = inputs.gracePeriod;
|
||||
let gracePeriodBonus;
|
||||
if (investmentAmount >= 1500000) {
|
||||
gracePeriodBonus = 12;
|
||||
gracePeriodBonus = 3; // 3 months max bonus
|
||||
} else if (investmentAmount >= 1000000) {
|
||||
gracePeriodBonus = 6;
|
||||
gracePeriodBonus = 2; // 2 months bonus
|
||||
} else {
|
||||
gracePeriodBonus = Math.floor((investmentAmount - baseInvestment) / 250000);
|
||||
gracePeriodBonus = Math.floor((investmentAmount - baseInvestment) / 500000);
|
||||
}
|
||||
const totalGracePeriod = Math.max(0, baseGracePeriod + gracePeriodBonus);
|
||||
const totalGracePeriod = Math.min(Math.max(0, baseGracePeriod + gracePeriodBonus), 6); // Max 6 months
|
||||
|
||||
// Calculate max performance bonus
|
||||
// Calculate realistic max performance bonus
|
||||
let maxBonus;
|
||||
if (investmentAmount >= 2000000) {
|
||||
maxBonus = 35;
|
||||
maxBonus = 15; // 15% max bonus
|
||||
} else if (investmentAmount >= 1500000) {
|
||||
maxBonus = 25;
|
||||
maxBonus = 12; // 12% max bonus
|
||||
} else if (investmentAmount >= 1000000) {
|
||||
maxBonus = 20;
|
||||
maxBonus = 10; // 10% max bonus
|
||||
} else {
|
||||
maxBonus = 15;
|
||||
maxBonus = 8; // 8% max bonus
|
||||
}
|
||||
|
||||
// Update UI elements
|
||||
|
|
@ -411,49 +411,49 @@ class ROICalculatorApp {
|
|||
if (!this.calculator) return;
|
||||
|
||||
// Reset Conservative
|
||||
this.calculator.scenarios.conservative.churnRate = 0.02;
|
||||
this.calculator.scenarios.conservative.churnRate = 0.025;
|
||||
this.calculator.scenarios.conservative.phases = [
|
||||
{ months: 6, newInstancesPerMonth: 50 },
|
||||
{ months: 6, newInstancesPerMonth: 75 },
|
||||
{ months: 12, newInstancesPerMonth: 100 },
|
||||
{ months: 12, newInstancesPerMonth: 150 }
|
||||
{ months: 6, newInstancesPerMonth: 15 },
|
||||
{ months: 6, newInstancesPerMonth: 24 },
|
||||
{ months: 12, newInstancesPerMonth: 35 },
|
||||
{ months: 12, newInstancesPerMonth: 40 }
|
||||
];
|
||||
|
||||
// Reset Moderate
|
||||
this.calculator.scenarios.moderate.churnRate = 0.03;
|
||||
this.calculator.scenarios.moderate.phases = [
|
||||
{ months: 6, newInstancesPerMonth: 100 },
|
||||
{ months: 6, newInstancesPerMonth: 200 },
|
||||
{ months: 12, newInstancesPerMonth: 300 },
|
||||
{ months: 12, newInstancesPerMonth: 400 }
|
||||
{ months: 6, newInstancesPerMonth: 25 },
|
||||
{ months: 6, newInstancesPerMonth: 45 },
|
||||
{ months: 12, newInstancesPerMonth: 70 },
|
||||
{ months: 12, newInstancesPerMonth: 90 }
|
||||
];
|
||||
|
||||
// Reset Aggressive
|
||||
this.calculator.scenarios.aggressive.churnRate = 0.05;
|
||||
this.calculator.scenarios.aggressive.churnRate = 0.035;
|
||||
this.calculator.scenarios.aggressive.phases = [
|
||||
{ months: 6, newInstancesPerMonth: 200 },
|
||||
{ months: 6, newInstancesPerMonth: 400 },
|
||||
{ months: 12, newInstancesPerMonth: 600 },
|
||||
{ months: 12, newInstancesPerMonth: 800 }
|
||||
{ months: 6, newInstancesPerMonth: 40 },
|
||||
{ months: 6, newInstancesPerMonth: 80 },
|
||||
{ months: 12, newInstancesPerMonth: 120 },
|
||||
{ months: 12, newInstancesPerMonth: 150 }
|
||||
];
|
||||
|
||||
// Update UI inputs
|
||||
const inputMappings = [
|
||||
['conservative-churn', '2.0'],
|
||||
['conservative-phase-0', '50'],
|
||||
['conservative-phase-1', '75'],
|
||||
['conservative-phase-2', '100'],
|
||||
['conservative-phase-3', '150'],
|
||||
['conservative-churn', '2.5'],
|
||||
['conservative-phase-0', '15'],
|
||||
['conservative-phase-1', '24'],
|
||||
['conservative-phase-2', '35'],
|
||||
['conservative-phase-3', '40'],
|
||||
['moderate-churn', '3.0'],
|
||||
['moderate-phase-0', '100'],
|
||||
['moderate-phase-1', '200'],
|
||||
['moderate-phase-2', '300'],
|
||||
['moderate-phase-3', '400'],
|
||||
['aggressive-churn', '5.0'],
|
||||
['aggressive-phase-0', '200'],
|
||||
['aggressive-phase-1', '400'],
|
||||
['aggressive-phase-2', '600'],
|
||||
['aggressive-phase-3', '800']
|
||||
['moderate-phase-0', '25'],
|
||||
['moderate-phase-1', '45'],
|
||||
['moderate-phase-2', '70'],
|
||||
['moderate-phase-3', '90'],
|
||||
['aggressive-churn', '3.5'],
|
||||
['aggressive-phase-0', '40'],
|
||||
['aggressive-phase-1', '80'],
|
||||
['aggressive-phase-2', '120'],
|
||||
['aggressive-phase-3', '150']
|
||||
];
|
||||
|
||||
inputMappings.forEach(([id, value]) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue