flexsim_set_distribution
Sets a time property distribution (exponential, uniform, normal, constant) on a FlexSim object for window backend models. Use it to configure inter-arrival or similar timing properties.
Instructions
Set a time property distribution by read-modify-rewrite (window backend only).
Verified: exponential par2 (media) via ", <viejo>/**/" mold replace + constant
via setProperty(number) (AGENTE_FLEXSIM.md sec 6). uniform/normal rewrite the
two tagged numbers ONLY when the current code already is that distribution.
CHANGING FAMILY (exponential->uniform/normal) IS REFUSED: the 2026 mold has
par1..par5 slots and a renamed mold leaves par4/par5 empty
(uniform(2,8,stream,,)), which CRASHED FlexSim live (2026-09-26 probe6:
process gone during the next run). Change family by hand in the GUI or use
constant. The stream argument is accepted but the original stream expression
is preserved (third param untouched).
The uniform/normal/exponential (y constant) output reports expected_mean
(exponential=par2, uniform=(par1+par2)/2, normal=par1, constant=valor)
para contraste humano.
Functional check (humano): flexsim_reset + flexsim_run_to_time hasta T +
leer Source.stats.output (arrivals) y contrastar arrivals ~= T / expected_mean
(p. ej. T=600, mean=5 -> ~120 llegadas; tolerancia por variabilidad aleatoria).
Args:
object: object name (e.g. Source1).
property: property name (default InterArrivalTime).
distribution: exponential, uniform, normal or constant.
par1: uniform min / normal mean / constant value (when par1 set).
par2: exponential mean / uniform max / normal std / constant value (fallback).
stream: accepted for API completeness, preserved as-is (not rewritten).
Limits: only the standard mold with /**/ tags is rewritten; a mold
without tags returns an error (no fallback to constant, no corruption).
Family changes (exponential->uniform/normal) are refused: they crashed
FlexSim live (empty par4/par5 slots). Change family in the GUI or use
constant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |