Class GrowthPlanner

java.lang.Object
com.eqixiac.equinix.design.cost.GrowthPlanner

public final class GrowthPlanner extends Object
Growth and commitment-term decisions for one design: projects traffic month by month from commercial.annualGrowthRate over commercial.horizonMonths, finds the Fabric bandwidth tier each connection needs each month, prices the design month by month, recommends a commitment term per item, and produces a scenario band.

Model (every assumption is stated in the result)

  • Traffic: month n (1-based) carries today's traffic × (1 + g)^((n - 1) / 12): compound annual growth applied smoothly per month. Month 1 is today.
  • Capacity: each cloud leg (from the same WorkloadPlacer legs the optimiser's RateCardCostModel prices) needs the smallest Fabric tier (RateCardCostModel.TIERS_MBPS) at or above its projected Mbps; the provider's hosted-connection fee follows the same bandwidth.
  • Items: per leg a Fabric IP_VC connection and the provider's hosted-connection fee; per metro with a leg one STANDARD Fabric Cloud Router; per cloud with monthlyEgressGb its egress over the private path (internet when the design does not connect to it), growing with traffic.
  • Terms: an item is committed for T months at that term's price, renewing at the same term until the horizon; an upgrade within a term is billed at the committed term's price for the new tier from the upgrade month (an assumption: contracts may differ); months committed beyond the horizon are counted (the "commitment tail") at the last month's price; the one-time charge is paid once.
  • Term prices come from the rate card's connectionLookup/cloudRouterLookup at each term. A term option is priced only from a live or caller-supplied price for that term: a PriceSource.REFERENCE figure ignores the term and a live row of another term is a substitution, so both leave the option unpriced with the reason. Provider fees and egress have no term axis (the providers publish none) and are on demand.
  • Currency: amounts are compared in commercial.currency; another currency is converted through CurrencyConverters (pinned rates, a supplied converter, live ECB rates, the bundled table); only a currency no source covers leaves the item unpriced.
  • Field Details

    • TERMS

      public static final List<Term> TERMS
      The terms compared for every item, shortest first.
  • Method Details

    • forSpec

      public static GrowthPlanner forSpec(DesignSpec spec, MetroPortfolio portfolio, DesignContext context, RateCard rateCard, ReferenceRateCard providerFees)
      Plans a design.
      Parameters:
      spec - the spec (growth, horizon, currency, exchange rates, clouds)
      portfolio - the chosen metros
      context - the run's facts (for workload placement)
      rateCard - the card Equinix items and egress are priced from (term prices come from here)
      providerFees - the provider hosted-connection fee table; null leaves those fees unpriced
      Returns:
      the planner
    • forSpec

      public static GrowthPlanner forSpec(DesignSpec spec, MetroPortfolio portfolio, DesignContext context, RateCard rateCard, ReferenceRateCard providerFees, CurrencyConverter converter)
      Plans a design with a converter for prices in other currencies (ranked below rates pinned in the spec and above the default sources; see CurrencyConverters).
      Parameters:
      spec - the spec
      portfolio - the chosen metros
      context - the run's facts
      rateCard - the card Equinix items and egress are priced from
      providerFees - the provider hosted-connection fee table, or null
      converter - the converter, or null for the defaults
      Returns:
      the planner
    • multiplier

      public static double multiplier(double annualGrowth, int month)
      Traffic multiplier for a month: (1 + growth)^((month - 1) / 12).
      Parameters:
      annualGrowth - yearly growth as a fraction
      month - 1-based month
      Returns:
      the multiplier
    • tiers

      public static int[] tiers(int baseMbps, double annualGrowth, int horizon)
      The Fabric tier a leg needs each month.
      Parameters:
      baseMbps - today's sized bandwidth
      annualGrowth - yearly growth as a fraction
      horizon - months
      Returns:
      one tier per month (month 1 first); -1 for a month above the largest tier
    • plan

      public GrowthPlan plan()
      The month-by-month projection with a term recommendation per item.
      Returns:
      the plan
    • scenarios

      public ScenarioBand scenarios(double lowGrowth, double highGrowth, GrowthPlanner.MonteCarlo monteCarlo)
      Deterministic low/base/high cases and, optionally, a seeded Monte Carlo, all priced on demand.
      Parameters:
      lowGrowth - the low annual growth rate (fraction)
      highGrowth - the high annual growth rate (fraction); low <= base <= high where base is the spec's
      monteCarlo - the simulation settings, or null for none
      Returns:
      the band
    • triangular

      public static double triangular(double u, double min, double mode, double max)
      Inverse CDF of the triangular distribution.
      Parameters:
      u - a uniform draw in [0, 1)
      min - the minimum
      mode - the mode
      max - the maximum
      Returns:
      the sample
    • percentile

      public static BigDecimal percentile(List<BigDecimal> sorted, double p)
      Nearest-rank percentile.
      Parameters:
      sorted - ascending values
      p - the fraction, 0 to 1
      Returns:
      the value, or null for an empty list