runMultiHorizonSimulation
chainalign-backend / services/multiHorizonSimulationService / runMultiHorizonSimulation
Function: runMultiHorizonSimulation()
runMultiHorizonSimulation(
tenantId,horizonConfigs,iterations):Promise<any[]>
Defined in: services/multiHorizonSimulationService.js:14
Develops a multi-horizon simulation framework. This function orchestrates Monte Carlo simulations across multiple time periods, linking the output of one period to the input of the next.
Parameters
tenantId
UUID
The ID of the tenant.
horizonConfigs
any[]
An array of configurations for each period in the horizon. Each config should contain planInputs and externalContext for that period. The first config's planInputs.initialInventory will be used as the starting point.
iterations
number = 10000
Number of simulation iterations for each period.
Returns
Promise<any[]>
A promise that resolves to an array of simulation results for each horizon.