SimeMobileCity 0.1
  • API
  • Workflow
  • Site
    • Page
        • T

    T¶

    class 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:
    num_nodes : integer

    Number of nodes in system

    num_users : integer

    Number of usertypes in system

    num_days : integer, optional

    Number of unique days

    num_hours : integer, optional

    Number of unique hours per days

    failures : list, optional

    List of failure types - by default occupancy occ and distance dist

    node_keys : dictionary, optional

    Dictionary containing the relation of list and osmx ids

    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.

    Back to top

    © Copyright 2021, Hamzeh Kraus.
    Created using Sphinx 1.6.6.