Scenario/get_subscenario

Get subscenario from a Scenario instance


Description

Get subscenario of scenario over time slots ini, ini+1, \(\dots\) , fin-1.

  • If future_evs == true, the subscenario is composed of the EVs satisfying Arr_time < fin and Dep_time > ini, i.e., the EVs connected to chargers at some time slot among ini, ini+1, \(\dots\) , fin-1.

  • If future_evs == false, the subscenario is composed of the EVs satisfying ARr_time <= ini and Dep_time < ini, i.e., the EVs connected to chargers at time slot ini.

  • If the name-value argument E_ini is provided, then for each i, EVs(i).E_ini is set to E_ini(i).

  • The output ev_ind is a row vector containing the indices of EVs in scenario that form the subscenario.

Syntax

[subscenario,~] = get_subscenario(scenario,Name=Value)
[subscenario,ev_ind] = get_subscenario(scenario,Name=Value)

Input Arguments

Name

Type

Description

scenario

Scenario object

Scenario object

Name-Value Arguments

Name

Type

Description

ini

1 (default) | positive integer

Initial time slot of a subscenario

fin

T+1 (default) | positive integer

Final time slot of a subscenario

future_evs

true (default) | logical

Discard future EVs (EVs with Arr_time > ini) if false

E_ini

1×N_ev array

Set EVs(i).E_ini = E_ini(i) for each i if provided

Output Arguments

Name

Type

Description

subscenario

Scenario object

Obtained subscenario

ev_ind

row vector

Row vector of indices of EVs in scenario that form the subscenario