# simulate > Simulate a scenario with various methods --- ## Description Simulate a scenario with oracle/centralized receding horizon/distributed receding horizon schemes. ## Syntax ```matlab sim_out = simulate(scenario) sim_out = simulate(scenario,Name=Value) ``` ## Input Arguments | Name | Type | Description | |------|------|--------------| | `scenario` | *Scenario object* | Scenario for scheduling | ## Name-Value Arguments | Name | Type | Description | |------|------|--------------| | `H` | *12 (default) \| positive integer* | Number of time slots comprising the prediction horizon | | `rho` | *5000 (default) \| nonnegative scalar* | Penalty parameter | | `Lf_kP` | *1 (default) \| positive scalar* | Coupling gain (proportional) for distributed PI algorithm (Only for "dist") | | `Lf_kI` | *1 (default) \| positive scalar* | Coupling gain (integral) for distributed PI algorithm (Only for "dist") | | `Lf_time` | *400 (default) \| positive scalar* | Length of time interval on which PI dynamics is executed (Only for "dist") | | `Lf_dt` | *0.0005 (default) \| positive scalar* | Stepsize for the Euler discritization of PI dynamics (Only for "dist") | | `Lf_scale` | *0.05 (default) \| positive scalar* | Cost function scaling factor for PI dynamics (Only for "dist") | | `Uf_iteration` | *40 (default) \| positive integer* | Number of iterations for the distributed algorithm (Only for "dist") | | `Uf_K` | *30 (default) \| positive integer* | Number of fractional iterations for the distributed algorithm (Only for "dist") | | `Uf_c` | *0.1 (default) \| positive scalar* | Parameter for the distributed algorithm (Only for "dist") | | `Uf_theta` | *0 (default) \| scalar* | Parameter for the distributed algorithm (Only for "dist") | | `quiet` | *false (default) \| logical* | On/off solver messages | | `oracle` | *true (default) \| logical* | Whether to perform oracle scheduling | | `cent` | *false (default) \| logical* | Whether to perform centralized receding horizon scheduling | | `dist` | *false (default) \| logical* | Whether to perform distributed receding horizon scheduling | ## Output Arguments | Name | Type | Description | |------|------|--------------| | `sim_out` | *struct* | Results including charging schedules for various methods, cost, scenario information, etc. |