objective_function_count = {objective_function_1: 0, objective_function_2: 0}

# initial guesses

initial_guess = [
    2.0, 2.0, 2.0, 5.0
]  # [in_vehicle=1, transfer_walk, origin_wait, transfer_wait, transfer_penalty]
initial_cost_dict = sgs.runAssignmentCalculateErrorRMSN_all_error_terms(
    Visum=Visum,
    estimateList=initial_guess,
    obs_stops_df=observed_stop_df,
    obs_line_routes=observed_line_route_df)
initial_cost = initial_cost_dict[objective_function_1]
results_all_df = results_all_df.append(
    sgs.parse_error_from_dict_to_df(initial_cost_dict, initial_guess))

results_dict = {0: [initial_cost, initial_guess]}

current_estimate = np.copy(initial_guess)

best_rmsn = np.copy(initial_cost)

np.random.seed(55)

# measure time - start

t_start = timeit.default_timer()

for k in range(max_iterations):
Exemplo n.º 2
0
objective_function_count = {objective_function_1: 0, objective_function_2: 0}

# initial guesses

initial_guess = [
    2.0, 2.0, 2.0, 5.0
]  # [in_vehicle=1, transfer_walk, origin_wait, transfer_wait, transfer_penalty]
initial_cost_dict = sgs.runAssignmentCalculateErrorRMSN_all_error_terms(
    Visum=Visum,
    estimateList=initial_guess,
    obs_stops_df=observed_stop_df,
    obs_line_routes=observed_line_route_df)
initial_cost = initial_cost_dict[objective_function_1]
results_all_df = results_all_df.append(
    sgs.parse_error_from_dict_to_df(simulated_error_dict=initial_cost_dict,
                                    current_estimate=initial_guess,
                                    objective_function=objective_function_1))

results_dict = {0: [initial_cost, initial_guess]}

current_estimate = np.copy(initial_guess)

best_rmsn = np.copy(initial_cost)

np.random.seed(55)

# measure time - start

t_start = timeit.default_timer()

for k in range(max_iterations):
Exemplo n.º 3
0
a = 4.833
A = 30

objective_function_1 = 'pax_trips_unlinked_rmsn'
objective_function_2 = 'pass_trans_total_combined_rmsn'

objective_function_count = {objective_function_1: 0, objective_function_2: 0}

# initial guesses

initial_guess = [1.0, 2.0, 2.0, 2.0, 5.0]  # [in_vehicle, transfer_walk, origin_wait, transfer_wait, transfer_penalty]
initial_cost_dict = sgs.runAssignmentCalculateErrorRMSN_all_error_terms(Visum=Visum, estimateList=initial_guess,
                                                                        obs_stops_df=observed_stop_df,
                                                                        obs_line_routes=observed_line_route_df)
initial_cost = initial_cost_dict[objective_function_1]
results_all_df = results_all_df.append(sgs.parse_error_from_dict_to_df(initial_cost_dict, initial_guess))

results_dict = {0: [initial_cost, initial_guess]}

current_estimate = np.copy(initial_guess)
best_estimate = np.copy(initial_guess)
best_rmsn = np.copy(initial_cost)

np.random.seed(55)

# measure time - start

t_start = timeit.default_timer()

for k in range(max_iterations):