EV/validate
Validate an EV object
Description
Validate the properties of an EV object to ensure that they meet the required conditions. If all the conditions are satisfied, the function returns an EV object with valid = true. If not, corresponding error message is raised.
Syntax
ev = validate(ev)
ev = ev.validate()
Input Arguments
Name |
Type |
Description |
|---|---|---|
|
EV object |
EV object to be validated |
Output Arguments
Name |
Type |
Description |
|---|---|---|
|
EV object |
Validated EV object |
Required conditions
For an EV object to be valid, the following conditions must be satisfied.
Weights
The sum of
W_cs,W_pc, andW_bsmust be positive.
Arrival and departure
Dep_timemust be greater thanArr_time.