access.raam.raam

access.raam.raam(demand_df, supply_df, cost_df, demand_index=True, demand_name='demand', supply_index=True, supply_name='supply', cost_origin='origin', cost_dest='dest', cost_name='cost', tau=60, rho=None, max_cycles=150, initial_step=0.2, min_step=0.005, half_life=50, verbose=False)[source]

Calculate the rational agent access model’s total cost – a weighted travel and congestion cost. The balance of the two costs is expressed by the \(\tau\) parameter, which corresponds to the travel time required to accept of congestion by 100% of the mean demand to supply ratio in the study area.

Parameters:
demand_dfpandas.DataFrame

The origins dataframe, containing a location index and a total demand.

demand_originstr

is the name of the column of demand that holds the origin ID.

demand_valuestr

is the name of the column of demand that holds the aggregate demand at a location.

supply_originstr

is the name of the column of demand that holds the origin ID.

supply_dfpandas.DataFrame

The origins dataframe, containing a location index and level of supply

cost_dfpandas.DataFrame

This dataframe contains a link between neighboring demand locations, and a cost between them.

cost_originstr

The column name of the locations of users or consumers.

cost_deststr

The column name of the supply or resource locations.

cost_namestr

The column name of the travel cost between origins and destinations

weight_fnfunction

This fucntion will weight the value of resources/facilities, as a function of the raw cost.

max_cyclesint

Max number of cycles.

max_shiftint

This is the maximum number to shift in each cycle.

max_costfloat

This is the maximum cost to consider in the weighted sum; note that it applies along with the weight function.

Returns:
accesspandas.Series

A – potentially-weighted – Rational Agent Access Model cost.