← Back to Simulator

Simulator — Expert Explanations

Extended documentation for energy-market practitioners and quantitative users. Expand any section for detailed rationale, algorithmic structure, and mathematical interpretation.

How to read this page

FlexSim expert overview
Purpose, market context, modeling boundaries, and architecture assumptions.

FlexSim is a deterministic dispatch-and-settlement simulator for distributed energy resources (DER) under tariff and flexibility-program constraints. It is designed for decision support, not real-time control.

From a business perspective, the app answers: (1) What is the site-level cost/revenue outcome under a given strategy? (2) How do actors (consumer, grid, aggregator, producer, site) split economics? (3) How sensitive are outcomes to operational assumptions?

Industrial rationale: operators need explainable results that connect operational controls (charge/discharge, import/export, flex delivery) to commercial outcomes (energy cost, demand exposure, flex settlement, penalties).

Modeling boundary: one site per scenario, interval-based simulation, fixed strategy rules, deterministic pseudo-variability, no stochastic forecast errors, no AC power-flow constraints, and simplified settlement rules.

System architecture: scenario -> run engine -> interval trajectories -> settlement aggregation -> KPI/actor/event outputs -> visualization. This separation keeps model logic auditable for technical and regulatory stakeholders.

Actor definitions and business rationale: Consumer = the demand-serving entity paying import energy cost and potentially receiving flexibility value; Producer = local generation side (e.g., PV/export-capable resources) monetizing exported energy or avoided imports; Grid = external supply interface that sells imported energy and buys exports under tariff terms; Aggregator = market-facing coordinator monetizing flexibility products and managing performance/penalty exposure; Site = the physical operational boundary (meter point + controllable assets + local constraints) where optimization is executed and where technical feasibility is enforced.

Why “Site” matters: Site is not just a location label; it is the optimization container. Grid connection limits, tariff assignment, asset fleet, operating window, and compliance constraints all bind at site level. In business terms, site is often the P&L accountability unit for plant/facility energy management.

Typical business models by actor: Consumer-led cost minimization (bill reduction, demand-charge shaving, behind-the-meter optimization); Producer-led value capture (self-consumption uplift + export monetization); Aggregator-led flexibility model (capacity/DR/ancillary participation with performance contracts); Utility/grid-facing programs (incentive-based dispatch and congestion relief). Hybrid models are common, where savings/revenue are contractually shared via gain-share or availability/performance fees.

Cost/revenue optimization framing: total value can be read as V = (avoided import cost + export revenue + flex settlement revenue) - (energy procurement cost + penalties + operational constraints/opportunity losses). Different business models change the allocation of V across actors, not only the magnitude.

Scenario selector
Scenario as the governing parameter set.

A scenario defines the governing tuple S = (W, Δt, Site, Assets, Tariff, FlexPrograms).

W is the simulation horizon [t0, t1), Δt is interval length in minutes, Assets define controllable/non-controllable resources, Tariff defines import/export price logic and optional demand charge, and FlexPrograms define commitment/penalty structures.

Business rationale: scenario-level separation allows planners to encode different customer archetypes (industrial site, commercial campus, EV depot) and compare strategy suitability without changing engine code.

Objective selector
Optimization intent and commercial interpretation.

Objectives steer the dispatch policy target function J. In simplified form: cost_min approximates min J = C_energy - R_flex; revenue_max emphasizes monetization opportunities; hybrid balances both under heuristic policy.

Even when objective changes, outcomes may remain close if scenario economics are dominated by one term (for example, little export upside or no flex revenue stream).

Industrial rationale: objective switching is useful for stress-testing policy preferences (risk-averse cost control vs opportunity-seeking monetization) under the same physical system.

Strategy selector
Dispatch policy mapping from state to action.

Strategy selects the policy π that maps state x_t = {load, solar, price, SoC, limits, reserves} to action a_t = {charge_kW, discharge_kW}.

Current implementation is rule-based (heuristic_v1, peak_shave_v1), with reserve constraints and ramp constraints applied in-engine.

Mathematically, each interval applies: a_t* = π(x_t), then feasible projection onto constraints (SoC bounds, max charge/discharge, ramp-rate).

Business rationale: rule-based policies are transparent and auditable, a key requirement in industrial decision meetings and compliance reviews.

Load scale
Demand scaling control and sensitivity testing.

Applied multiplicatively to demand-like assets: load_t,new = load_t,base × loadScale.

Used for what-if analyses: production slowdown, occupancy changes, process electrification, abnormal operating mode.

Industrial rationale: planners frequently test ±10–50% demand envelopes before committing battery schedules or flex bids.

PV scale
Generation scaling under weather/availability assumptions.

Applied multiplicatively to PV output before net-load calculation: pv_t,new = pv_t,base × pvScale.

Supports scenarios like panel derating, curtailment assumptions, seasonal irradiance shifts, and maintenance outages.

Commercial rationale: PV uncertainty directly impacts import exposure and arbitrage opportunity windows.

Initial battery SoC (0-1)
Initial state condition for trajectory evolution.

Initial SoC is clamped to [SoC_min, SoC_max] and converted to energy state E0 = SoC0 × Capacity_kWh.

State transition each interval: E_{t+1} = E_t + (P_charge,t × Δt_h × η) - (P_discharge,t × Δt_h / η), then clamped to physical bounds.

Operational rationale: start-of-day SoC materially changes whether the battery can absorb off-peak energy or shave early peaks.

Import price scale
Tariff stress multiplier for purchased energy.

Import price scaling modifies both dispatch incentives and settled cost: p_import,t,new = p_import,t,base × importPriceScale.

Energy cost term: C_energy = Σ(gridImport_t × Δt_h × p_import,t,new).

Business rationale: enables tariff-risk stress tests (wholesale volatility, supplier repricing, policy shocks).

Export price scale
Revenue sensitivity multiplier for export remuneration.

Export revenue term is scaled: R_export = Σ(gridExport_t × Δt_h × p_export,t,base × exportPriceScale).

Used to test downside/upside on feed-in compensation or market price deterioration/improvement.

Commercial rationale: export monetization is often contract-dependent and uncertain over planning horizons.

Run simulation action
Full-horizon recomputation with current controls.

Each run recomputes the full horizon from t0 to t1 using current scenario + control inputs. It is not an incremental patch on a prior run.

Computation flow: load scenario -> generate exogenous profiles -> compute prices -> dispatch loop -> settle programs -> derive KPI/actor/event outputs.

Audit rationale: full rerun ensures reproducibility and traceability of result differences to explicit input changes.

KPI cards
Aggregation layer from interval trajectories to planning metrics.

Core aggregations include import/export energy, energy cost, flex revenue, net cost, congestion counts, and peak reduction proxies.

Examples: Import_kWh = Σ(gridImport_t × Δt_h), NetCost = TotalEnergyCost - TotalFlexRevenue.

Peak reduction proxy compares baseline import (without battery effect approximation) against realized peak import.

Business rationale: KPIs convert operational traces into board-level decision indicators.

Time series cockpit
Operational trajectory diagnostics for experts.

Plots instantaneous power trajectories in kW over time for system-level signals and selected assets.

Interpretation pattern: compare load vs grid import to infer behind-the-meter contribution; compare battery trace vs price windows to assess strategy alignment.

If traces appear blocky, this usually indicates rule-based control boundaries (window logic, reserve lockouts, ramp caps), not necessarily data quality issues.

Expert use: identify controllability bottlenecks, missing flexibility windows, and mismatch between policy intent and realized dispatch.

Actor economics panel
Commercial decomposition by stakeholder.

For each actor a, net_a = revenue_a - cost_a. Values are computed from run-level settlement and energy accounting conventions.

The panel supports negotiation framing: who captures value under a strategy and who bears cost/penalty exposure.

Industrial rationale: multi-party projects (customer, aggregator, utility) need transparent value allocation to design viable contracts.

Actor map
Topology-level explanation of market interactions.

Directed links represent simplified commercial/energy interactions (import, export, dispatch, serving).

Node badges show net outcomes from latest run, enabling quick visual identification of value concentration.

Business rationale: topology view helps non-operators understand how operational control decisions propagate into commercial outcomes.

Event timeline
Event semantics and severity logic.

Events are emitted during run execution (run start/end, dispatch changes, congestion, spikes, penalties).

Severity ordering (critical > warning > info) prioritizes operational risk over informational context.

Expert use: diagnose why KPI outcomes changed between runs and identify intervals that triggered penalties or reliability stress.

Compare panel
Cross-strategy benchmarking under fixed scenario/objective context.

Compares strategy outputs side-by-side for the same input set. Baseline is typically currently selected strategy (fallback first row).

This isolates policy effect while holding scenario constants fixed.

Industrial rationale: enables strategy governance (which policy is production candidate) using quantitative evidence.

Deltas in compare panel
Difference math and sign interpretation.

Delta convention: Δm = m_candidate - m_baseline.

For lower-is-better metrics (e.g., net cost), negative Δ is improvement. For higher-is-better metrics (e.g., flex revenue), positive Δ is improvement.

Best practice: evaluate deltas jointly with risk events (congestion/penalties), not in isolation.

Contract structures and settlement models
How commercial contracts map to optimization incentives and risk allocation.

Gain-share model: savings/revenue are split between customer and service provider/aggregator. Typical form: CustomerBenefit = BaselineCost - RealizedCost; AggregatorFee = α × CustomerBenefit where α is a contractual share.

Availability fee model: asset owner receives fixed compensation for being available in defined windows, independent of actual dispatch quantity. This stabilizes cashflow but can weaken performance incentives unless paired with performance clauses.

Pay-for-performance model: remuneration scales with delivered flexibility energy/power against commitment. Generic form: Payment = λ × Delivered, with under-delivery penalties when Delivered < Committed.

Hybrid model: combines fixed availability retainer + variable performance settlement. Example: TotalCompensation = AvailabilityFee + λ × Delivered - Penalty(Shortfall).

Penalty design examples: linear shortfall penalty Penalty = β × max(Committed - Delivered, 0), plus optional fixed non-performance fee. Strong penalties increase reliability but can discourage aggressive bids.

Risk allocation perspective: consumer typically bears operational disruption risk; aggregator bears performance/compliance risk; utility/market counterparty bears procurement and system-balancing risk. Contract structure redistributes these risks and therefore changes optimal dispatch behavior.

Industrial negotiation guidance: align KPI definitions (baseline methodology, measurement interval, event windows), verify settlement clocks/timezone conventions, and define explicit dispute rules for missing/invalid telemetry.

Optimization linkage: if contract pays mostly on availability, strategy favors reserve maintenance; if it pays on delivered performance, strategy favors energy throughput during event windows; if demand-charge risk dominates, strategy prioritizes peak clipping even with lower flex revenue.

Practical recommendation: model at least three contract variants (conservative, balanced, aggressive) and compare not only expected net value but tail-risk indicators (penalty incidence, low-SoC exposure, congestion frequency).

Worked example — Gain-share: baseline weekly energy cost = €120,000, optimized cost = €102,000, gross savings = €18,000. With α = 30% aggregator share: AggregatorFee = 0.30 × 18,000 = €5,400; customer retains €12,600.

Worked example — Availability: contract pays €1,200 per available event window, 10 windows/month, 95% verified availability. Monthly payment = 1,200 × 10 × 0.95 = €11,400 (before performance adjustments).

Worked example — Pay-for-performance: committed 1,000 kWh DR, delivered 820 kWh, performance price λ = €90/MWh, shortfall penalty β = €140/MWh. Payment = 0.82 MWh × €90 = €73.8; Penalty = 0.18 MWh × €140 = €25.2; Net = €48.6.

Worked example — Hybrid: AvailabilityFee = €6,000/month, Delivered = 4.5 MWh, λ = €85/MWh, committed = 5.0 MWh, β = €120/MWh. Total = 6,000 + (4.5 × 85) - ((5.0-4.5) × 120) = 6,000 + 382.5 - 60 = €6,322.5.

Interpretation note: these examples are simplified cashflow illustrations. In production contracts, taxes, imbalance charges, metering error bands, curtailment clauses, and force-majeure exceptions can materially alter net settlement.