Scenario/validate
Validate a Scenario object
Description
Validate the properties of a Scenario object to ensure that they meet the required conditions. If all the conditions are satisfied, the function returns a Scenario object with valid = true. If not, corresponding error message is raised.
Syntax
scenario = validate(scenario)
scenario = scenario.validate()
Input Arguments
Name |
Type |
Description |
|---|---|---|
|
Scenario object |
Scenario object to be validated |
Output Arguments
Name |
Type |
Description |
|---|---|---|
|
Scenario object |
Validated Scenario object |
Required conditions
For a Scenario object to be valid, the following conditions must be satisfied.
EVs
If
EVsis nonempty, each EV object in it must be valid. (SEE ALSO EV OR EV.VALIDATE)
Compatibility
If
Problem_type == "Lf", thenDmust be nonempty.If
Problem_type == "Uf", thenCmust be nonempty.N_cmust be greater than or equal to the maximum value ofCharger_indof EV objects inEVs.N_evmust be equal to the length ofEVsN_gmust be greater than or equal to the maximum value ofGroup_indof EV objects inEVs.For EV objects in
EVswith sameCharger_indvalue, their occupancy must not overlap, i.e., vectorsArr_time:(Dep_time-1)must not have common elements.
Dimension
If nonempty, length of
Dmust beT.If nonempty, length of
Cmust beT.If nonempty, size of
Lmust be(N_c+1)×(N_c+1).If nonempty, size of
Wmust beN_c×N_c.