SimeMobileCity 0.1
  • API
  • Workflow
  • Site
    • Page
        • MC.run

    MC.run¶

    MC.run(file_out, weeks, weeks_equi, capacity={}, trials=100, node_p=0.1, p_norm='', max_dist=500)¶

    Run Monte Carlo code. Hereby the number of drivers for each hour represent the number of MC steps. During the equilibration run, the trajectory is not edited until sttarting the production run. If a user or POI choice fails, it is repeated for the given number of trials. POI probabilities are added to the nodes to set the probability for choosing certain nodes as a destination. The probability matrix for the graph nodes can be normalized using the options

    • week - Normalize all node probabilities with the maximum value from the week
    • day - Normalize all node probabilities each day with the maximum value from the day
    • hour - Normalize all node probabilities each hour with the maximum value from the hour
    • empty string - Do not normalize

    Once finished, the trajectories are saved in form of a dictionary for

    • nodes - Node trajectory
    • cs - Charging station trajectory
    • dist - Charging station accumulated walking distance
    Parameters:
    file_out : string

    file link for output object file

    weeks : integer

    Number of weeks to simulate

    weeks_equi : integer

    Number of weeks for equilibration

    capacity : dictionary

    Dictionary containing charing station nodes and capacities

    trials : integer, optional

    Number of trials for faild user and node selections per driver

    node_p : dictionary, float, optional

    Probability of all nodes not covered by pois each hour each weekday, either a float for the same probability each hour, dictionary of hours for same hour distribution for all days, a dictionary of days for the same hour probability for different days, or a dictionary of days each with a dictionary of hours

    p_norm: string, optional

    Normalize POI dicts with maximum value based on given type \(\rightarrow\) largest value is equal to one

    max_dist : float, optional

    Maximal allowed walking distance from charging station to node in m, for nodes not covered by given POI objects

    Returns:
    traj : dictionary

    Dictionary containing trajectories inputs and distance accumulation

    Back to top

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