simemobilecity.partition.T(num_nodes, num_users, num_days=7, num_hours=24, failures=['occ', 'dist'], node_keys={})¶This class defines a trajectory object. For each hour of a day in a week, a dictionary is created for containing the success abnd failures of each user type. The failures are differentiated between occupancy occ and distance dist.
| Parameters: |
|
|---|
Methods
_index(day, hour, node, user_id[, fail]) |
Calculate list index for given settings. |
add_fail(day, hour, node, user_id, fail) |
Add a failed charging instance to given day, hour, node, and user type with the given failure reason. |
add_fail_dist(day, hour, node, user_id, dist) |
Add a failed charging instance to given day, hour, node, and user type with the given failure reason. |
add_success(day, hour, node, user_id) |
Add a successfull charging instance to given day, hour, node, and user_id. |
add_success_dist(day, hour, node, user_id, dist) |
Add walking distance of a successfull charging instance to given day, hour, node, and user type. |
extract(days, hours, users[, is_norm]) |
Extract data from trajectory for the given days hours and user types. |
get_fail(day, hour, node, user_id, fail) |
Get failure value for given day, hour, node, and user type with the given failure reason. |
get_node_keys() |
Get number of users. |
get_num_days() |
Get number of days. |
get_num_hours() |
Get number of hours. |
get_num_users() |
Get number of users. |
get_num_nodes() |
Get number of ndoes. |
get_success(day, hour, node, user_id) |
Get sucess value for given day, hour, node, and user type. |
set_fail(day, hour, node, user_id, fail, val) |
Set failure value for given day, hour, node, and user type with the given failure reason. |
set_success(day, hour, node, user_id, val) |
Set sucess value for given day, hour, node, and user type. |