From c2ae098d34955277ca2da42f784139a2285814ce Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Wed, 28 Nov 2018 10:56:33 +0100 Subject: [PATCH] Apply yapf on examples/python/*.py --- examples/python/appointments.py | 10 +- examples/python/assignment_sat.py | 23 +- .../python/assignment_with_constraints_sat.py | 17 +- examples/python/balance_group_sat.py | 4 +- examples/python/chemical_balance_lp.py | 10 +- examples/python/chemical_balance_sat.py | 6 +- examples/python/cvrp.py | 4 +- examples/python/cvrp_reload.py | 19 +- examples/python/cvrptw.py | 22 +- examples/python/cvrptw_plot.py | 18 +- examples/python/flexible_job_shop_sat.py | 6 +- examples/python/gate_scheduling_sat.py | 10 +- examples/python/golomb8.py | 4 +- examples/python/hidato_sat.py | 26 +- examples/python/integer_programming.py | 4 +- examples/python/jobshop_ft06_distance_sat.py | 4 +- examples/python/knapsack.py | 18 +- examples/python/linear_assignment_api.py | 3 +- examples/python/linear_programming.py | 15 +- examples/python/nqueens_sat.py | 3 +- examples/python/nurses_sat.py | 8 +- examples/python/pyflow_example.py | 7 +- examples/python/qubo_sat.py | 1163 ++++++++--------- examples/python/random_tsp.py | 4 +- examples/python/rcpsp_sat.py | 17 +- examples/python/shift_scheduling_sat.py | 10 +- ...duling_with_setup_release_due_dates_sat.py | 13 +- examples/python/steel_mill_slab_sat.py | 43 +- examples/python/stigler_diet.py | 341 +++-- examples/python/sudoku_sat.py | 8 +- examples/python/task_allocation_sat.py | 443 +++---- .../tasks_and_workers_assignment_sat.py | 3 +- examples/python/transit_time.py | 19 +- examples/python/tsp.py | 4 +- examples/python/vendor_scheduling_sat.py | 21 +- examples/python/vrp.py | 4 +- examples/python/vrpgs.py | 4 +- examples/python/wedding_optimal_chart_sat.py | 53 +- examples/python/worker_schedule_sat.py | 185 ++- 39 files changed, 1168 insertions(+), 1408 deletions(-) diff --git a/examples/python/appointments.py b/examples/python/appointments.py index aede63f771..09e704c151 100644 --- a/examples/python/appointments.py +++ b/examples/python/appointments.py @@ -133,11 +133,10 @@ def get_optimal_schedule(demand, args): """Computes the optimal schedule for the appointment selection problem.""" combinations = find_combinations([a[2] for a in demand], args.load_min, args.load_max, args.commute_time) - print( - 'found %d possible combinations of appointements' % len(combinations)) + print('found %d possible combinations of appointements' % len(combinations)) - cost, selection = select(combinations, [a[0] for a in demand], - args.num_workers) + cost, selection = select(combinations, [a[0] + for a in demand], args.num_workers) output = [(selection[i], [(combinations[i][t], demand[t][1]) for t in range(len(demand)) if combinations[i][t] != 0]) @@ -152,8 +151,7 @@ def main(args): for a in demand: print(' %d * %s : %d min' % (a[0], a[1], a[2])) print('commute time = %d' % args.commute_time) - print( - 'accepted total duration = [%d..%d]' % (args.load_min, args.load_max)) + print('accepted total duration = [%d..%d]' % (args.load_min, args.load_max)) print('%d workers' % args.num_workers) cost, selection = get_optimal_schedule(demand, args) print('Optimal solution as a cost of %d' % cost) diff --git a/examples/python/assignment_sat.py b/examples/python/assignment_sat.py index 75f2bee1d2..78a3cbad2b 100644 --- a/examples/python/assignment_sat.py +++ b/examples/python/assignment_sat.py @@ -17,16 +17,15 @@ from ortools.sat.python import cp_model def main(): # Instantiate a cp model. - cost = [[90, 76, 75, 70, 50, 74, 12, - 68], [35, 85, 55, 65, 48, 101, 70, 83], - [125, 95, 90, 105, 59, 120, 36, 73], - [45, 110, 95, 115, 104, 83, 37, 71], - [60, 105, 80, 75, 59, 62, 93, - 88], [45, 65, 110, 95, 47, 31, 81, 34], - [38, 51, 107, 41, 69, 99, 115, 48], - [47, 85, 57, 71, 92, 77, 109, 36], - [39, 63, 97, 49, 118, 56, 92, 61], - [47, 101, 71, 60, 88, 109, 52, 90]] + cost = [[90, 76, 75, 70, 50, 74, 12, 68], [35, 85, 55, 65, 48, 101, 70, 83], + [125, 95, 90, 105, 59, + 120, 36, 73], [45, 110, 95, 115, 104, 83, 37, + 71], [60, 105, 80, 75, 59, 62, 93, + 88], [45, 65, 110, 95, 47, 31, 81, 34], + [38, 51, 107, 41, 69, 99, 115, + 48], [47, 85, 57, 71, 92, 77, 109, + 36], [39, 63, 97, 49, 118, 56, + 92, 61], [47, 101, 71, 60, 88, 109, 52, 90]] sizes = [10, 7, 3, 12, 15, 4, 11, 5] total_size_max = 15 @@ -55,8 +54,8 @@ def main(): model.Add(sum(sizes[j] * x[i][j] for j in all_tasks) <= total_size_max) # Total cost - model.Add(total_cost == sum( - x[i][j] * cost[i][j] for j in all_tasks for i in all_workers)) + model.Add(total_cost == sum(x[i][j] * cost[i][j] + for j in all_tasks for i in all_workers)) model.Minimize(total_cost) solver = cp_model.CpSolver() diff --git a/examples/python/assignment_with_constraints_sat.py b/examples/python/assignment_with_constraints_sat.py index a0ebf5092b..71f9340f55 100644 --- a/examples/python/assignment_with_constraints_sat.py +++ b/examples/python/assignment_with_constraints_sat.py @@ -20,12 +20,14 @@ from ortools.sat.python import cp_model def solve_assignment(): """Solve the assignment problem.""" # Data. - cost = [[90, 76, 75, 70, 50, 74], [35, 85, 55, 65, 48, 101], - [125, 95, 90, 105, 59, 120], [45, 110, 95, 115, 104, 83], - [60, 105, 80, 75, 59, 62], [45, 65, 110, 95, 47, 31], - [38, 51, 107, 41, 69, 99], [47, 85, 57, 71, 92, 77], - [39, 63, 97, 49, 118, 56], [47, 101, 71, 60, 88, 109], - [17, 39, 103, 64, 61, 92], [101, 45, 83, 59, 92, 27]] + cost = [[90, 76, 75, 70, 50, 74], [35, 85, 55, 65, 48, + 101], [125, 95, 90, 105, 59, 120], + [45, 110, 95, 115, 104, 83], [60, 105, 80, 75, 59, 62], [ + 45, 65, 110, 95, 47, 31 + ], [38, 51, 107, 41, 69, 99], [47, 85, 57, 71, + 92, 77], [39, 63, 97, 49, 118, 56], + [47, 101, 71, 60, 88, 109], [17, 39, 103, 64, 61, + 92], [101, 45, 83, 59, 92, 27]] group1 = [ [0, 0, 1, 1], # Workers 2, 3 @@ -79,8 +81,7 @@ def solve_assignment(): # Total task size for each worker is at most total_size_max for i in all_workers: model.Add( - sum(sizes[j] * selected[i][j] - for j in all_tasks) <= total_size_max) + sum(sizes[j] * selected[i][j] for j in all_tasks) <= total_size_max) # Group constraints. model.AddAllowedAssignments([works[0], works[1], works[2], works[3]], diff --git a/examples/python/balance_group_sat.py b/examples/python/balance_group_sat.py index 6d43d69851..f661932696 100644 --- a/examples/python/balance_group_sat.py +++ b/examples/python/balance_group_sat.py @@ -102,8 +102,8 @@ def main(): item_in_group = {} for i in all_items: for g in all_groups: - item_in_group[(i, g)] = model.NewBoolVar( - 'item %d in group %d' % (i, g)) + item_in_group[(i, g)] = model.NewBoolVar('item %d in group %d' % + (i, g)) # Each group must have the same size. for g in all_groups: diff --git a/examples/python/chemical_balance_lp.py b/examples/python/chemical_balance_lp.py index 8436be98e2..8862092507 100644 --- a/examples/python/chemical_balance_lp.py +++ b/examples/python/chemical_balance_lp.py @@ -30,9 +30,9 @@ max_quantities = [["N_Total", 1944], ["P2O5", 1166.4], ["K2O", 1822.5], ["CaO", 1458], ["MgO", 486], ["Fe", 9.7], ["B", 2.4]] chemical_set = [["A", 0, 0, 510, 540, 0, 0, 0], ["B", 110, 0, 0, 0, 160, 0, 0], - ["C", 61, 149, 384, 0, 30, 1, 0.2], - ["D", 148, 70, 245, 0, 15, 1, 0.2], - ["E", 160, 158, 161, 0, 10, 1, 0.2]] + ["C", 61, 149, 384, 0, 30, 1, + 0.2], ["D", 148, 70, 245, 0, 15, 1, + 0.2], ["E", 160, 158, 161, 0, 10, 1, 0.2]] num_products = len(max_quantities) all_products = range(num_products) @@ -87,6 +87,6 @@ for s in all_sets: for p in all_products: name = max_quantities[p][0] max_quantity = max_quantities[p][1] - quantity = sum(set_vars[s].solution_value() * chemical_set[s][p + 1] - for s in all_sets) + quantity = sum( + set_vars[s].solution_value() * chemical_set[s][p + 1] for s in all_sets) print("%s: %f out of %f" % (name, quantity, max_quantity)) diff --git a/examples/python/chemical_balance_sat.py b/examples/python/chemical_balance_sat.py index 4185ac236d..363513efae 100644 --- a/examples/python/chemical_balance_sat.py +++ b/examples/python/chemical_balance_sat.py @@ -29,9 +29,9 @@ max_quantities = [["N_Total", 1944], ["P2O5", 1166.4], ["K2O", 1822.5], ["CaO", 1458], ["MgO", 486], ["Fe", 9.7], ["B", 2.4]] chemical_set = [["A", 0, 0, 510, 540, 0, 0, 0], ["B", 110, 0, 0, 0, 160, 0, 0], - ["C", 61, 149, 384, 0, 30, 1, 0.2], - ["D", 148, 70, 245, 0, 15, 1, 0.2], - ["E", 160, 158, 161, 0, 10, 1, 0.2]] + ["C", 61, 149, 384, 0, 30, 1, + 0.2], ["D", 148, 70, 245, 0, 15, 1, + 0.2], ["E", 160, 158, 161, 0, 10, 1, 0.2]] num_products = len(max_quantities) all_products = range(num_products) diff --git a/examples/python/cvrp.py b/examples/python/cvrp.py index ba7671759a..ba0c34a641 100755 --- a/examples/python/cvrp.py +++ b/examples/python/cvrp.py @@ -76,8 +76,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): diff --git a/examples/python/cvrp_reload.py b/examples/python/cvrp_reload.py index 02f389c182..58c2765fa6 100755 --- a/examples/python/cvrp_reload.py +++ b/examples/python/cvrp_reload.py @@ -114,8 +114,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): @@ -198,9 +198,8 @@ def create_time_evaluator(data): if from_node == to_node: travel_time = 0 else: - travel_time = manhattan_distance( - data['locations'][from_node], - data['locations'][to_node]) / data['vehicle_speed'] + travel_time = manhattan_distance(data['locations'][from_node], data[ + 'locations'][to_node]) / data['vehicle_speed'] return travel_time _total_time = {} @@ -212,8 +211,8 @@ def create_time_evaluator(data): _total_time[from_node][to_node] = 0 else: _total_time[from_node][to_node] = int( - service_time(data, from_node) + - travel_time(data, from_node, to_node)) + service_time(data, from_node) + travel_time( + data, from_node, to_node)) def time_evaluator(manager, from_node, to_node): """Returns the total time between the two nodes""" @@ -279,7 +278,8 @@ def print_solution(data, manager, routing, assignment): # pylint:disable=too-ma load_var = capacity_dimension.CumulVar(index) time_var = time_dimension.CumulVar(index) plan_output += ' {0} Load({1}) Time({2},{3}) ->'.format( - manager.IndexToNode(index), assignment.Value(load_var), + manager.IndexToNode(index), + assignment.Value(load_var), assignment.Min(time_var), assignment.Max(time_var)) previous_index = index index = assignment.Value(routing.NextVar(index)) @@ -288,7 +288,8 @@ def print_solution(data, manager, routing, assignment): # pylint:disable=too-ma load_var = capacity_dimension.CumulVar(index) time_var = time_dimension.CumulVar(index) plan_output += ' {0} Load({1}) Time({2},{3})\n'.format( - manager.IndexToNode(index), assignment.Value(load_var), + manager.IndexToNode(index), + assignment.Value(load_var), assignment.Min(time_var), assignment.Max(time_var)) plan_output += 'Distance of the route: {}m\n'.format(distance) plan_output += 'Load of the route: {}\n'.format( diff --git a/examples/python/cvrptw.py b/examples/python/cvrptw.py index 297b368adb..0f11b43ad2 100755 --- a/examples/python/cvrptw.py +++ b/examples/python/cvrptw.py @@ -88,8 +88,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): @@ -147,9 +147,8 @@ def create_time_evaluator(data): if from_node == to_node: travel_time = 0 else: - travel_time = manhattan_distance( - data['locations'][from_node], - data['locations'][to_node]) / data['vehicle_speed'] + travel_time = manhattan_distance(data['locations'][from_node], data[ + 'locations'][to_node]) / data['vehicle_speed'] return travel_time _total_time = {} @@ -161,8 +160,8 @@ def create_time_evaluator(data): _total_time[from_node][to_node] = 0 else: _total_time[from_node][to_node] = int( - service_time(data, from_node) + - travel_time(data, from_node, to_node)) + service_time(data, from_node) + travel_time( + data, from_node, to_node)) def time_evaluator(manager, from_node, to_node): """Returns the total time between the two nodes""" @@ -222,8 +221,10 @@ def print_solution(data, manager, routing, assignment): # pylint:disable=too-ma time_var = time_dimension.CumulVar(index) slack_var = time_dimension.SlackVar(index) plan_output += ' {0} Load({1}) Time({2},{3}) Slack({4},{5}) ->'.format( - manager.IndexToNode(index), assignment.Value(load_var), - assignment.Min(time_var), assignment.Max(time_var), + manager.IndexToNode(index), + assignment.Value(load_var), + assignment.Min(time_var), + assignment.Max(time_var), assignment.Min(slack_var), assignment.Max(slack_var)) previous_index = index index = assignment.Value(routing.NextVar(index)) @@ -233,7 +234,8 @@ def print_solution(data, manager, routing, assignment): # pylint:disable=too-ma time_var = time_dimension.CumulVar(index) slack_var = time_dimension.SlackVar(index) plan_output += ' {0} Load({1}) Time({2},{3})\n'.format( - manager.IndexToNode(index), assignment.Value(load_var), + manager.IndexToNode(index), + assignment.Value(load_var), assignment.Min(time_var), assignment.Max(time_var)) plan_output += 'Distance of the route: {0}m\n'.format(distance) plan_output += 'Load of the route: {}\n'.format( diff --git a/examples/python/cvrptw_plot.py b/examples/python/cvrptw_plot.py index 7b5de8fba2..824b3ae8db 100644 --- a/examples/python/cvrptw_plot.py +++ b/examples/python/cvrptw_plot.py @@ -92,10 +92,10 @@ class Customers(): self.extents = extents #: The lower left and upper right points #: Location[lat,lon]: the centre point of the area. self.center = Location( - extents['urcrnrlat'] - - 0.5 * (extents['urcrnrlat'] - extents['llcrnrlat']), - extents['urcrnrlon'] - - 0.5 * (extents['urcrnrlon'] - extents['llcrnrlon'])) + extents['urcrnrlat'] - 0.5 * + (extents['urcrnrlat'] - extents['llcrnrlat']), + extents['urcrnrlon'] - 0.5 * + (extents['urcrnrlon'] - extents['llcrnrlon'])) else: #: Location[lat,lon]: the centre point of the area. (clat, clon) = self.center = Location(center[0], center[1]) @@ -103,14 +103,12 @@ class Customers(): circ_earth = np.pi * rad_earth #: The lower left and upper right points self.extents = { - 'llcrnrlon': - (clon - - 180 * box_size / (circ_earth * np.cos(np.deg2rad(clat)))), + 'llcrnrlon': (clon - 180 * box_size / + (circ_earth * np.cos(np.deg2rad(clat)))), 'llcrnrlat': clat - 180 * box_size / circ_earth, - 'urcrnrlon': - (clon + - 180 * box_size / (circ_earth * np.cos(np.deg2rad(clat)))), + 'urcrnrlon': (clon + 180 * box_size / + (circ_earth * np.cos(np.deg2rad(clat)))), 'urcrnrlat': clat + 180 * box_size / circ_earth } diff --git a/examples/python/flexible_job_shop_sat.py b/examples/python/flexible_job_shop_sat.py index 87aa7319a7..28c89374d8 100644 --- a/examples/python/flexible_job_shop_sat.py +++ b/examples/python/flexible_job_shop_sat.py @@ -38,9 +38,9 @@ def flexible_jobshop(): jobs = [[[(3, 0), (1, 1), (5, 2)], [(2, 0), (4, 1), (6, 2)], [(2, 0), (3, 1), (1, 2)]], [[(2, 0), (3, 1), (4, 2)], [(1, 0), (5, 1), (4, 2)], - [(2, 0), (1, 1), (4, 2)]], - [[(2, 0), (1, 1), (4, 2)], [(2, 0), (3, 1), (4, 2)], - [(3, 0), (1, 1), (5, 2)]]] + [(2, 0), (1, 1), (4, 2)]], [[(2, 0), (1, 1), + (4, 2)], [(2, 0), (3, 1), (4, 2)], + [(3, 0), (1, 1), (5, 2)]]] num_jobs = len(jobs) all_jobs = range(num_jobs) diff --git a/examples/python/gate_scheduling_sat.py b/examples/python/gate_scheduling_sat.py index 22d198cd77..6b226519ff 100644 --- a/examples/python/gate_scheduling_sat.py +++ b/examples/python/gate_scheduling_sat.py @@ -51,8 +51,7 @@ def main(): start = model.NewIntVar(0, horizon, 'start_%i' % i) duration = jobs[i][0] end = model.NewIntVar(0, horizon, 'end_%i' % i) - interval = model.NewIntervalVar(start, duration, end, - 'interval_%i' % i) + interval = model.NewIntervalVar(start, duration, end, 'interval_%i' % i) starts.append(start) intervals.append(interval) ends.append(end) @@ -114,8 +113,7 @@ def main(): d_y = jobs[i][1] s_y = performed_machine * (max_length - d_y) output.AddRectangle(start, s_y, d_x, d_y, - color_manager.RandomColor(), 'black', - 'j%i' % i) + color_manager.RandomColor(), 'black', 'j%i' % i) output.AddXScale() output.AddYScale() @@ -126,8 +124,8 @@ def main(): for i in all_jobs: performed_machine = 1 - solver.Value(performed[i]) start = solver.Value(starts[i]) - print(' - Job %i starts at %i on machine %i' % - (i, start, performed_machine)) + print(' - Job %i starts at %i on machine %i' % (i, start, + performed_machine)) print('Statistics') print(' - conflicts : %i' % solver.NumConflicts()) print(' - branches : %i' % solver.NumBranches()) diff --git a/examples/python/golomb8.py b/examples/python/golomb8.py index ac4c81f896..27dffbde59 100644 --- a/examples/python/golomb8.py +++ b/examples/python/golomb8.py @@ -42,8 +42,8 @@ def main(): solver.Add(marks[0] == 0) solver.Add( solver.AllDifferent([ - marks[j] - marks[i] for i in range(0, size - 1) - for j in range(i + 1, size) + marks[j] - marks[i] + for i in range(0, size - 1) for j in range(i + 1, size) ])) solver.Add(marks[size - 1] - marks[size - 2] > marks[1] - marks[0]) diff --git a/examples/python/hidato_sat.py b/examples/python/hidato_sat.py index f12a6de2f6..1bc30a3489 100644 --- a/examples/python/hidato_sat.py +++ b/examples/python/hidato_sat.py @@ -31,10 +31,13 @@ def build_pairs(rows, cols): rows: the number of rows in the grid cols: the number of columns in the grid """ - return [(x * cols + y, (x + dx) * cols + (y + dy)) for x in range(rows) - for y in range(cols) for dx in (-1, 0, 1) for dy in (-1, 0, 1) - if (x + dx >= 0 and x + dx < rows and y + dy >= 0 and y + dy < cols - and (dx != 0 or dy != 0))] + return [ + (x * cols + y, (x + dx) * cols + (y + dy)) + for x in range(rows) for y in range(cols) for dx in (-1, 0, 1) + for dy in (-1, 0, 1) + if (x + dx >= 0 and x + dx < rows and y + dy >= 0 and y + dy < cols and + (dx != 0 or dy != 0)) + ] def print_solution(positions, rows, cols): @@ -80,8 +83,8 @@ def build_puzzle(problem): elif problem == 2: puzzle = [[0, 44, 41, 0, 0, 0, 0], [0, 43, 0, 28, 29, 0, 0], [0, 1, 0, 0, 0, 33, 0], [0, 2, 25, 4, 34, 0, 36], - [49, 16, 0, 23, 0, 0, 0], [0, 19, 0, 0, 12, 7, 0], - [0, 0, 0, 14, 0, 0, 0]] + [49, 16, 0, 23, 0, 0, 0], [0, 19, 0, 0, 12, 7, + 0], [0, 0, 0, 14, 0, 0, 0]] elif problem == 3: # Problems from the book: @@ -103,9 +106,10 @@ def build_puzzle(problem): elif problem == 6: # Problem 15 (Intermediate) puzzle = [[64, 0, 0, 0, 0, 0, 0, 0], [1, 63, 0, 59, 15, 57, 53, 0], - [0, 4, 0, 14, 0, 0, 0, 0], [3, 0, 11, 0, 20, 19, 0, 50], - [0, 0, 0, 0, 22, 0, 48, 40], [9, 0, 0, 32, 23, 0, 0, 41], - [27, 0, 0, 0, 36, 0, 46, 0], [28, 30, 0, 35, 0, 0, 0, 0]] + [0, 4, 0, 14, 0, 0, 0, 0], [3, 0, 11, 0, 20, 19, 0, + 50], [0, 0, 0, 0, 22, 0, 48, 40], + [9, 0, 0, 32, 23, 0, 0, 41], [27, 0, 0, 0, 36, 0, 46, + 0], [28, 30, 0, 35, 0, 0, 0, 0]] return puzzle @@ -168,8 +172,8 @@ def solve_hidato(puzzle, index): output.AddRectangle(x, r - y - 1, 1, 1, color, 'black', str(i + 1)) - output.AddTitle( - 'Puzzle %i solved in %f s' % (index, solver.WallTime())) + output.AddTitle('Puzzle %i solved in %f s' % (index, + solver.WallTime())) output.Display() else: print_solution( diff --git a/examples/python/integer_programming.py b/examples/python/integer_programming.py index 7ea2fbc667..6f3a6e5149 100644 --- a/examples/python/integer_programming.py +++ b/examples/python/integer_programming.py @@ -80,8 +80,8 @@ def SolveAndPrint(solver, variable_list): def Announce(solver, api_type): - print(('---- Integer programming example with ' + solver + ' (' + api_type - + ') -----')) + print(('---- Integer programming example with ' + solver + ' (' + api_type + + ') -----')) def RunAllIntegerExampleNaturalLanguageAPI(): diff --git a/examples/python/jobshop_ft06_distance_sat.py b/examples/python/jobshop_ft06_distance_sat.py index 06c12ab0c0..7b5867505b 100644 --- a/examples/python/jobshop_ft06_distance_sat.py +++ b/examples/python/jobshop_ft06_distance_sat.py @@ -102,8 +102,8 @@ def jobshop_ft06_distance(): # We add the reified precedence to link the literal with the # times of the two tasks. min_distance = distance_between_jobs(j1, j2) - model.Add(job_starts[j2] >= job_ends[j1] + - min_distance).OnlyEnforceIf(lit) + model.Add(job_starts[j2] >= + job_ends[j1] + min_distance).OnlyEnforceIf(lit) model.AddCircuit(arcs) diff --git a/examples/python/knapsack.py b/examples/python/knapsack.py index 5437721fb1..cb4adaac07 100644 --- a/examples/python/knapsack.py +++ b/examples/python/knapsack.py @@ -21,23 +21,23 @@ def main(): pywrapknapsack_solver.KnapsackSolver. KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER, 'test') profits = [ - 360, 83, 59, 130, 431, 67, 230, 52, 93, 125, 670, 892, 600, 38, 48, - 147, 78, 256, 63, 17, 120, 164, 432, 35, 92, 110, 22, 42, 50, 323, 514, - 28, 87, 73, 78, 15, 26, 78, 210, 36, 85, 189, 274, 43, 33, 10, 19, 389, - 276, 312 + 360, 83, 59, 130, 431, 67, 230, 52, 93, 125, 670, 892, 600, 38, 48, 147, + 78, 256, 63, 17, 120, 164, 432, 35, 92, 110, 22, 42, 50, 323, 514, 28, + 87, 73, 78, 15, 26, 78, 210, 36, 85, 189, 274, 43, 33, 10, 19, 389, 276, + 312 ] weights = [[ - 7, 0, 30, 22, 80, 94, 11, 81, 70, 64, 59, 18, 0, 36, 3, 8, 15, 42, 9, - 0, 42, 47, 52, 32, 26, 48, 55, 6, 29, 84, 2, 4, 18, 56, 7, 29, 93, 44, - 71, 3, 86, 66, 31, 65, 0, 79, 20, 65, 52, 13 + 7, 0, 30, 22, 80, 94, 11, 81, 70, 64, 59, 18, 0, 36, 3, 8, 15, 42, 9, 0, + 42, 47, 52, 32, 26, 48, 55, 6, 29, 84, 2, 4, 18, 56, 7, 29, 93, 44, 71, + 3, 86, 66, 31, 65, 0, 79, 20, 65, 52, 13 ]] capacities = [850] optimal_profit = 7534 solver.Init(profits, weights, capacities) computed_profit = solver.Solve() - print(('optimal profit = ' + str(computed_profit) + '/' + - str(optimal_profit))) + print(( + 'optimal profit = ' + str(computed_profit) + '/' + str(optimal_profit))) if __name__ == '__main__': diff --git a/examples/python/linear_assignment_api.py b/examples/python/linear_assignment_api.py index 75b33338e9..e497ab4e61 100644 --- a/examples/python/linear_assignment_api.py +++ b/examples/python/linear_assignment_api.py @@ -46,8 +46,7 @@ def RunAssignmentOn4x4Matrix(): print('No perfect matching exists.') elif solve_status == assignment.POSSIBLE_OVERFLOW: print( - 'Some input costs are too large and may cause an integer overflow.' - ) + 'Some input costs are too large and may cause an integer overflow.') def main(): diff --git a/examples/python/linear_programming.py b/examples/python/linear_programming.py index 8e93466091..40740e7c72 100644 --- a/examples/python/linear_programming.py +++ b/examples/python/linear_programming.py @@ -70,12 +70,15 @@ def main(): print('x: reduced cost =', x.reduced_cost()) print('y: reduced cost =', y.reduced_cost()) activities = solver.ComputeConstraintActivities() - print('constraint0: dual value =', constraint0.dual_value(), - ' activities =', activities[constraint0.index()]) - print('constraint1: dual value =', constraint1.dual_value(), - ' activities =', activities[constraint1.index()]) - print('constraint2: dual value =', constraint2.dual_value(), - ' activities =', activities[constraint2.index()]) + print('constraint0: dual value =', + constraint0.dual_value(), ' activities =', + activities[constraint0.index()]) + print('constraint1: dual value =', + constraint1.dual_value(), ' activities =', + activities[constraint1.index()]) + print('constraint2: dual value =', + constraint2.dual_value(), ' activities =', + activities[constraint2.index()]) if __name__ == '__main__': diff --git a/examples/python/nqueens_sat.py b/examples/python/nqueens_sat.py index f459190d9d..aab8560930 100644 --- a/examples/python/nqueens_sat.py +++ b/examples/python/nqueens_sat.py @@ -53,8 +53,7 @@ def main(board_size): # Creates the variables. # The array index is the column, and the value is the row. queens = [ - model.NewIntVar(0, board_size - 1, 'x%i' % i) - for i in range(board_size) + model.NewIntVar(0, board_size - 1, 'x%i' % i) for i in range(board_size) ] # Creates the constraints. diff --git a/examples/python/nurses_sat.py b/examples/python/nurses_sat.py index 9f7308a6c0..6f07bbe4eb 100644 --- a/examples/python/nurses_sat.py +++ b/examples/python/nurses_sat.py @@ -63,8 +63,8 @@ def main(): for n in all_nurses: for d in all_days: for s in all_shifts: - shifts[(n, d, - s)] = model.NewBoolVar('shift_n%id%is%i' % (n, d, s)) + shifts[(n, d, s)] = model.NewBoolVar('shift_n%id%is%i' % (n, d, + s)) # Makes assignments different on each day, that is each shift is assigned at # most one nurse. As we have the same number of nurses and shifts, then each @@ -88,8 +88,8 @@ def main(): works_shift = {} for n in all_nurses: for s in all_shifts: - works_shift[(n, - s)] = model.NewBoolVar('works_shift_n%is%i' % (n, s)) + works_shift[(n, s)] = model.NewBoolVar('works_shift_n%is%i' % (n, + s)) model.AddMaxEquality(works_shift[(n, s)], [shifts[(n, d, s)] for d in all_days]) diff --git a/examples/python/pyflow_example.py b/examples/python/pyflow_example.py index e3544b86b5..53a0d86abe 100644 --- a/examples/python/pyflow_example.py +++ b/examples/python/pyflow_example.py @@ -63,9 +63,10 @@ def MinCostFlow(): print('Total flow', min_cost_flow.OptimalCost(), '/', expected_cost) for i in range(0, min_cost_flow.NumArcs()): if min_cost_flow.Flow(i) > 0: - print('From source %d to target %d: cost %d' % ( - min_cost_flow.Tail(i), min_cost_flow.Head(i) - num_sources, - min_cost_flow.UnitCost(i))) + print('From source %d to target %d: cost %d' % + (min_cost_flow.Tail(i), + min_cost_flow.Head(i) - num_sources, + min_cost_flow.UnitCost(i))) else: print('There was an issue with the min cost flow input.') diff --git a/examples/python/qubo_sat.py b/examples/python/qubo_sat.py index 744a663e1f..bb91060a70 100644 --- a/examples/python/qubo_sat.py +++ b/examples/python/qubo_sat.py @@ -6,641 +6,534 @@ import time from ortools.sat.python import cp_model - -RAW_DATA = [ - [ - 0, 0, 49.774821, -59.5968886, -46.0773896, 0, -65.166109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 47.0957778, 15.259961, -98.7983264, 0, 0, 0, - -20.7757184, 0, 87.2645672, 0, -22.7888772, 0, 0, 0, -40.4980904, - -19.7307486, -23.222078, 0, -77.5263128, 0, 0, 56.6204008, 0, 0, 0, 0, - 0, 0, 0, 31.378421, 0, 97.3441448, 35.1309806, 0, 0, -40.5727886, - -50.7308566, 0, 0, -69.9304568, 0, 38.5385914, 0, -22.1243232, 0, 0, 0, - 0, -62.5102538, 8.0801276, 46.7998066, -2.3292106, 0, 0, 0, 8.774031, - 0, 0, -65.6505736 - ], - [ - -67.2935466, -64.4354852, -96.6712204, 0, 0, -60.7812272, 0, 0, 0, 0, - 0, -7.9966864, 0, 0, 0, 0, 0, 0, 0, 89.7672338, 0, 0, 0, 0, 98.9607046, - 0, 28.6714432, 0, 0, 0, -26.2738856, 0, 0, 68.363956, 0, 0, 0, 0, - 54.7406868, 0, 0, 0, 0, 94.2320734, 0, 0, 0, 0, 0, 0, 0, 0, -2.9647794, - 39.7161716, -54.7931288, 0, 0, 0, 0, -47.2284892, 0, 0, 0, -8.6421808, - -35.399612, 0, 0, 62.1912668, 0, -6.8930716, 0, 0, -17.0801284, 0, 0, - 68.6533416 - ], - [ - 0, 0, 0, 81.165396, 83.773254, 0, -25.1603, 0, 0, 50.225725, 0, - -3.8242274, 0, 0, 36.2078566, 0, 0, 0, 0, 0, 0, 0, 0, 15.551432, 0, 0, - -33.6446236, 0, 0, 0, 36.6171324, 0, 0, 0, 0, 67.9591934, 0, - 22.1428016, 0, -27.2961928, 0, 0, 0, -97.4961564, 90.4062526, 0, 0, 0, - -90.0532814, 0, 98.8332924, 0, 0, -13.8994926, 0, 17.1962884, 0, 0, 0, - -55.1654678, 0, 0, 0, 85.829554, 0, -37.971164, 64.233136, -17.9943296, - 0, 0, 0, 0, -67.7509796, 0, 0, 10.0750712 - ], - [ - 0, 37.2783148, 0, 0, 0, 36.4959506, 0, 0, 0, 0, 0, 0, 61.201323, 0, - 14.4328522, 48.4078064, 0, 0, 0, 0, 0, 0, 0, -47.0969056, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 26.720439, 0, 0, 62.1987576, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -65.2085246, 0, 0, 0, 0, 0, 0, 73.3019432, -14.3431238, - 0, 0, 0, 0, 0, 0, 0, 0, 2.1565846, 0, 0, 0.7733644, 0, 5.9090456, 0, - -39.7724192 - ], - [ - 0, 0, 0, 0, -24.4555532, 0, 0, -5.5484574, 0, 25.4685054, 0.7906104, - 4.273133, 0, 52.12973, 0, -12.8040828, 0, 0, 81.888381, 64.0713498, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62.9088768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20.869713, 0, 0, -71.5835872, 0, 0, 80.7237808, 0, 0, 0, 0, - -60.1883708, 0, 0, 0, 0, 0, 0, 0, 0, 85.0393326, 23.6045316, - -18.8849834, 0, 0, 0, -90.8065188, -9.5037982, 14.3196654, 0, - -28.9290306, 0, 0, -41.5575766 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8.9478934, 0, - -83.6040618, 0, 0, 0, 0, -14.3874822, 77.2528714, 0, 0, 99.2966066, 0, - 21.7889114, -37.7629282, 0, -11.6026582, 0, 0, 0, 0, 74.422603, 0, 0, - -79.239245, -31.9686324, 0, 0, 0, 0, 0, 0, -29.8797178, 0, 0, - 85.2723062, 0, 0, -8.8031188, 0, 0, -20.043565, 0, 0, -70.733454, 0, - -94.7231762, -85.4584516, 0, 0, 0, 0, -27.6068624, 0, -79.787783, 0, 0, - -55.1894266 - ], - [ - 1.9374354, 0, 1.4807184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 61.298952, 0, 0, 0, -90.5702054, 0, 67.381115, 0, -68.684637, 0, 0, - 0, 0, 0, 0, 0, 0, 93.7807934, 0, 8.8213302, -15.9020466, 0, 0, 0, 0, - 23.8157662, 0, 0, 0, 0, 0, 0, 0, 67.3461972, 0, 0, 0, 0, 0, 43.3263744, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87.7149706, 0, 0, 0, -18.5133574, - -30.0338992 - ], - [ - 6.3937798, 78.7697644, 28.4485838, 0, 0, 0.1352466, 0, 0, 74.5767122, - -13.8340168, 0, 0, 0, 77.2929426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17.9243834, 0, 0, 82.2239878, 0, 0, 0, 0, 64.3440016, 90.109577, - 46.8926522, -2.4494366, 0, 84.7413412, 0, 0, -4.216108, 0, 0, - -79.8684776, 0, 0, 74.8706758, -64.4518992, 0, 0, 0, 0, -34.4895004, 0, - 0, 0, -74.1158858, -37.7803516, 0, 0, 0, 0, 0, 80.0054296, 0, 0, 0, 0, - 0, 0, 0, 0, -84.5832026, 0, 0, 71.2540694 - ], - [ - 0, 0, 0, 0, -74.9257454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 14.9675444, 0, 0, 0, 0, 0, -27.5236912, 0, 0, -80.4993438, 0, - -81.8494538, 0, 0, 0, 0, 0, -18.6802002, 0, 0, 0, 0, 0, 0, 0, - 61.4131076, 0, 0, -55.1421034, 0, 0, -18.576761, 72.3500914, 0, 0, 0, - 0, 0, 0, -23.6460116, 43.1258024, 0, 93.701872, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -86.5772554 - ], - [ - 0, 0, 93.0762916, 0, 0, 0, 0, 0, 0, 0, -37.2663938, 86.8303764, 0, 0, - 0, -51.9596226, 0, 35.6722618, -91.438259, 0, 0, -70.6277108, 0, - -82.9146992, 58.0327648, 0, 0, 0, 0, 0, 0, 0, 0, 13.3727302, 0, 0, 0, - 23.5719942, 0, -21.5445476, 74.1541634, 60.6365036, 97.4447708, 0, 0, - 0, 0, 82.5869498, 0, 85.1132108, 0, 0, 0, 0, 0, 0, 97.4012534, 0, 0, 0, - 0, -45.1504048, 1.0619934, 59.7140264, 0, 0, 0, 0, 0, 4.177461, 0, 0, - 0, -75.7039276, 0, 0.0421338 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -71.171869, 0, 0, 8.685266, 0, 0, 0, 0, - 33.9089574, 0, -31.6154498, 0, 0, 0, 0, 0, 5.3182746, 0, 0, 0, 0, 0, 0, - 3.0361166, -10.364305, 0, 0, 0, 0, 0, 0, 0, 0, -83.9738444, 0, 0, - -7.9170212, 0, 0, 0, -28.7575682, 0, 0, 0, -29.9216686, 0, 0, - 83.4050918, -39.5247364, -6.7028846, 0, 0, 0, -23.6080482, 0, 0, 0, 0, - 0, 0, -18.380154, 46.9252306, 0, 0, 26.1618372, 99.6235254 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 52.008307, 0, 0, 0, 0, 0, 92.4974102, -76.3015714, - 0, 0, 0, 0, 0, 0, 0, -56.4879132, 0, 0, 0, 50.1473938, 0, 0, 0, 0, 0, - 0, 0, 0, 40.2219566, 0, 0, 0, 84.5162074, 0, 0, 0, -73.3030606, 0, - -10.9258316, 0, 0, 0, 0, 97.5496436, -70.5026182, 0, 62.3611696, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96.4362226, 0, 0, 0, 0, 0, 0, 0, - -6.0104764, 15.7466756 - ], - [ - -38.7678174, 0, 0, 0, 0, 10.5238486, 0, 0, 0, 31.6876676, 79.6111978, - 0, 0, 0, 0, 45.7314046, 0, 0, 0, -10.0125122, 0, 93.3170242, - -96.4566224, -5.853298, 0, -82.2848728, 0, 0, 0, 0, 0, 0, 0, - 43.3427638, 24.6186934, 0, 44.859548, 0, -63.8196424, 0, 32.6630616, - 41.48423, 0, -42.9613722, 0, 0, -68.8954844, 0, 0, 0, 0, 0, 0, 0, 0, - 27.7424034, -33.4867534, -49.1827758, 0, 18.7014116, 0, 0, 59.049662, - 0, 0, 0, 0, 0, 0, -29.6305028, 0, 0, 0, 0, 0, 98.2266078 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -14.6583468, 0, -74.4490466, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -94.9604028, 0, 0, -48.28403, -41.3534342, 0, 0, 0, - 62.9532972, 0, 0, 4.030284, 0, -60.478996, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -46.5887848, 39.4565458, 0, 0, 0, 0, 0, 0, 0, - -48.5071236, 0, 0, 0, 41.8640204, 0, 0, 0, 74.271524, 0, 15.5769242, 0, - -61.4793904, 52.4500934 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50.8387116, 0, 46.490051, 0, -54.9751352, - 0, 43.0696416, 0, 0, 0, 0, 80.5337704, 0, 0, -16.0325234, 0, 0, 0, 0, - 0, 0, 0, 0, 63.186351, 0, 0, 0, 0, 0, 75.2218604, -27.3783446, 0, 0, 0, - 0, -85.021934, 60.9043202, 55.7344594, 0, 41.1687556, 0, 5.574124, 0, - 0, -5.0028254, -40.2614834, 0, 0, 0, 0, 0, 0, 22.207679, 0, 0, 0, 0, 0, - 65.0504204, 0, -61.4580018, -90.137276, 19.2277196, 0, 0, -73.8615034 - ], - [ - 0, 0, 0, 0, 0, -21.3303052, -75.4586018, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 84.6730538, -3.4478344, 0, -76.083503, - 19.9372656, -38.9938322, 0, 0, 36.0135034, 0, -56.8457144, 0, 0, - 63.4198336, 0, 0, 0, 0, 0, -63.4419798, 28.5629988, 0, 0, 0, 0, - 38.8001126, 0, 0, 47.2148438, 0, -19.256673, -24.8778354, -47.8193252, - 0, 0, -38.7279908, 0, 0, 0, -34.5546658, 0, -96.7675822, 0, 0, 0, 0, 0, - 0, 0, 0, 27.9437518 - ], - [ - 0, -17.8703906, 0, 0, -47.2114204, 0, -73.3595682, 66.668341, 0, 0, 0, - 0, 30.250278, 0, -40.452007, 0, 0, 0, 0, 0, -37.5013244, 34.3045856, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12.898457, - -15.2838318, 0, 0, 0, 0, 0, 16.333021, 0, 72.0452526, 0, 2.285458, 0, - 0, 0, 0, -17.8073046, 0, 0, 0, 81.7271146, 0, 0, -17.7174538, 0, - -62.6694996, 8.7298318, 0, 0, 0, 0, 0, 0, -27.1131974, 0, -68.0964272 - ], - [ - 0, 0, 0, 0, -22.1791216, 16.588597, -19.4545486, 0, -74.8318248, - -74.4252462, 0, 0, 0, -46.1656546, 0, 0, -21.1620788, 0, -25.6883764, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 34.5550634, 0, 0, 0, 0, 93.8894398, 0, - -30.961635, 0, 0, 0, 0, 0, 78.594791, 0, 0, -63.3427616, 52.6543374, 0, - 0, 38.4578962, 0, 0, -56.5589394, 0, 0, 0.6873802, 0, -83.496155, 0, 0, - 0, 13.0737006, 0, -41.7343216, 71.8170636, 69.0276666, 0, 0, 57.722026, - 0, 0, -93.1746526, 0, 0, 0, 0, -49.9838934 - ], - [ - 0, 4.2310134, -77.9001854, -57.1049418, 0, 53.3411444, 0, 0, - 62.3456148, 0, 0, 68.2636062, 0, 0, -97.5234598, 0, 87.5610236, 0, 0, - 0, 0, -77.3855948, 0, 0, -90.724008, 28.2231562, 0, 53.026918, 0, 0, 0, - -76.15995, 0, 0, 0, 15.413813, 0, 0, 0, 0, 0, 0, 0, 0, 13.0272308, 0, - 0, -23.9738128, 38.7553414, 0, 30.9290494, -35.5982432, 0, 0, 0, - -45.1103148, 0, 0, 0, 70.158022, 0, 0, 0, 0, 0, 54.120183, 0, 0, 0, - -41.9285314, 0, 0, 0, 0, 14.1035676, 33.7857218 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 63.3716696, 0, 0, 0, 0, 0, 24.0919054, 0, 0, 0, - 0, 0, 0, 0, 0, 11.3748388, 0, 0, 95.3405052, 93.4694228, 0, 0, - -45.255791, 0, 0, 0, 0, 0, 0, 0, 0, -1.0475536, 60.84603, 0, 0, - -10.47761, 0, 26.1100158, -51.9159084, 0, 0, 0, 0, 0, 0, -65.6123578, - 0, -91.0146766, 0, 0, 0, 0, 0, 0, 0, -21.2845524, 0, 35.7297864, 0, 0, - 0, 0, 0, 0, 15.911098, 0, 0, -12.9287238 - ], - [ - 0, 0, 4.6786386, 0, 0, 1.6495644, 0, 0, 0, 26.96434, 0, 0, 0, - 58.7515752, 0, 0, 0, -47.6494254, 0, -54.2669514, 72.894442, 0, 0, - 95.889445, 0, 68.8888298, -66.11831, 0, -23.7891422, 79.7630012, 0, 0, - 0, -63.9280642, 0, 0, 0, 0, -32.1729936, 0, 0, -44.1408756, 0, 0, 0, 0, - -43.6440432, 0, 0, 0, 0, 0, 0, 0, 0, 9.0521906, 0, 0, -26.1975436, 0, - 45.9278082, 0, 0, 29.678958, 0, 0, 0, 0, 0, 5.9131246, -82.314248, 0, - -56.8775976, -43.6011182, 0, -28.0599468 - ], - [ - 44.0699428, 0, -0.2569744, 0, 0, 0, 10.53932, 0, -89.8739242, 0, 0, 0, - 0, -39.5334882, -60.036911, 96.86551, 0, -59.6306248, 0, 76.9520134, 0, - 0, 0, 0, 0, 55.2369732, 0, 0, 0, 0, -41.8466046, 0, 0, -5.291202, 0, - -18.5051634, 0, 0, 0, 0, 0, 47.1813778, 92.5194464, 90.690835, - 56.7657076, 0, 0, 0, -42.1944794, 0, 0, 0, -69.1124266, 0, 0, 0, 0, 0, - 0, 0, -14.4018142, -36.9699736, 0, 0, 0, 0, 0, 0, 41.4981516, - -1.5870996, 0, -73.7309526, -68.2179518, 0, 5.1895272, -29.7117264 - ], - [ - 90.3158852, 54.7711894, 0, 0, 0, 0, 0, 0, 0, -92.2564004, -20.8178774, - 0, 17.3192726, 0, 2.5685474, 0, 0, 0, 0, -21.96248, 0, -83.8507778, 0, - 0, 0, 0, -81.769375, 0, 0, 0, -73.8973162, 0, 0, 0, 0, 0, 0, - -96.8790628, 0, -29.2883476, 0, 0, -73.2399312, 0, 0, 0, 56.465223, 0, - -10.1549238, 0, 0, 44.7135732, 0, 0, 0, 0, -37.8912668, 61.0703958, 0, - 0, 0, 94.563183, 2.1777518, 0, 0, 0, 0, 0, 0, 69.8987148, 0, 0, 0, - 58.5987754, 0, -73.701682 - ], - [ - 0, 25.7383596, 0, 43.2784374, 0, 0, 0, 0, 0, 0, 0, 65.3498334, 0, - -51.6680898, 0, 0, 0, -32.4960916, 0, -61.8512302, 0, 0, 0, 0, - 66.0087116, 0, 0, 0, 0, 0, -69.5971312, -68.5339006, 0, -87.9115714, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13.6412636, 0, -33.3575526, 0, - -34.6876284, 0, 0, 0, 0, 0, -5.195929, 0, 0, 0, 0, 0, 0, -62.551799, 0, - 0, 0, 0, 0, 0, 0, 0, -85.6796076, 0, -69.9796424 - ], - [ - 0, -67.7487338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -89.686036, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35.3396338, -51.2668318, 0, - 0, -9.4925338, 0, 0, 0, 0, 0, 0, 0, 0, -74.049299, 0, 0, 0, 6.669526, - 0, 0, 0, 0, 82.3839076, 0, 0, 0, -63.2986138, 0, 0, 0, 29.4639612, 0, - 0, -75.2754458, 0, 0, 10.6058324, 83.9439366, 48.4539264, 0, 0, 0, 0, - 8.6922024, 17.82273 - ], - [ - -12.5659444, 0, 0, 0, 0, 0, -16.0039068, 0, 0, 0, 0, -64.5579896, 0, - 25.3425712, 0, 0, 0, 0, -73.3525686, 0, 0, 0, 41.4534476, 0, 0, - 35.6355928, 82.0438356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16.5500598, 0, - 17.4573382, -30.4230828, 68.6250598, 0, 0, -70.7101786, 0, 0, 0, 0, 0, - 19.070679, 0, 0, 0, 0, 0, 0, 0, -69.0034118, 0, -32.8881618, 0, - 99.6116696, -41.8557658, -36.91302, 0, 0, 0, 0, 0, 25.1313946, 0, 0, 0, - 0, 0, 66.1785624 - ], - [ - -28.5551034, -60.2641954, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.4765054, 0, 0, - 0, 0, 0, 0, 78.1818898, 0, 0, 0, 0, 34.0574966, 0, 0, 0, 3.3327304, 0, - 0, 0, 0, 0, 0, 0, -25.4031686, -6.4345882, 0, 0, 0, 0, 0, 70.724926, 0, - 0, 0, 0, 0, 0, -34.578727, 0, 0, 0, 0, 73.4821434, 0, 0, 0, 0, - -78.7097278, 0, 0, 0, -56.0390914, -77.1810362, 95.2972308, 0, - -88.304829, 0, -11.4076234, 0, 0, 0, 0, 0, -53.8368524 - ], - [ - 0, 0, 53.7291982, 0, 0, 0, 0, 0, 0, 0, 0, 90.7870612, -66.2974882, 0, - -92.2201462, -15.7252186, 0, 0, 0, 0, 0, -25.4072904, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 32.8926792, 36.9923848, 0, 0, 0, 0, 33.293754, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 5.689557, 0, 0, 89.5416534, 40.4300196, 0, 0, - 2.8394972, 90.7550328, 0, 0, 71.835872, 30.8157976, -96.7796296, 0, - 44.1461388, 0, 0, -32.5545222, 0, 75.597677, 0, 0, 0, 0, 33.146892 - ], - [ - 0, -36.157067, 0, 0, -0.4087578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13.1871604, - 0, 60.6086354, 84.4235272, 0, 0, 89.0383032, 0, 0, 0, -43.0195992, 0, - -99.31608, 0, -64.2154682, 0, 0, 0, 76.5304532, 0, 0, 0, 0, 0, - 82.052369, 0, -72.450166, 0, 0, 0, 23.4129134, 0, 0, 0, 0, 0, 0, 0, 0, - 53.3291088, 0, 0, 0, 73.435697, 87.3597806, 0, -94.1974698, 0, 0, 0, 0, - 59.0496292, 0, 0, 0, -13.8506028, 0, 0, -42.6003178, 0, 0, 55.1715212 - ], - [ - 0, 0, 0, -67.8709314, 0, 0, 0, 0, 0, 0, 0, -9.678326, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28.014314, 0, 0, - 0, 0, 0, 0, 0, 0, -36.8865788, 0, 0, -98.739389, 0, 0, 0, 0, 0, 0, - -86.2168946, 0, 44.1228816, 0, 0, 0, 0, 0, 0, -36.6609072, 0, 0, 0, 0, - 18.3461886, 98.9990466, 30.4109678, 0, 0, 0, -39.2683046 - ], - [ - -49.3558704, 0, 0, -31.3665258, 0, 0, 0, 0, 0, 0, 1.7897898, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -15.7715374, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -50.0629034, 0, 0, 0, 0, 0, 0, 0, 35.8856254, 0, -51.062155, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78.136688, 0, 0, 0, 0, -41.5917514, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 73.1472674, 0, -77.9015418 - ], - [ - 0, -6.5048614, -28.611729, 0, 0, -97.9680564, 33.7007078, -70.5347856, - 0, 17.197908, 0, 19.8776858, -24.4246618, 0, 0, 53.363481, 0, 0, 0, - -44.7872848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -74.0599438, - -81.2162694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -68.6473592, 0, 39.894997, 0, 0, -38.5305628, 0, -5.244101, 0, 0, - 46.6040974, 2.4384956, 0, 0, -26.8264528, 0, 0, -98.5537452, 2.6463192, - 0, 0, 0, 0.4769732 - ], - [ - 0, 0, 0, 0, -52.7430298, 1.8510158, -39.691072, 0, 0, 0, 0, 0, - 95.6497418, 0, 0, -48.04896, 0, -26.6728378, 0, 0, 0, 0, 0, - -12.3921976, -65.5861706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -57.9815088, 0, 77.6808808, 0, 0, 0, - 94.6506526, 0, 0, 0, 55.8427672, 0, 0, -0.6995066, 0, -78.3071326, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -67.9654476 - ], - [ - 0, -23.0019946, 0, 0, 95.4877116, 0, 0, 0, 0, 0, -36.573767, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90.1862622, -36.4728966, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86.6126918, 0, 0, 0, 0, - 0, 0, 0, -80.1067184, 0, 31.8472788, 27.496628, -66.6206162, 0, 0, - 9.1957296, 0, 37.2257526, 0, 0, 0, 0, 0, 0, 0, -39.1637322, 0, 0, - 74.4924622 - ], - [ - 0, 0, -25.4147588, 6.2424662, 0, 0, 0, 0, 0, 0, 92.5623938, -92.810452, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -45.0048688, 0, 0, -32.1678062, 0, 0, 0, - 9.8719598, -33.7145476, -16.3449354, 0, 70.462643, 0, 0, 14.5356206, 0, - 0, 0, 0, -95.1218374, 0, 0, 0, 0, -0.8077516, 0, 0, 0, 0, 0, - 53.7434994, 0, 0, 0, 0, 0, 5.376533, 0, 0, 0, 0, 0, 0, -1.125953, - 75.3929928, 0, 0, 0, 0, 0, -17.8555478, 0, 0, 87.130332, -46.977091 - ], - [ - -57.0064908, 0, -61.469472, 0, 0, 94.2906142, 0, 10.1214686, 0, 0, 0, - 0, 0, 0, 0, 0, 90.8859632, 0, -31.3550928, 25.4391198, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -30.6974596, 0, 16.8162692, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -40.946388, -23.914437, -39.0760436, 0, 0, 12.4664916, 0, 0, 0, - 59.3854694, 0, 0, -79.029102, 0, 48.0444832, 0, 0, 0, 0, 0, 0, 0, - -34.447419, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42.8371356 - ], - [ - -46.3742298, 0, 0, 0, 0, 6.4096268, 0, 0, 0, 0, 0, 0, 0, 0, 53.7055136, - 41.0589284, 0, 0, 0, 0, 0, 0, -59.494163, 78.2644798, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3.5467882, 0, 0, 0, 0, 0, -33.8146284, 0, 81.1209896, - 0, 0, 0, 0, 0, 0, -59.120982, 0, 0, 0, 0, 20.5082176, 0, 0, - -32.2137818, 41.6679682, 98.4426286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 18.7911844 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22.5196126, -44.92426, 0, 0, 0, 0, -78.1154748, 95.3654376, 0, 0, 0, - -42.4266782, 73.3850132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94.1878774, - 90.3854666, 0, 0, 0, 0, 0, -15.9053536, -74.9423846, 47.214, 0, 0, - 7.477562, 0, 46.2206928, 19.1508454, 41.6978146, 39.03286, 0, 0, 0, 0, - 0, -14.259302, 0, 54.0542232, 0, 0, 44.5438142 - ], - [ - 95.3632006, 43.6928354, 75.8291588, -81.2577418, 0, 0, -91.248437, 0, - 0, 22.476879, -77.967431, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.0308978, - -22.0727056, 0, 0, 0, 0, 0, 0, 0, 17.126454, 0, -45.7583606, 0, 0, - 32.9187018, 0, 0, 0, 0, 0, -58.6847152, 0, 0, 39.113676, 0, 0, 0, 0, 0, - 0, -80.1176538, 0, -86.9570556, 0, 0, 0, -9.3462492, 0, 49.3616864, 0, - 60.4773586, 0, 0, 48.9766746, 17.5735282, 75.126033, 0, -50.8306992, 0, - 0, 61.3438194, 0, 0, -95.9051914, 0, 25.6497354 - ], - [ - -89.5581772, 0, 0, 0, 0, -37.7576814, 0, 0, 0, -50.475431, 0, 0, 0, 0, - -75.575654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6.7066106, 0, 0, 0, 68.702018, - 0, 0, 44.2841378, 0, 0, 0, 0, 0, 0, 0, 42.4183476, 80.6872178, - 72.028214, 0, 0, 0, -50.6912368, 0, 0, 0, 53.1913708, 0, 0, 0, 0, - -50.0798868, 0, 0, 0, 0, 0, 0, -99.54189, 0, 0, 0, 0, 87.8828622, - 7.144766, 0, 0, 0, 71.8161494, 91.0414654, 0, 0, -7.240427 - ], - [ - 0, -73.397517, 0, 0, 0, 0, -42.4633614, 0, 0, 0, 0, -2.3988294, - -60.1970288, -31.1370786, -16.4428054, 0, -86.5694254, 0, 0, 0, 0, 0, - 0, 0, 0, -33.759363, 0, 88.9440556, 0, 0, 0, 48.8687358, 0, 0, - 60.1841648, 0, 0, 81.5798018, 0, 0, 0, 0, 22.265044, 0, 0, 0, 0, - -98.612946, 0, 0, 0, -49.44052, 0, 46.9606012, 0, 0, 0, -23.7990468, 0, - 0, 0, 0, -72.1702852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26.2623134, 0, - -17.3386012 - ], - [ - 0, 16.4596174, 0, 0, 0, 0, -85.6599392, 0, 0, 0, 0, 0, 0, 93.708794, 0, - -37.5698758, 0, 0, 0, 0, 0, 0, -82.8927936, 0, 82.4183808, 0, 0, 0, 0, - 0, 0, 55.028266, 0, 0, 11.3484192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -60.7651522, -4.822581, 0, 29.0627604, 0, 0, 61.7042716, - 41.5363722, 73.9967868, 0, 0, 0, 0, 50.2308124, 0, 33.8231702, 0, 0, 0, - 0, 0, -14.7226996, 14.5401778, 0, -72.8145596, 19.9220286, -76.4609286 - ], - [ - 11.1687196, 0, 0, 0, 0, 0, 0, 0, -37.365205, 0, 0, 0, 52.0314298, 0, - -58.0558462, 0, 0, 18.6738906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 59.6046802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.5944948, 0, 0, - 0, 77.0271992, 46.521059, 61.8258634, 0, 0, 36.079546, 0, -14.3080494, - 0, -50.1618478, 0, 0, 95.9445656, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -53.478982, -90.3623976, 0, 0, -37.1575466 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 78.882051, 0, 0, 57.8056512, 7.2056626, 0, - 2.822132, 40.311822, 0, 0, 0, 83.8935006, 0, 0, 91.2774482, 3.160849, - 91.7410132, 0, 0, 0, 0, 0, 2.7544652, 0, 0, 0, 0, 0, 16.8419108, 0, 0, - 84.1171174, 0, 21.3119752, -69.869284, 0, 0, 0, 0, 0, 92.1087118, 0, 0, - 0, 0, 34.3473744, 21.9890278, 0, -36.3139526, 0, 0, 0, 0, 0, 25.613497, - -2.989159, 0, 0, 0, 0, -49.2456622, 0, 0, 27.3140788, 0, 49.210258, 0, - 0, -90.6896972 - ], - [ - 0, 0, 0, 0, 0, 0, -56.1947046, 0, 0, 52.6617176, 61.6283016, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -34.0759312, 0, 92.0200254, 0, 0, -9.7999914, 0, 0, - 34.0572616, 0, 0, 0, 0, 0, 59.7637334, 0, 0, 0, 0, 0, 43.5437732, - 29.9690024, 0, 0, 93.9438036, 0, 0, 0, 52.3867986, 0, 0, 0, 38.0567542, - 0, -63.9851954, 0, 73.1679634, 0, 0, -28.6636244, 0, 0, 0, 0, 0, - 39.2894916, 0, -28.4364668, 0, 0, 0, 0, 0, 0, 0, -32.2899456 - ], - [ - 15.3399588, 0, 0, 0, 0, 0, 0, -66.2540916, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 14.7613734, 0, 0, 0, -32.9550622, 0, 0, - -17.2710502, 0, 0, 0, -66.7611862, 76.5708962, 93.3868072, 12.036471, - 0, 0, 0, -74.2189184, 0, 0, 0, 0, 58.0343866, 0, 71.0145124, 0, 0, 0, - 0, 0, 0, 0, 80.7131208, 0, -49.5191686, 40.2489602, 0, 0, 39.9664558, - 0, 0, 0, 0, 0, 0, 51.704979, 0, 20.9209752, 0, 0, -63.5800814 - ], - [ - 0, 0, 35.1676872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8.326191, 0, - 0, 0, -42.1405488, 0, 0, 0, 0, -64.9203894, 0, 0, 0, 86.5653072, 0, - 17.1250418, 0, 15.224998, -32.788739, 0, 0, 0, 13.1550612, 0, 0, 0, - 93.3049176, 65.5504482, 0, 35.8126186, -16.2474202, 0, -76.7788518, - -51.9001008, 0, -89.725966, 53.4895596, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -82.6077236, 0, 0, 0, -57.075872, -52.5166376, 99.9479554, 0, 0, - -89.7491862, 0, 18.6163306, 0, 29.1454254 - ], - [ - -18.8864514, 0, 0, 0, 0, 0, -46.6968628, -83.8123266, 0, 0, 0, 0, 0, 0, - -91.631792, 0, 0, 0, 0, -57.3455082, 66.459894, 0, 0, 0, -73.9341878, - 0, 0, 0, 81.8859882, 0, 0, 0, 0, 0, 28.0747908, 0, 0, 99.7796988, 0, - 87.0296656, 0, 0, 43.7722526, -60.65313, 98.6287198, 0, 20.8634118, 0, - 0, 25.6519386, 0.4939554, 0, 0, 0, 0, 0, 0, 0, 0, -74.9266526, 0, 0, - -25.4234142, 0, -91.054582, 0, -42.534282, 0, 0, 0, 0, 0, 0, 0, 0, - 12.1491094 - ], - [ - 0, -90.5331764, 0, 0, 0, 0, 0, -8.1166918, 0, 0, 0, 0, 0, -34.0013692, - 21.9272646, 0, 0, 0, 0, 0, 93.2245032, 0, 21.8275426, 0, 0, 0, - 38.5279608, -6.0022692, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 39.644863, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -93.7962256, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11.5363598, 70.354452, 0, 0, 0, 32.2282298, 0, - 36.659058, 0, 0, 53.992344 - ], - [ - -74.4430478, 0, 0, -93.4496218, 14.6437598, 0, 0, 0, -33.8297902, 0, 0, - 0, 0, 0, 0, -35.949213, 0, 0, -93.1678628, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -22.8806328, 0, 0, 0, 0, 0, 0, 0, 45.1466816, 88.4821604, 0, - 0, -49.7769388, 0, 0, 0, 0, 0, 0, 53.6290382, -40.4388272 - ], - [ - 71.2065308, 94.4966808, 0, 0, 0, 0, -84.2404402, 0, 0, 0, 0, 0, - 61.7641462, 0, 0, 0, -0.608018, -94.7698384, 0, 0, 0, 0, -3.4562834, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.0708126, -73.3657794, - 26.6482556, 0, 0, 0, 0, 0, 0, -66.9699546, -98.6726948, 0, 0, - -25.4137958, 0, -88.7254432, -81.2735544, 0, -23.3081526, 0, - -51.8917252, 0, 0, 0, 0, 0, 0, 0, 0, -52.3004828, 0, 0, 0, 0, - 67.8542398, 0, -67.7489638, 32.2212522 - ], - [ - 0, 77.0252092, 0, 0, 0, 0, 0, -85.3271924, 0, 0, 0, -2.9308596, 0, - 83.448547, 0, 4.7835886, 0, 0, 0, 0, 76.590577, 0, 0, 0, 0, 0, - 86.0180794, 0, 0, -88.4030016, 0, 0, 0, -13.770426, 57.6068646, 0, 0, - 0, 0, 0, 12.6896788, 0, 0, 0, -78.1078136, -92.3074796, 0, 0, 0, 0, - -94.3200626, 0, 0, -7.987837, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 52.7655986, 0, -78.2727176, 0, 74.4309632, 48.3867546, -85.4142468, 0, - 91.3888914, -6.0372808, 51.1643348 - ], - [ - -77.4193002, 0, 0, 0, 0, 0, 0, 0, 41.0846988, -78.3265056, 0, 0, 0, 0, - 0, 0, 0, -20.408123, 10.7055032, 0, -19.5848354, 0, -32.624054, 0, - 47.333306, 0, -41.6545398, 0, 0, 0, 0, 0, 46.8131656, 0, 52.5387768, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -75.3511542, 0, 0, 0, 0, -27.6140242, 0, 0, - -63.3032372, 0, 0, 0, 0, 0, 0, 0, 0, -93.1854838, 0, 0, 0, 0, - 32.3353436, -75.8659438, 89.852816, 0, 9.7044216, 0, 94.9239572, 0, - -57.0391726, 25.4894998 - ], - [ - 0, 0, 0, -27.2226392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -89.0780816, - 0, 0, 0, 0, 6.6342408, 0, 0, 92.3634346, -41.5559582, 0, 0, 0, 0, 0, 0, - -4.3499792, 18.9554522, 0, 29.992962, 0, 0, 0, 0, 0, 0, 0, 0, - -51.9952794, -40.3571344, 0, -61.0098328, 0, 0, 0, 0, 71.8571838, - 97.3056784, 0, 0, 27.798026, 0, 0, 20.3198544, 0, 0, 0, -82.1043534, 0, - 0, 0, 0, 0, 55.2807134, 0, 0, 0, 0, -90.8562594, -43.2271604 - ], - [ - 0, 0, 0, 0, 0, 15.2015056, 18.3740448, -11.2614058, 0, 0, 0, 0, 0, - 53.0086248, 0, -91.038908, 0, 0, 88.2707986, 3.2580272, 0, 0, 0, 0, 0, - 0, 0, 0, 88.8189254, 0, 0, 0, 0, -3.742353, 0, 0, 0, -41.4198488, - 90.0966416, 0, -22.474875, 0, -25.610863, -79.5943706, 0, 0, 0, 0, 0, - 0, 0, -3.5616438, 0, 0, 0, 88.5984932, 0, 0, 0, 0, 0, 0, 0, 22.4398688, - 0, 0, 0, 0, 0, 0, 0, -63.7422676, 0, 0, 0, -82.7150752 - ], - [ - 0, 0, 75.634243, -60.420708, 0, 0, 0, 0.8383984, 0, 0, -72.2791914, 0, - 0, 0, 17.1476022, 0, 0, -14.5930276, 9.4352026, 0, -30.1475326, 0, - -53.7249052, 0, 19.3293368, 0, 0, 0, -80.867335, 0, -3.344608, - 71.3546388, -91.098817, 0, 0, 0, -26.83234, 0, 3.7009, 0, 0, 0, 0, 0, - 28.4006138, 0, 0, 57.1433046, 14.4086186, 0, 0, 0, 49.5828354, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17.0012008, 0, 30.5581294, -98.7868224, 0, 0, 0, - 70.0467486, -9.4444084, 0, 19.9250998, 0, 0, -79.4970662 - ], - [ - 0, 54.0067274, 0, 0, 0, 37.9936634, 0, -20.1071476, -58.981429, 0, 0, - -83.9927614, 0, 0, 0, 0, 0, 0, -70.8571636, 0, 0, 68.4686496, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -8.1687508, 0, 0, 16.6835288, -10.1286606, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86.4747972, 0, -34.6316042, 0.9788672, 0, - 0, -41.4513542, 0, 0, 0, 0, 0, 0, 0, 0, -28.4021576, -74.9076708, 0, - -5.0425708, 0, 0, 0, 78.9139852, -50.7082204, 0, 34.0684852, 28.2502302 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 57.544994, 0, 0, -22.4411072, 0, -94.2568866, - -80.7849138, 0, 0, -10.0010618, 33.3160792, 0, 0, 0, 0, 0, 0, - -82.6811248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11.0390072, 0, 0, - 32.0523166, 0, -80.6937396, 0, -94.2671164, 0, 0, -16.2170198, 0, 0, 0, - -5.7387768, 0, 0, 0, 0, -83.6048238, 0, 0, 0, 0, 0, 0, 33.6877392, 0, - -41.9784856, 0, 0, 0, -50.6512854, 0, 78.737702, 0, 0, 0, 0, 0, - 9.0618996 - ], - [ - 0, 0, 0, 0, 0, -94.8072128, 0, 21.9767716, 0, 0, 0, 57.7817378, - 35.3840102, 0, 0, 0, 60.4679182, -94.9978498, 0, -18.9377882, - -42.3270372, 0, 0, 0, 0, -3.9058912, 0, 0, 44.440235, 0, 0.41471, 0, 0, - -88.0148602, 53.9755254, 0, 0, 74.7772774, -19.633854, -66.6129164, - -25.4637816, -13.1642082, 0, 0, 0, 0, 57.6068044, 0, 0, -75.9060014, - 24.0447026, 0, 0, 29.9750648, 0, 0, 0, -54.938857, -4.4090126, 0, 0, 0, - 0, 0, 0, -57.1202194, 0, -11.130658, 0, 0, 95.6177756, -78.5403868, 0, - 0, 30.4589622, -93.6950296 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -50.308444, 0, 0, 0, 0, 0, 0, 0, - -20.3462364, 0, 0, 25.6081088, 0, 0, 0, 0, 0, 0, 90.9877902, 0, - -56.0922542, 99.2456868, 0, 45.4316172, 0, 70.1339288, -54.576692, 0, - 0, 0, -73.6910292, 0, 0, 0, 0, 0, 0, 38.6032202, 0, 0, 0, 60.7387286, - 0, 0, 0, 0, 0, 0, 0, 0, 95.207832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 58.4721284 - ], - [ - 0.3163476, 0, 0, 13.0918568, 5.13089, 0, 40.7266308, 0, 0, 0, 0, 0, - -98.7077428, 0, 81.000503, 0, 0, 76.3945372, 0, 0, 0, 0, 0, 0, - -10.2289084, -70.592702, 0, 0, 0, 0, 0, 0, 69.59571, 0, 0, 0, 0, 0, - -61.4746908, 53.4041094, 0, 90.4397278, -33.1874988, 0, 0, 71.5512744, - 5.846105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56.7568638, 0, 0, - 66.7588344, 0, 0, 0, 99.284785, 0, 0, 0, 0, 0, 0, -99.2850048, - -85.4466004 - ], - [ - 0, 0, -34.544278, 0, 0, -36.135124, -33.4259354, 0, 0, -60.4256326, 0, - 44.7734168, 0, 0, 0, 0, -88.6744704, 0, 0, 0, 0, 0, 0, 0, 0, - -95.3752508, 4.596855, 85.2924422, 70.9081648, 22.0390844, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1.6872456, 0, 0, 0, 0, 0, 0, 0, -37.4782422, 0, 0, 0, 0, - 0, 0, 0, 0, 4.7642096, 0, 0, -33.6313218, 0, 0, 72.977526, 0, 0, 0, 0, - 0, 0, 2.5063252, 0, 0, 0, 0, 0, -64.8677902 - ], - [ - 0, 0, 0, 3.718989, 0, 0, 49.3814782, 77.868826, 0, 0, 0, 0, 0, 0, 0, 0, - -49.7008846, 0, 4.696494, 0, 0, 0, 0, 0, 0, 0, -59.4928602, 0, 0, 0, 0, - 0, 82.6840644, -0.996624, -15.8014198, -93.098215, 0, 0, 41.2709314, 0, - -90.9633198, -56.911012, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.02585, 0, 0, 0, - 0, 0, 0, 61.2353938, 0, 0, 0, 0, 21.376448, 0, 0, 0, 0, 0, 0, 0, - 97.0578858, 0, 0, 0, 5.1265226 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19.5643656, - 0, 0, -92.0307416, 0, 0, 0, 0, 55.003856, 0, 0, -20.4708104, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54.4588824, 0, 0, 0, 0, 0, - 0, 0, 0, -57.0182252, 0, 0, -48.3222128, 0, 0, 0, -41.1121382, 0, 0, 0, - 0, 0, 0, -12.2773602, 0, -28.6924808, 50.0415338 - ], - [ - 0, 0, 0, -73.9719246, 0, 0, 0, 0, 0, 0, 0, 39.4110332, 0, 0, - -21.6757132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 74.8739354, 0, 0, -52.9210426, 0, 46.7750368, 63.6311858, 0, 0, 0, 0, - 25.5310902, 0, -3.0369126, 0, 32.5437816, 0, 0, 78.9107496, 32.0416448, - 0, 0, 15.9408846, 0, 0, 0, 0, -67.7582854, -52.6103086, 0, 0, 0, 0, 0, - 0, 11.8676176, 0, 0, -41.8820812, 43.608357, 0, 0, -64.3752572 - ], - [ - 0, -15.1648222, -57.5273074, -94.2919124, -3.0777222, -77.345826, - 91.2777856, 0, 0, 0, 0, 13.5044774, 0, 0, 0, 0, 0, 0, 0, 0, 33.5509618, - 0, 0, -33.291092, -60.3050638, 0, 0, 0, 94.610171, 0, 0, 0, 0, 0, 0, - -47.270154, -81.403122, 0, 0, 47.829269, 0, 0, 0, 0, -47.4699122, 0, 0, - -31.0161918, 0, 0, -54.993563, -9.6544012, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -17.0644648, 0, 0, 0, 0, 0, 0, 49.0555938, -82.4686508, 0, 0, - 97.7299292, 0, 0, -93.1718028 - ], - [ - 0, 0, 0, 45.5639954, 0, 0, 0, 0, 0, 92.3127826, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -5.8746296, 22.9079182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 25.2727812, 0, 0, 0, 0, 0, 0, 65.0012614, 0, 67.4376806, 0, 0, - 14.0298002, 0, 0, 0, 0, 0, 33.432514, 43.000429, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 20.2757068, 4.0567932, 0, 0, -15.8737758, 0, 0, 0, 0, 29.8957398, - 50.0218946, 17.0262346 - ], - [ - 46.1658228, 19.630724, 0, 0, 0, 0, 0, 80.6073204, 24.5091878, 0, 0, 0, - 73.9258848, 0, 0, 0, -98.2044476, 0, 0, 0, 0, -59.2213968, 0, - -70.1450004, 0, 0, 0, 42.4721292, 0, -73.0346074, 0, 67.9829686, 0, 0, - 0, 0, 6.6597886, 39.7215082, 0, 0, 0, 52.505292, 95.9204336, 0, 0, - 5.8797776, 0, 0, 0, 36.0738246, 0, -15.2667614, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 50.963131, 0, 0, 0, 49.3354032, 13.7868492, 0, 77.3708062, - 26.0888548, 0, 0, 0, 0, -60.0881692, 24.2459968 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56.562023, 0, 0, 24.9145996, 0, 0, 0, - 0, 32.8196724, -75.8879774, -12.4005106, 0, 0, 0, 0, -18.824482, - -45.0330046, 0, 0, -47.5493022, 0, 0, 0, 8.1879572, 0, 0, 4.5700222, - -28.6731266, 0, 0, 0, 0, -83.2735948, 5.4624948, 0, 0, 0, 0, 0, 0, 0, - 83.664375, -52.8630198, 58.5805764, 0, 0, 0, 45.5781336, 0, 0, - -1.9768322, 0, 0, 0, 0, 91.1151128, 0, 0, 0, 0, 0, 0, -65.5158586, 0, - -22.12762 - ], - [ - 0, 0, 0, 0, 0, -50.8301006, 0, -57.183698, -24.666489, 43.0557936, 0, - 0, 0, -44.0812116, 0, 0, 0, 97.1670056, 0, 0, 0, 0, 83.4511366, 0, - -96.8912356, -6.1095452, 87.6643268, 0, 0, 0, -32.5223614, 0, 0, 0, 0, - -18.5596964, 0, 56.1790224, 0, 25.6035684, 0, 0, 0, 0, -46.8740154, 0, - 0, 0, 0, 0, 0, 0, -44.4329434, -34.719678, 85.6384822, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 48.9669952, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28.2571694 - ], - [ - 0, 0, 0, 0, 42.1192158, 18.3800218, 0, 0, 33.4475094, 0, -39.4713432, - 0, 54.9744572, 0, -6.6305664, 79.0252374, 77.6908818, -61.5099746, 0, - 0, 38.4501814, 0, 0, -96.4250704, -27.809694, -34.9250884, 63.2997728, - 0, -98.8800042, 0, -7.682428, 0, 0, 0, 0, 0, 0, 7.7256608, 0, - 48.5546152, 0, 0, 0, 0, 0, 0, -58.963373, 0, 0, 0, 0, 0, 86.5062664, - 7.0006556, 0, 0, 0, 0, 0, 0, 3.1958572, 0, -46.2861844, 0, 0, 0, 0, - 30.0710902, 46.6948898, 0, 68.4681908, 0, 0, 0, 0, -51.3930766 - ], - [ - 7.1969236, 0, -79.6160432, -39.947334, -15.2636342, 0, 10.0645898, - -57.8968238, -31.9945476, 0, 91.5839662, -52.777566, 0, 0, 0, 0, - -40.9252974, 0, 0, 0, -45.5113982, 70.585349, 0, 0, 0, 0, 0, 0, 0, 0, - -66.2523308, 0, 0, 0, 0, 0, 0, 0, 0, 85.7454324, -7.1148372, 0, - 93.6584844, 0, 0, 0, 0, 0, 0, -8.0414788, 0, 0, 0, 0, 51.3263388, 0, 0, - 79.892422, 0, 0, -64.6934098, 0, 0, -45.9577622, 0, 0, 0, -46.8290526, - 0, 48.2417506, 0, 0, 0, 0, -2.4115812, -50.7156922 - ], - [ - 62.9870494, -81.5584552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53.7333104, - 0, 50.6438202, -57.7938262, 0, 0, 0, 0, -78.1108892, 0, 0, 0, 0, 0, 0, - 0, 87.6584692, 0, 58.2960112, -17.5355398, 12.0497204, -60.5414862, 0, - 0, 0, 0, 0, 0, 0, 0, 38.586472, -19.7940052, 94.423359, -89.557933, 0, - 0, -77.0715722, 0, -87.707166, 70.8585278, 0, 9.0616914, 91.333051, 0, - 0, 0, 5.8166112, 0, 24.7793442, -51.000038, 0, 0, 0, 0, 0, 0, - 79.9657776, 97.4969126, 0, 0, 0, 0, -73.8994394 - ], - [ - 10.133741, 0, 0, 0, 95.6910336, 0, 0, 0, 0, -22.6696236, 0, 0, 0, 0, - 15.137996, 35.7088464, 0, -16.1971956, 0, -29.4834358, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, -89.868739, 24.0040126, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 40.7292396, 35.7709458, 0, 34.690347, 22.3083532, 0, 0, 0, 0, - 0, -48.4224164, 0, 0, 0, 0, 91.7670744, 0, 0, 69.4045014, 0, - 60.5937114, -38.9993134, 0, 0, 0, 0, 0, 55.4599018, 0, 86.689944 - ], - [ - 0, 0, -24.842169, -52.997003, 0, 0, 0, 0, 0, 0, 0, 5.9075842, 0, 0, - -91.1447252, -5.3147106, 0, 0, 0, 4.4670454, 34.97343, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -5.3957052, 0, 0, 0, 0, -19.2118838, 0, 0, 0, 0, 0, 0, - 0, 0, 64.9559324, 0, 0, -10.0586402, 0, -74.8523334, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 84.8495464, 0, 0, 0, 0, 0, 0, 33.0825986, 46.995148, 0, 0, 0, - -4.243203, 0, 0, -24.0124188 - ] -] +RAW_DATA = [[ + 0, 0, 49.774821, -59.5968886, -46.0773896, 0, -65.166109, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 47.0957778, 15.259961, -98.7983264, 0, 0, 0, -20.7757184, 0, + 87.2645672, 0, -22.7888772, 0, 0, 0, -40.4980904, -19.7307486, -23.222078, + 0, -77.5263128, 0, 0, 56.6204008, 0, 0, 0, 0, 0, 0, 0, 31.378421, 0, + 97.3441448, 35.1309806, 0, 0, -40.5727886, -50.7308566, 0, 0, -69.9304568, + 0, 38.5385914, 0, -22.1243232, 0, 0, 0, 0, -62.5102538, 8.0801276, + 46.7998066, -2.3292106, 0, 0, 0, 8.774031, 0, 0, -65.6505736 +], [ + -67.2935466, -64.4354852, -96.6712204, 0, 0, -60.7812272, 0, 0, 0, 0, 0, + -7.9966864, 0, 0, 0, 0, 0, 0, 0, 89.7672338, 0, 0, 0, 0, 98.9607046, 0, + 28.6714432, 0, 0, 0, -26.2738856, 0, 0, 68.363956, 0, 0, 0, 0, 54.7406868, + 0, 0, 0, 0, 94.2320734, 0, 0, 0, 0, 0, 0, 0, 0, -2.9647794, 39.7161716, + -54.7931288, 0, 0, 0, 0, -47.2284892, 0, 0, 0, -8.6421808, -35.399612, 0, 0, + 62.1912668, 0, -6.8930716, 0, 0, -17.0801284, 0, 0, 68.6533416 +], [ + 0, 0, 0, 81.165396, 83.773254, 0, -25.1603, 0, 0, 50.225725, 0, -3.8242274, + 0, 0, 36.2078566, 0, 0, 0, 0, 0, 0, 0, 0, 15.551432, 0, 0, -33.6446236, 0, + 0, 0, 36.6171324, 0, 0, 0, 0, 67.9591934, 0, 22.1428016, 0, -27.2961928, 0, + 0, 0, -97.4961564, 90.4062526, 0, 0, 0, -90.0532814, 0, 98.8332924, 0, 0, + -13.8994926, 0, 17.1962884, 0, 0, 0, -55.1654678, 0, 0, 0, 85.829554, 0, + -37.971164, 64.233136, -17.9943296, 0, 0, 0, 0, -67.7509796, 0, 0, + 10.0750712 +], [ + 0, 37.2783148, 0, 0, 0, 36.4959506, 0, 0, 0, 0, 0, 0, 61.201323, 0, + 14.4328522, 48.4078064, 0, 0, 0, 0, 0, 0, 0, -47.0969056, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 26.720439, 0, 0, 62.1987576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -65.2085246, 0, 0, 0, 0, 0, 0, 73.3019432, -14.3431238, 0, 0, 0, 0, 0, 0, + 0, 0, 2.1565846, 0, 0, 0.7733644, 0, 5.9090456, 0, -39.7724192 +], [ + 0, 0, 0, 0, -24.4555532, 0, 0, -5.5484574, 0, 25.4685054, 0.7906104, + 4.273133, 0, 52.12973, 0, -12.8040828, 0, 0, 81.888381, 64.0713498, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 62.9088768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20.869713, + 0, 0, -71.5835872, 0, 0, 80.7237808, 0, 0, 0, 0, -60.1883708, 0, 0, 0, 0, 0, + 0, 0, 0, 85.0393326, 23.6045316, -18.8849834, 0, 0, 0, -90.8065188, + -9.5037982, 14.3196654, 0, -28.9290306, 0, 0, -41.5575766 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8.9478934, 0, + -83.6040618, 0, 0, 0, 0, -14.3874822, 77.2528714, 0, 0, 99.2966066, 0, + 21.7889114, -37.7629282, 0, -11.6026582, 0, 0, 0, 0, 74.422603, 0, 0, + -79.239245, -31.9686324, 0, 0, 0, 0, 0, 0, -29.8797178, 0, 0, 85.2723062, 0, + 0, -8.8031188, 0, 0, -20.043565, 0, 0, -70.733454, 0, -94.7231762, + -85.4584516, 0, 0, 0, 0, -27.6068624, 0, -79.787783, 0, 0, -55.1894266 +], [ + 1.9374354, 0, 1.4807184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 61.298952, 0, 0, 0, -90.5702054, 0, 67.381115, 0, -68.684637, 0, 0, 0, 0, 0, + 0, 0, 0, 93.7807934, 0, 8.8213302, -15.9020466, 0, 0, 0, 0, 23.8157662, 0, + 0, 0, 0, 0, 0, 0, 67.3461972, 0, 0, 0, 0, 0, 43.3263744, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 87.7149706, 0, 0, 0, -18.5133574, -30.0338992 +], [ + 6.3937798, 78.7697644, 28.4485838, 0, 0, 0.1352466, 0, 0, 74.5767122, + -13.8340168, 0, 0, 0, 77.2929426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17.9243834, + 0, 0, 82.2239878, 0, 0, 0, 0, 64.3440016, 90.109577, 46.8926522, -2.4494366, + 0, 84.7413412, 0, 0, -4.216108, 0, 0, -79.8684776, 0, 0, 74.8706758, + -64.4518992, 0, 0, 0, 0, -34.4895004, 0, 0, 0, -74.1158858, -37.7803516, 0, + 0, 0, 0, 0, 80.0054296, 0, 0, 0, 0, 0, 0, 0, 0, -84.5832026, 0, 0, + 71.2540694 +], [ + 0, 0, 0, 0, -74.9257454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 14.9675444, 0, 0, 0, 0, 0, -27.5236912, 0, 0, -80.4993438, 0, -81.8494538, + 0, 0, 0, 0, 0, -18.6802002, 0, 0, 0, 0, 0, 0, 0, 61.4131076, 0, 0, + -55.1421034, 0, 0, -18.576761, 72.3500914, 0, 0, 0, 0, 0, 0, -23.6460116, + 43.1258024, 0, 93.701872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -86.5772554 +], [ + 0, 0, 93.0762916, 0, 0, 0, 0, 0, 0, 0, -37.2663938, 86.8303764, 0, 0, 0, + -51.9596226, 0, 35.6722618, -91.438259, 0, 0, -70.6277108, 0, -82.9146992, + 58.0327648, 0, 0, 0, 0, 0, 0, 0, 0, 13.3727302, 0, 0, 0, 23.5719942, 0, + -21.5445476, 74.1541634, 60.6365036, 97.4447708, 0, 0, 0, 0, 82.5869498, 0, + 85.1132108, 0, 0, 0, 0, 0, 0, 97.4012534, 0, 0, 0, 0, -45.1504048, + 1.0619934, 59.7140264, 0, 0, 0, 0, 0, 4.177461, 0, 0, 0, -75.7039276, 0, + 0.0421338 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -71.171869, 0, 0, 8.685266, 0, 0, 0, 0, + 33.9089574, 0, -31.6154498, 0, 0, 0, 0, 0, 5.3182746, 0, 0, 0, 0, 0, 0, + 3.0361166, -10.364305, 0, 0, 0, 0, 0, 0, 0, 0, -83.9738444, 0, 0, + -7.9170212, 0, 0, 0, -28.7575682, 0, 0, 0, -29.9216686, 0, 0, 83.4050918, + -39.5247364, -6.7028846, 0, 0, 0, -23.6080482, 0, 0, 0, 0, 0, 0, -18.380154, + 46.9252306, 0, 0, 26.1618372, 99.6235254 +], [ + 0, 0, 0, 0, 0, 0, 0, 52.008307, 0, 0, 0, 0, 0, 92.4974102, -76.3015714, 0, + 0, 0, 0, 0, 0, 0, -56.4879132, 0, 0, 0, 50.1473938, 0, 0, 0, 0, 0, 0, 0, 0, + 40.2219566, 0, 0, 0, 84.5162074, 0, 0, 0, -73.3030606, 0, -10.9258316, 0, 0, + 0, 0, 97.5496436, -70.5026182, 0, 62.3611696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 96.4362226, 0, 0, 0, 0, 0, 0, 0, -6.0104764, 15.7466756 +], [ + -38.7678174, 0, 0, 0, 0, 10.5238486, 0, 0, 0, 31.6876676, 79.6111978, 0, 0, + 0, 0, 45.7314046, 0, 0, 0, -10.0125122, 0, 93.3170242, -96.4566224, + -5.853298, 0, -82.2848728, 0, 0, 0, 0, 0, 0, 0, 43.3427638, 24.6186934, 0, + 44.859548, 0, -63.8196424, 0, 32.6630616, 41.48423, 0, -42.9613722, 0, 0, + -68.8954844, 0, 0, 0, 0, 0, 0, 0, 0, 27.7424034, -33.4867534, -49.1827758, + 0, 18.7014116, 0, 0, 59.049662, 0, 0, 0, 0, 0, 0, -29.6305028, 0, 0, 0, 0, + 0, 98.2266078 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -14.6583468, 0, -74.4490466, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -94.9604028, 0, 0, -48.28403, -41.3534342, 0, 0, 0, 62.9532972, 0, + 0, 4.030284, 0, -60.478996, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -46.5887848, 39.4565458, 0, 0, 0, 0, 0, 0, 0, -48.5071236, 0, 0, 0, + 41.8640204, 0, 0, 0, 74.271524, 0, 15.5769242, 0, -61.4793904, 52.4500934 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50.8387116, 0, 46.490051, 0, -54.9751352, 0, + 43.0696416, 0, 0, 0, 0, 80.5337704, 0, 0, -16.0325234, 0, 0, 0, 0, 0, 0, 0, + 0, 63.186351, 0, 0, 0, 0, 0, 75.2218604, -27.3783446, 0, 0, 0, 0, + -85.021934, 60.9043202, 55.7344594, 0, 41.1687556, 0, 5.574124, 0, 0, + -5.0028254, -40.2614834, 0, 0, 0, 0, 0, 0, 22.207679, 0, 0, 0, 0, 0, + 65.0504204, 0, -61.4580018, -90.137276, 19.2277196, 0, 0, -73.8615034 +], [ + 0, 0, 0, 0, 0, -21.3303052, -75.4586018, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 84.6730538, -3.4478344, 0, -76.083503, 19.9372656, + -38.9938322, 0, 0, 36.0135034, 0, -56.8457144, 0, 0, 63.4198336, 0, 0, 0, 0, + 0, -63.4419798, 28.5629988, 0, 0, 0, 0, 38.8001126, 0, 0, 47.2148438, 0, + -19.256673, -24.8778354, -47.8193252, 0, 0, -38.7279908, 0, 0, 0, + -34.5546658, 0, -96.7675822, 0, 0, 0, 0, 0, 0, 0, 0, 27.9437518 +], [ + 0, -17.8703906, 0, 0, -47.2114204, 0, -73.3595682, 66.668341, 0, 0, 0, 0, + 30.250278, 0, -40.452007, 0, 0, 0, 0, 0, -37.5013244, 34.3045856, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12.898457, -15.2838318, 0, 0, + 0, 0, 0, 16.333021, 0, 72.0452526, 0, 2.285458, 0, 0, 0, 0, -17.8073046, 0, + 0, 0, 81.7271146, 0, 0, -17.7174538, 0, -62.6694996, 8.7298318, 0, 0, 0, 0, + 0, 0, -27.1131974, 0, -68.0964272 +], [ + 0, 0, 0, 0, -22.1791216, 16.588597, -19.4545486, 0, -74.8318248, + -74.4252462, 0, 0, 0, -46.1656546, 0, 0, -21.1620788, 0, -25.6883764, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34.5550634, 0, 0, 0, 0, 93.8894398, 0, -30.961635, 0, + 0, 0, 0, 0, 78.594791, 0, 0, -63.3427616, 52.6543374, 0, 0, 38.4578962, 0, + 0, -56.5589394, 0, 0, 0.6873802, 0, -83.496155, 0, 0, 0, 13.0737006, 0, + -41.7343216, 71.8170636, 69.0276666, 0, 0, 57.722026, 0, 0, -93.1746526, 0, + 0, 0, 0, -49.9838934 +], [ + 0, 4.2310134, -77.9001854, -57.1049418, 0, 53.3411444, 0, 0, 62.3456148, 0, + 0, 68.2636062, 0, 0, -97.5234598, 0, 87.5610236, 0, 0, 0, 0, -77.3855948, 0, + 0, -90.724008, 28.2231562, 0, 53.026918, 0, 0, 0, -76.15995, 0, 0, 0, + 15.413813, 0, 0, 0, 0, 0, 0, 0, 0, 13.0272308, 0, 0, -23.9738128, + 38.7553414, 0, 30.9290494, -35.5982432, 0, 0, 0, -45.1103148, 0, 0, 0, + 70.158022, 0, 0, 0, 0, 0, 54.120183, 0, 0, 0, -41.9285314, 0, 0, 0, 0, + 14.1035676, 33.7857218 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 63.3716696, 0, 0, 0, 0, 0, 24.0919054, 0, 0, 0, 0, + 0, 0, 0, 0, 11.3748388, 0, 0, 95.3405052, 93.4694228, 0, 0, -45.255791, 0, + 0, 0, 0, 0, 0, 0, 0, -1.0475536, 60.84603, 0, 0, -10.47761, 0, 26.1100158, + -51.9159084, 0, 0, 0, 0, 0, 0, -65.6123578, 0, -91.0146766, 0, 0, 0, 0, 0, + 0, 0, -21.2845524, 0, 35.7297864, 0, 0, 0, 0, 0, 0, 15.911098, 0, 0, + -12.9287238 +], [ + 0, 0, 4.6786386, 0, 0, 1.6495644, 0, 0, 0, 26.96434, 0, 0, 0, 58.7515752, 0, + 0, 0, -47.6494254, 0, -54.2669514, 72.894442, 0, 0, 95.889445, 0, + 68.8888298, -66.11831, 0, -23.7891422, 79.7630012, 0, 0, 0, -63.9280642, 0, + 0, 0, 0, -32.1729936, 0, 0, -44.1408756, 0, 0, 0, 0, -43.6440432, 0, 0, 0, + 0, 0, 0, 0, 0, 9.0521906, 0, 0, -26.1975436, 0, 45.9278082, 0, 0, 29.678958, + 0, 0, 0, 0, 0, 5.9131246, -82.314248, 0, -56.8775976, -43.6011182, 0, + -28.0599468 +], [ + 44.0699428, 0, -0.2569744, 0, 0, 0, 10.53932, 0, -89.8739242, 0, 0, 0, 0, + -39.5334882, -60.036911, 96.86551, 0, -59.6306248, 0, 76.9520134, 0, 0, 0, + 0, 0, 55.2369732, 0, 0, 0, 0, -41.8466046, 0, 0, -5.291202, 0, -18.5051634, + 0, 0, 0, 0, 0, 47.1813778, 92.5194464, 90.690835, 56.7657076, 0, 0, 0, + -42.1944794, 0, 0, 0, -69.1124266, 0, 0, 0, 0, 0, 0, 0, -14.4018142, + -36.9699736, 0, 0, 0, 0, 0, 0, 41.4981516, -1.5870996, 0, -73.7309526, + -68.2179518, 0, 5.1895272, -29.7117264 +], [ + 90.3158852, 54.7711894, 0, 0, 0, 0, 0, 0, 0, -92.2564004, -20.8178774, 0, + 17.3192726, 0, 2.5685474, 0, 0, 0, 0, -21.96248, 0, -83.8507778, 0, 0, 0, 0, + -81.769375, 0, 0, 0, -73.8973162, 0, 0, 0, 0, 0, 0, -96.8790628, 0, + -29.2883476, 0, 0, -73.2399312, 0, 0, 0, 56.465223, 0, -10.1549238, 0, 0, + 44.7135732, 0, 0, 0, 0, -37.8912668, 61.0703958, 0, 0, 0, 94.563183, + 2.1777518, 0, 0, 0, 0, 0, 0, 69.8987148, 0, 0, 0, 58.5987754, 0, -73.701682 +], [ + 0, 25.7383596, 0, 43.2784374, 0, 0, 0, 0, 0, 0, 0, 65.3498334, 0, + -51.6680898, 0, 0, 0, -32.4960916, 0, -61.8512302, 0, 0, 0, 0, 66.0087116, + 0, 0, 0, 0, 0, -69.5971312, -68.5339006, 0, -87.9115714, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 13.6412636, 0, -33.3575526, 0, -34.6876284, 0, 0, 0, 0, + 0, -5.195929, 0, 0, 0, 0, 0, 0, -62.551799, 0, 0, 0, 0, 0, 0, 0, 0, + -85.6796076, 0, -69.9796424 +], [ + 0, -67.7487338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -89.686036, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35.3396338, -51.2668318, 0, 0, + -9.4925338, 0, 0, 0, 0, 0, 0, 0, 0, -74.049299, 0, 0, 0, 6.669526, 0, 0, 0, + 0, 82.3839076, 0, 0, 0, -63.2986138, 0, 0, 0, 29.4639612, 0, 0, -75.2754458, + 0, 0, 10.6058324, 83.9439366, 48.4539264, 0, 0, 0, 0, 8.6922024, 17.82273 +], [ + -12.5659444, 0, 0, 0, 0, 0, -16.0039068, 0, 0, 0, 0, -64.5579896, 0, + 25.3425712, 0, 0, 0, 0, -73.3525686, 0, 0, 0, 41.4534476, 0, 0, 35.6355928, + 82.0438356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16.5500598, 0, 17.4573382, + -30.4230828, 68.6250598, 0, 0, -70.7101786, 0, 0, 0, 0, 0, 19.070679, 0, 0, + 0, 0, 0, 0, 0, -69.0034118, 0, -32.8881618, 0, 99.6116696, -41.8557658, + -36.91302, 0, 0, 0, 0, 0, 25.1313946, 0, 0, 0, 0, 0, 66.1785624 +], [ + -28.5551034, -60.2641954, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.4765054, 0, 0, 0, 0, + 0, 0, 78.1818898, 0, 0, 0, 0, 34.0574966, 0, 0, 0, 3.3327304, 0, 0, 0, 0, 0, + 0, 0, -25.4031686, -6.4345882, 0, 0, 0, 0, 0, 70.724926, 0, 0, 0, 0, 0, 0, + -34.578727, 0, 0, 0, 0, 73.4821434, 0, 0, 0, 0, -78.7097278, 0, 0, 0, + -56.0390914, -77.1810362, 95.2972308, 0, -88.304829, 0, -11.4076234, 0, 0, + 0, 0, 0, -53.8368524 +], [ + 0, 0, 53.7291982, 0, 0, 0, 0, 0, 0, 0, 0, 90.7870612, -66.2974882, 0, + -92.2201462, -15.7252186, 0, 0, 0, 0, 0, -25.4072904, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32.8926792, 36.9923848, 0, 0, 0, 0, 33.293754, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5.689557, 0, 0, 89.5416534, 40.4300196, 0, 0, 2.8394972, + 90.7550328, 0, 0, 71.835872, 30.8157976, -96.7796296, 0, 44.1461388, 0, 0, + -32.5545222, 0, 75.597677, 0, 0, 0, 0, 33.146892 +], [ + 0, -36.157067, 0, 0, -0.4087578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13.1871604, 0, + 60.6086354, 84.4235272, 0, 0, 89.0383032, 0, 0, 0, -43.0195992, 0, + -99.31608, 0, -64.2154682, 0, 0, 0, 76.5304532, 0, 0, 0, 0, 0, 82.052369, 0, + -72.450166, 0, 0, 0, 23.4129134, 0, 0, 0, 0, 0, 0, 0, 0, 53.3291088, 0, 0, + 0, 73.435697, 87.3597806, 0, -94.1974698, 0, 0, 0, 0, 59.0496292, 0, 0, 0, + -13.8506028, 0, 0, -42.6003178, 0, 0, 55.1715212 +], [ + 0, 0, 0, -67.8709314, 0, 0, 0, 0, 0, 0, 0, -9.678326, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28.014314, 0, 0, 0, 0, + 0, 0, 0, 0, -36.8865788, 0, 0, -98.739389, 0, 0, 0, 0, 0, 0, -86.2168946, 0, + 44.1228816, 0, 0, 0, 0, 0, 0, -36.6609072, 0, 0, 0, 0, 18.3461886, + 98.9990466, 30.4109678, 0, 0, 0, -39.2683046 +], [ + -49.3558704, 0, 0, -31.3665258, 0, 0, 0, 0, 0, 0, 1.7897898, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -15.7715374, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -50.0629034, 0, 0, 0, 0, 0, 0, 0, 35.8856254, 0, -51.062155, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 78.136688, 0, 0, 0, 0, -41.5917514, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 73.1472674, 0, -77.9015418 +], [ + 0, -6.5048614, -28.611729, 0, 0, -97.9680564, 33.7007078, -70.5347856, 0, + 17.197908, 0, 19.8776858, -24.4246618, 0, 0, 53.363481, 0, 0, 0, + -44.7872848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -74.0599438, -81.2162694, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -68.6473592, 0, + 39.894997, 0, 0, -38.5305628, 0, -5.244101, 0, 0, 46.6040974, 2.4384956, 0, + 0, -26.8264528, 0, 0, -98.5537452, 2.6463192, 0, 0, 0, 0.4769732 +], [ + 0, 0, 0, 0, -52.7430298, 1.8510158, -39.691072, 0, 0, 0, 0, 0, 95.6497418, + 0, 0, -48.04896, 0, -26.6728378, 0, 0, 0, 0, 0, -12.3921976, -65.5861706, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -57.9815088, 0, 77.6808808, 0, 0, 0, 94.6506526, 0, 0, 0, 55.8427672, 0, 0, + -0.6995066, 0, -78.3071326, 0, 0, 0, 0, 0, 0, 0, 0, 0, -67.9654476 +], [ + 0, -23.0019946, 0, 0, 95.4877116, 0, 0, 0, 0, 0, -36.573767, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90.1862622, -36.4728966, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86.6126918, 0, 0, 0, 0, 0, 0, 0, + -80.1067184, 0, 31.8472788, 27.496628, -66.6206162, 0, 0, 9.1957296, 0, + 37.2257526, 0, 0, 0, 0, 0, 0, 0, -39.1637322, 0, 0, 74.4924622 +], [ + 0, 0, -25.4147588, 6.2424662, 0, 0, 0, 0, 0, 0, 92.5623938, -92.810452, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -45.0048688, 0, 0, -32.1678062, 0, 0, 0, 9.8719598, + -33.7145476, -16.3449354, 0, 70.462643, 0, 0, 14.5356206, 0, 0, 0, 0, + -95.1218374, 0, 0, 0, 0, -0.8077516, 0, 0, 0, 0, 0, 53.7434994, 0, 0, 0, 0, + 0, 5.376533, 0, 0, 0, 0, 0, 0, -1.125953, 75.3929928, 0, 0, 0, 0, 0, + -17.8555478, 0, 0, 87.130332, -46.977091 +], [ + -57.0064908, 0, -61.469472, 0, 0, 94.2906142, 0, 10.1214686, 0, 0, 0, 0, 0, + 0, 0, 0, 90.8859632, 0, -31.3550928, 25.4391198, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -30.6974596, 0, 16.8162692, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -40.946388, + -23.914437, -39.0760436, 0, 0, 12.4664916, 0, 0, 0, 59.3854694, 0, 0, + -79.029102, 0, 48.0444832, 0, 0, 0, 0, 0, 0, 0, -34.447419, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -42.8371356 +], [ + -46.3742298, 0, 0, 0, 0, 6.4096268, 0, 0, 0, 0, 0, 0, 0, 0, 53.7055136, + 41.0589284, 0, 0, 0, 0, 0, 0, -59.494163, 78.2644798, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3.5467882, 0, 0, 0, 0, 0, -33.8146284, 0, 81.1209896, 0, 0, + 0, 0, 0, 0, -59.120982, 0, 0, 0, 0, 20.5082176, 0, 0, -32.2137818, + 41.6679682, 98.4426286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18.7911844 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22.5196126, -44.92426, 0, 0, 0, 0, -78.1154748, 95.3654376, 0, 0, 0, + -42.4266782, 73.3850132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94.1878774, + 90.3854666, 0, 0, 0, 0, 0, -15.9053536, -74.9423846, 47.214, 0, 0, 7.477562, + 0, 46.2206928, 19.1508454, 41.6978146, 39.03286, 0, 0, 0, 0, 0, -14.259302, + 0, 54.0542232, 0, 0, 44.5438142 +], [ + 95.3632006, 43.6928354, 75.8291588, -81.2577418, 0, 0, -91.248437, 0, 0, + 22.476879, -77.967431, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.0308978, -22.0727056, 0, + 0, 0, 0, 0, 0, 0, 17.126454, 0, -45.7583606, 0, 0, 32.9187018, 0, 0, 0, 0, + 0, -58.6847152, 0, 0, 39.113676, 0, 0, 0, 0, 0, 0, -80.1176538, 0, + -86.9570556, 0, 0, 0, -9.3462492, 0, 49.3616864, 0, 60.4773586, 0, 0, + 48.9766746, 17.5735282, 75.126033, 0, -50.8306992, 0, 0, 61.3438194, 0, 0, + -95.9051914, 0, 25.6497354 +], [ + -89.5581772, 0, 0, 0, 0, -37.7576814, 0, 0, 0, -50.475431, 0, 0, 0, 0, + -75.575654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6.7066106, 0, 0, 0, 68.702018, 0, 0, + 44.2841378, 0, 0, 0, 0, 0, 0, 0, 42.4183476, 80.6872178, 72.028214, 0, 0, 0, + -50.6912368, 0, 0, 0, 53.1913708, 0, 0, 0, 0, -50.0798868, 0, 0, 0, 0, 0, 0, + -99.54189, 0, 0, 0, 0, 87.8828622, 7.144766, 0, 0, 0, 71.8161494, + 91.0414654, 0, 0, -7.240427 +], [ + 0, -73.397517, 0, 0, 0, 0, -42.4633614, 0, 0, 0, 0, -2.3988294, -60.1970288, + -31.1370786, -16.4428054, 0, -86.5694254, 0, 0, 0, 0, 0, 0, 0, 0, + -33.759363, 0, 88.9440556, 0, 0, 0, 48.8687358, 0, 0, 60.1841648, 0, 0, + 81.5798018, 0, 0, 0, 0, 22.265044, 0, 0, 0, 0, -98.612946, 0, 0, 0, + -49.44052, 0, 46.9606012, 0, 0, 0, -23.7990468, 0, 0, 0, 0, -72.1702852, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 26.2623134, 0, -17.3386012 +], [ + 0, 16.4596174, 0, 0, 0, 0, -85.6599392, 0, 0, 0, 0, 0, 0, 93.708794, 0, + -37.5698758, 0, 0, 0, 0, 0, 0, -82.8927936, 0, 82.4183808, 0, 0, 0, 0, 0, 0, + 55.028266, 0, 0, 11.3484192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -60.7651522, -4.822581, 0, 29.0627604, 0, 0, 61.7042716, 41.5363722, + 73.9967868, 0, 0, 0, 0, 50.2308124, 0, 33.8231702, 0, 0, 0, 0, 0, + -14.7226996, 14.5401778, 0, -72.8145596, 19.9220286, -76.4609286 +], [ + 11.1687196, 0, 0, 0, 0, 0, 0, 0, -37.365205, 0, 0, 0, 52.0314298, 0, + -58.0558462, 0, 0, 18.6738906, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 59.6046802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.5944948, 0, 0, 0, + 77.0271992, 46.521059, 61.8258634, 0, 0, 36.079546, 0, -14.3080494, 0, + -50.1618478, 0, 0, 95.9445656, 0, 0, 0, 0, 0, 0, 0, 0, 0, -53.478982, + -90.3623976, 0, 0, -37.1575466 +], [ + 0, 0, 0, 0, 0, 0, 0, 78.882051, 0, 0, 57.8056512, 7.2056626, 0, 2.822132, + 40.311822, 0, 0, 0, 83.8935006, 0, 0, 91.2774482, 3.160849, 91.7410132, 0, + 0, 0, 0, 0, 2.7544652, 0, 0, 0, 0, 0, 16.8419108, 0, 0, 84.1171174, 0, + 21.3119752, -69.869284, 0, 0, 0, 0, 0, 92.1087118, 0, 0, 0, 0, 34.3473744, + 21.9890278, 0, -36.3139526, 0, 0, 0, 0, 0, 25.613497, -2.989159, 0, 0, 0, 0, + -49.2456622, 0, 0, 27.3140788, 0, 49.210258, 0, 0, -90.6896972 +], [ + 0, 0, 0, 0, 0, 0, -56.1947046, 0, 0, 52.6617176, 61.6283016, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -34.0759312, 0, 92.0200254, 0, 0, -9.7999914, 0, 0, 34.0572616, + 0, 0, 0, 0, 0, 59.7637334, 0, 0, 0, 0, 0, 43.5437732, 29.9690024, 0, 0, + 93.9438036, 0, 0, 0, 52.3867986, 0, 0, 0, 38.0567542, 0, -63.9851954, 0, + 73.1679634, 0, 0, -28.6636244, 0, 0, 0, 0, 0, 39.2894916, 0, -28.4364668, 0, + 0, 0, 0, 0, 0, 0, -32.2899456 +], [ + 15.3399588, 0, 0, 0, 0, 0, 0, -66.2540916, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14.7613734, 0, 0, 0, -32.9550622, 0, 0, -17.2710502, 0, 0, 0, + -66.7611862, 76.5708962, 93.3868072, 12.036471, 0, 0, 0, -74.2189184, 0, 0, + 0, 0, 58.0343866, 0, 71.0145124, 0, 0, 0, 0, 0, 0, 0, 80.7131208, 0, + -49.5191686, 40.2489602, 0, 0, 39.9664558, 0, 0, 0, 0, 0, 0, 51.704979, 0, + 20.9209752, 0, 0, -63.5800814 +], [ + 0, 0, 35.1676872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8.326191, 0, 0, 0, + -42.1405488, 0, 0, 0, 0, -64.9203894, 0, 0, 0, 86.5653072, 0, 17.1250418, 0, + 15.224998, -32.788739, 0, 0, 0, 13.1550612, 0, 0, 0, 93.3049176, 65.5504482, + 0, 35.8126186, -16.2474202, 0, -76.7788518, -51.9001008, 0, -89.725966, + 53.4895596, 0, 0, 0, 0, 0, 0, 0, 0, 0, -82.6077236, 0, 0, 0, -57.075872, + -52.5166376, 99.9479554, 0, 0, -89.7491862, 0, 18.6163306, 0, 29.1454254 +], [ + -18.8864514, 0, 0, 0, 0, 0, -46.6968628, -83.8123266, 0, 0, 0, 0, 0, 0, + -91.631792, 0, 0, 0, 0, -57.3455082, 66.459894, 0, 0, 0, -73.9341878, 0, 0, + 0, 81.8859882, 0, 0, 0, 0, 0, 28.0747908, 0, 0, 99.7796988, 0, 87.0296656, + 0, 0, 43.7722526, -60.65313, 98.6287198, 0, 20.8634118, 0, 0, 25.6519386, + 0.4939554, 0, 0, 0, 0, 0, 0, 0, 0, -74.9266526, 0, 0, -25.4234142, 0, + -91.054582, 0, -42.534282, 0, 0, 0, 0, 0, 0, 0, 0, 12.1491094 +], [ + 0, -90.5331764, 0, 0, 0, 0, 0, -8.1166918, 0, 0, 0, 0, 0, -34.0013692, + 21.9272646, 0, 0, 0, 0, 0, 93.2245032, 0, 21.8275426, 0, 0, 0, 38.5279608, + -6.0022692, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39.644863, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -93.7962256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.5363598, + 70.354452, 0, 0, 0, 32.2282298, 0, 36.659058, 0, 0, 53.992344 +], [ + -74.4430478, 0, 0, -93.4496218, 14.6437598, 0, 0, 0, -33.8297902, 0, 0, 0, + 0, 0, 0, -35.949213, 0, 0, -93.1678628, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -22.8806328, 0, 0, 0, 0, 0, 0, 0, 45.1466816, 88.4821604, 0, 0, -49.7769388, + 0, 0, 0, 0, 0, 0, 53.6290382, -40.4388272 +], [ + 71.2065308, 94.4966808, 0, 0, 0, 0, -84.2404402, 0, 0, 0, 0, 0, 61.7641462, + 0, 0, 0, -0.608018, -94.7698384, 0, 0, 0, 0, -3.4562834, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.0708126, -73.3657794, 26.6482556, 0, 0, 0, 0, + 0, 0, -66.9699546, -98.6726948, 0, 0, -25.4137958, 0, -88.7254432, + -81.2735544, 0, -23.3081526, 0, -51.8917252, 0, 0, 0, 0, 0, 0, 0, 0, + -52.3004828, 0, 0, 0, 0, 67.8542398, 0, -67.7489638, 32.2212522 +], [ + 0, 77.0252092, 0, 0, 0, 0, 0, -85.3271924, 0, 0, 0, -2.9308596, 0, + 83.448547, 0, 4.7835886, 0, 0, 0, 0, 76.590577, 0, 0, 0, 0, 0, 86.0180794, + 0, 0, -88.4030016, 0, 0, 0, -13.770426, 57.6068646, 0, 0, 0, 0, 0, + 12.6896788, 0, 0, 0, -78.1078136, -92.3074796, 0, 0, 0, 0, -94.3200626, 0, + 0, -7.987837, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52.7655986, 0, -78.2727176, + 0, 74.4309632, 48.3867546, -85.4142468, 0, 91.3888914, -6.0372808, + 51.1643348 +], [ + -77.4193002, 0, 0, 0, 0, 0, 0, 0, 41.0846988, -78.3265056, 0, 0, 0, 0, 0, 0, + 0, -20.408123, 10.7055032, 0, -19.5848354, 0, -32.624054, 0, 47.333306, 0, + -41.6545398, 0, 0, 0, 0, 0, 46.8131656, 0, 52.5387768, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -75.3511542, 0, 0, 0, 0, -27.6140242, 0, 0, -63.3032372, 0, 0, 0, 0, + 0, 0, 0, 0, -93.1854838, 0, 0, 0, 0, 32.3353436, -75.8659438, 89.852816, 0, + 9.7044216, 0, 94.9239572, 0, -57.0391726, 25.4894998 +], [ + 0, 0, 0, -27.2226392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -89.0780816, 0, 0, + 0, 0, 6.6342408, 0, 0, 92.3634346, -41.5559582, 0, 0, 0, 0, 0, 0, + -4.3499792, 18.9554522, 0, 29.992962, 0, 0, 0, 0, 0, 0, 0, 0, -51.9952794, + -40.3571344, 0, -61.0098328, 0, 0, 0, 0, 71.8571838, 97.3056784, 0, 0, + 27.798026, 0, 0, 20.3198544, 0, 0, 0, -82.1043534, 0, 0, 0, 0, 0, + 55.2807134, 0, 0, 0, 0, -90.8562594, -43.2271604 +], [ + 0, 0, 0, 0, 0, 15.2015056, 18.3740448, -11.2614058, 0, 0, 0, 0, 0, + 53.0086248, 0, -91.038908, 0, 0, 88.2707986, 3.2580272, 0, 0, 0, 0, 0, 0, 0, + 0, 88.8189254, 0, 0, 0, 0, -3.742353, 0, 0, 0, -41.4198488, 90.0966416, 0, + -22.474875, 0, -25.610863, -79.5943706, 0, 0, 0, 0, 0, 0, 0, -3.5616438, 0, + 0, 0, 88.5984932, 0, 0, 0, 0, 0, 0, 0, 22.4398688, 0, 0, 0, 0, 0, 0, 0, + -63.7422676, 0, 0, 0, -82.7150752 +], [ + 0, 0, 75.634243, -60.420708, 0, 0, 0, 0.8383984, 0, 0, -72.2791914, 0, 0, 0, + 17.1476022, 0, 0, -14.5930276, 9.4352026, 0, -30.1475326, 0, -53.7249052, 0, + 19.3293368, 0, 0, 0, -80.867335, 0, -3.344608, 71.3546388, -91.098817, 0, 0, + 0, -26.83234, 0, 3.7009, 0, 0, 0, 0, 0, 28.4006138, 0, 0, 57.1433046, + 14.4086186, 0, 0, 0, 49.5828354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17.0012008, 0, + 30.5581294, -98.7868224, 0, 0, 0, 70.0467486, -9.4444084, 0, 19.9250998, 0, + 0, -79.4970662 +], [ + 0, 54.0067274, 0, 0, 0, 37.9936634, 0, -20.1071476, -58.981429, 0, 0, + -83.9927614, 0, 0, 0, 0, 0, 0, -70.8571636, 0, 0, 68.4686496, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -8.1687508, 0, 0, 16.6835288, -10.1286606, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 86.4747972, 0, -34.6316042, 0.9788672, 0, 0, -41.4513542, + 0, 0, 0, 0, 0, 0, 0, 0, -28.4021576, -74.9076708, 0, -5.0425708, 0, 0, 0, + 78.9139852, -50.7082204, 0, 34.0684852, 28.2502302 +], [ + 0, 0, 0, 0, 0, 0, 0, 57.544994, 0, 0, -22.4411072, 0, -94.2568866, + -80.7849138, 0, 0, -10.0010618, 33.3160792, 0, 0, 0, 0, 0, 0, -82.6811248, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11.0390072, 0, 0, 32.0523166, 0, -80.6937396, + 0, -94.2671164, 0, 0, -16.2170198, 0, 0, 0, -5.7387768, 0, 0, 0, 0, + -83.6048238, 0, 0, 0, 0, 0, 0, 33.6877392, 0, -41.9784856, 0, 0, 0, + -50.6512854, 0, 78.737702, 0, 0, 0, 0, 0, 9.0618996 +], [ + 0, 0, 0, 0, 0, -94.8072128, 0, 21.9767716, 0, 0, 0, 57.7817378, 35.3840102, + 0, 0, 0, 60.4679182, -94.9978498, 0, -18.9377882, -42.3270372, 0, 0, 0, 0, + -3.9058912, 0, 0, 44.440235, 0, 0.41471, 0, 0, -88.0148602, 53.9755254, 0, + 0, 74.7772774, -19.633854, -66.6129164, -25.4637816, -13.1642082, 0, 0, 0, + 0, 57.6068044, 0, 0, -75.9060014, 24.0447026, 0, 0, 29.9750648, 0, 0, 0, + -54.938857, -4.4090126, 0, 0, 0, 0, 0, 0, -57.1202194, 0, -11.130658, 0, 0, + 95.6177756, -78.5403868, 0, 0, 30.4589622, -93.6950296 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -50.308444, 0, 0, 0, 0, 0, 0, 0, -20.3462364, + 0, 0, 25.6081088, 0, 0, 0, 0, 0, 0, 90.9877902, 0, -56.0922542, 99.2456868, + 0, 45.4316172, 0, 70.1339288, -54.576692, 0, 0, 0, -73.6910292, 0, 0, 0, 0, + 0, 0, 38.6032202, 0, 0, 0, 60.7387286, 0, 0, 0, 0, 0, 0, 0, 0, 95.207832, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58.4721284 +], [ + 0.3163476, 0, 0, 13.0918568, 5.13089, 0, 40.7266308, 0, 0, 0, 0, 0, + -98.7077428, 0, 81.000503, 0, 0, 76.3945372, 0, 0, 0, 0, 0, 0, -10.2289084, + -70.592702, 0, 0, 0, 0, 0, 0, 69.59571, 0, 0, 0, 0, 0, -61.4746908, + 53.4041094, 0, 90.4397278, -33.1874988, 0, 0, 71.5512744, 5.846105, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56.7568638, 0, 0, 66.7588344, 0, 0, 0, + 99.284785, 0, 0, 0, 0, 0, 0, -99.2850048, -85.4466004 +], [ + 0, 0, -34.544278, 0, 0, -36.135124, -33.4259354, 0, 0, -60.4256326, 0, + 44.7734168, 0, 0, 0, 0, -88.6744704, 0, 0, 0, 0, 0, 0, 0, 0, -95.3752508, + 4.596855, 85.2924422, 70.9081648, 22.0390844, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1.6872456, 0, 0, 0, 0, 0, 0, 0, -37.4782422, 0, 0, 0, 0, 0, 0, 0, 0, + 4.7642096, 0, 0, -33.6313218, 0, 0, 72.977526, 0, 0, 0, 0, 0, 0, 2.5063252, + 0, 0, 0, 0, 0, -64.8677902 +], [ + 0, 0, 0, 3.718989, 0, 0, 49.3814782, 77.868826, 0, 0, 0, 0, 0, 0, 0, 0, + -49.7008846, 0, 4.696494, 0, 0, 0, 0, 0, 0, 0, -59.4928602, 0, 0, 0, 0, 0, + 82.6840644, -0.996624, -15.8014198, -93.098215, 0, 0, 41.2709314, 0, + -90.9633198, -56.911012, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26.02585, 0, 0, 0, 0, + 0, 0, 61.2353938, 0, 0, 0, 0, 21.376448, 0, 0, 0, 0, 0, 0, 0, 97.0578858, 0, + 0, 0, 5.1265226 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -19.5643656, 0, 0, + -92.0307416, 0, 0, 0, 0, 55.003856, 0, 0, -20.4708104, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54.4588824, 0, 0, 0, 0, 0, 0, 0, 0, + -57.0182252, 0, 0, -48.3222128, 0, 0, 0, -41.1121382, 0, 0, 0, 0, 0, 0, + -12.2773602, 0, -28.6924808, 50.0415338 +], [ + 0, 0, 0, -73.9719246, 0, 0, 0, 0, 0, 0, 0, 39.4110332, 0, 0, -21.6757132, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74.8739354, 0, 0, + -52.9210426, 0, 46.7750368, 63.6311858, 0, 0, 0, 0, 25.5310902, 0, + -3.0369126, 0, 32.5437816, 0, 0, 78.9107496, 32.0416448, 0, 0, 15.9408846, + 0, 0, 0, 0, -67.7582854, -52.6103086, 0, 0, 0, 0, 0, 0, 11.8676176, 0, 0, + -41.8820812, 43.608357, 0, 0, -64.3752572 +], [ + 0, -15.1648222, -57.5273074, -94.2919124, -3.0777222, -77.345826, + 91.2777856, 0, 0, 0, 0, 13.5044774, 0, 0, 0, 0, 0, 0, 0, 0, 33.5509618, 0, + 0, -33.291092, -60.3050638, 0, 0, 0, 94.610171, 0, 0, 0, 0, 0, 0, + -47.270154, -81.403122, 0, 0, 47.829269, 0, 0, 0, 0, -47.4699122, 0, 0, + -31.0161918, 0, 0, -54.993563, -9.6544012, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -17.0644648, 0, 0, 0, 0, 0, 0, 49.0555938, -82.4686508, 0, 0, 97.7299292, 0, + 0, -93.1718028 +], [ + 0, 0, 0, 45.5639954, 0, 0, 0, 0, 0, 92.3127826, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -5.8746296, 22.9079182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25.2727812, 0, 0, 0, 0, 0, 0, 65.0012614, 0, 67.4376806, 0, 0, 14.0298002, + 0, 0, 0, 0, 0, 33.432514, 43.000429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20.2757068, + 4.0567932, 0, 0, -15.8737758, 0, 0, 0, 0, 29.8957398, 50.0218946, 17.0262346 +], [ + 46.1658228, 19.630724, 0, 0, 0, 0, 0, 80.6073204, 24.5091878, 0, 0, 0, + 73.9258848, 0, 0, 0, -98.2044476, 0, 0, 0, 0, -59.2213968, 0, -70.1450004, + 0, 0, 0, 42.4721292, 0, -73.0346074, 0, 67.9829686, 0, 0, 0, 0, 6.6597886, + 39.7215082, 0, 0, 0, 52.505292, 95.9204336, 0, 0, 5.8797776, 0, 0, 0, + 36.0738246, 0, -15.2667614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50.963131, 0, 0, 0, + 49.3354032, 13.7868492, 0, 77.3708062, 26.0888548, 0, 0, 0, 0, -60.0881692, + 24.2459968 +], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56.562023, 0, 0, 24.9145996, 0, 0, 0, 0, + 32.8196724, -75.8879774, -12.4005106, 0, 0, 0, 0, -18.824482, -45.0330046, + 0, 0, -47.5493022, 0, 0, 0, 8.1879572, 0, 0, 4.5700222, -28.6731266, 0, 0, + 0, 0, -83.2735948, 5.4624948, 0, 0, 0, 0, 0, 0, 0, 83.664375, -52.8630198, + 58.5805764, 0, 0, 0, 45.5781336, 0, 0, -1.9768322, 0, 0, 0, 0, 91.1151128, + 0, 0, 0, 0, 0, 0, -65.5158586, 0, -22.12762 +], [ + 0, 0, 0, 0, 0, -50.8301006, 0, -57.183698, -24.666489, 43.0557936, 0, 0, 0, + -44.0812116, 0, 0, 0, 97.1670056, 0, 0, 0, 0, 83.4511366, 0, -96.8912356, + -6.1095452, 87.6643268, 0, 0, 0, -32.5223614, 0, 0, 0, 0, -18.5596964, 0, + 56.1790224, 0, 25.6035684, 0, 0, 0, 0, -46.8740154, 0, 0, 0, 0, 0, 0, 0, + -44.4329434, -34.719678, 85.6384822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 48.9669952, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28.2571694 +], [ + 0, 0, 0, 0, 42.1192158, 18.3800218, 0, 0, 33.4475094, 0, -39.4713432, 0, + 54.9744572, 0, -6.6305664, 79.0252374, 77.6908818, -61.5099746, 0, 0, + 38.4501814, 0, 0, -96.4250704, -27.809694, -34.9250884, 63.2997728, 0, + -98.8800042, 0, -7.682428, 0, 0, 0, 0, 0, 0, 7.7256608, 0, 48.5546152, 0, 0, + 0, 0, 0, 0, -58.963373, 0, 0, 0, 0, 0, 86.5062664, 7.0006556, 0, 0, 0, 0, 0, + 0, 3.1958572, 0, -46.2861844, 0, 0, 0, 0, 30.0710902, 46.6948898, 0, + 68.4681908, 0, 0, 0, 0, -51.3930766 +], [ + 7.1969236, 0, -79.6160432, -39.947334, -15.2636342, 0, 10.0645898, + -57.8968238, -31.9945476, 0, 91.5839662, -52.777566, 0, 0, 0, 0, + -40.9252974, 0, 0, 0, -45.5113982, 70.585349, 0, 0, 0, 0, 0, 0, 0, 0, + -66.2523308, 0, 0, 0, 0, 0, 0, 0, 0, 85.7454324, -7.1148372, 0, 93.6584844, + 0, 0, 0, 0, 0, 0, -8.0414788, 0, 0, 0, 0, 51.3263388, 0, 0, 79.892422, 0, 0, + -64.6934098, 0, 0, -45.9577622, 0, 0, 0, -46.8290526, 0, 48.2417506, 0, 0, + 0, 0, -2.4115812, -50.7156922 +], [ + 62.9870494, -81.5584552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53.7333104, 0, + 50.6438202, -57.7938262, 0, 0, 0, 0, -78.1108892, 0, 0, 0, 0, 0, 0, 0, + 87.6584692, 0, 58.2960112, -17.5355398, 12.0497204, -60.5414862, 0, 0, 0, 0, + 0, 0, 0, 0, 38.586472, -19.7940052, 94.423359, -89.557933, 0, 0, + -77.0715722, 0, -87.707166, 70.8585278, 0, 9.0616914, 91.333051, 0, 0, 0, + 5.8166112, 0, 24.7793442, -51.000038, 0, 0, 0, 0, 0, 0, 79.9657776, + 97.4969126, 0, 0, 0, 0, -73.8994394 +], [ + 10.133741, 0, 0, 0, 95.6910336, 0, 0, 0, 0, -22.6696236, 0, 0, 0, 0, + 15.137996, 35.7088464, 0, -16.1971956, 0, -29.4834358, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -89.868739, 24.0040126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40.7292396, 35.7709458, 0, 34.690347, 22.3083532, 0, 0, 0, 0, 0, + -48.4224164, 0, 0, 0, 0, 91.7670744, 0, 0, 69.4045014, 0, 60.5937114, + -38.9993134, 0, 0, 0, 0, 0, 55.4599018, 0, 86.689944 +], [ + 0, 0, -24.842169, -52.997003, 0, 0, 0, 0, 0, 0, 0, 5.9075842, 0, 0, + -91.1447252, -5.3147106, 0, 0, 0, 4.4670454, 34.97343, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -5.3957052, 0, 0, 0, 0, -19.2118838, 0, 0, 0, 0, 0, 0, 0, 0, + 64.9559324, 0, 0, -10.0586402, 0, -74.8523334, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84.8495464, 0, 0, 0, 0, 0, 0, 33.0825986, 46.995148, 0, 0, 0, -4.243203, 0, + 0, -24.0124188 +]] class ObjectiveSolutionPrinter(cp_model.CpSolverSolutionCallback): diff --git a/examples/python/random_tsp.py b/examples/python/random_tsp.py index 46db637f18..02a5070722 100755 --- a/examples/python/random_tsp.py +++ b/examples/python/random_tsp.py @@ -80,8 +80,8 @@ class RandomMatrix(object): distance_max) def Distance(self, manager, from_index, to_index): - return self.matrix[manager.IndexToNode(from_index)][ - manager.IndexToNode(to_index)] + return self.matrix[manager.IndexToNode(from_index)][manager.IndexToNode( + to_index)] def main(args): diff --git a/examples/python/rcpsp_sat.py b/examples/python/rcpsp_sat.py index cc618b99c6..933935274a 100644 --- a/examples/python/rcpsp_sat.py +++ b/examples/python/rcpsp_sat.py @@ -81,8 +81,7 @@ def solve_rcpsp(problem, proto_file, params): horizon = problem.deadline if problem.deadline != -1 else problem.horizon if horizon == -1: # Naive computation. - horizon = sum( - max(r.duration for r in t.recipes) for t in problem.tasks) + horizon = sum(max(r.duration for r in t.recipes) for t in problem.tasks) if problem.is_rcpsp_max: for t in problem.tasks: for sd in t.successor_delays: @@ -116,8 +115,7 @@ def solve_rcpsp(problem, proto_file, params): if len(task.recipes) == 1: # Create interval. recipe = task.recipes[0] - task_starts[t] = model.NewIntVar(0, horizon, - 'start_of_task_%i' % t) + task_starts[t] = model.NewIntVar(0, horizon, 'start_of_task_%i' % t) task_ends[t] = model.NewIntVar(0, horizon, 'end_of_task_%i' % t) interval = model.NewIntervalVar(task_starts[t], recipe.duration, task_ends[t], 'interval_%i' % t) @@ -173,8 +171,7 @@ def solve_rcpsp(problem, proto_file, params): presences_per_resource[res].append(is_present) # Create the master interval for the task. - task_starts[t] = model.NewIntVar(0, horizon, - 'start_of_task_%i' % t) + task_starts[t] = model.NewIntVar(0, horizon, 'start_of_task_%i' % t) task_ends[t] = model.NewIntVar(0, horizon, 'end_of_task_%i' % t) duration = model.NewIntVar(min_size, max_size, 'duration_of_task_%i' % t) @@ -187,8 +184,7 @@ def solve_rcpsp(problem, proto_file, params): model.Add( task_starts[t] == starts_per_task[t][r]).OnlyEnforceIf(p) model.Add(task_ends[t] == ends_per_task[t][r]).OnlyEnforceIf(p) - model.Add( - duration == task.recipes[r].duration).OnlyEnforceIf(p) + model.Add(duration == task.recipes[r].duration).OnlyEnforceIf(p) model.Add(sum(presences_per_task[t]) == 1) # Create makespan variable @@ -261,9 +257,8 @@ def solve_rcpsp(problem, proto_file, params): # Objective. if problem.is_resource_investment: objective = model.NewIntVar(0, max_cost, 'capacity_costs') - model.Add(objective == sum( - problem.resources[i].unit_cost * capacities[i] - for i in range(len(capacities)))) + model.Add(objective == sum(problem.resources[i].unit_cost * capacities[ + i] for i in range(len(capacities)))) else: objective = makespan diff --git a/examples/python/shift_scheduling_sat.py b/examples/python/shift_scheduling_sat.py index 25f269a78f..840a7a6c9c 100644 --- a/examples/python/shift_scheduling_sat.py +++ b/examples/python/shift_scheduling_sat.py @@ -308,8 +308,8 @@ def solve_shift_scheduling(params, output_proto): works = [work[e, shift, d] for d in range(num_days)] variables, coeffs = add_soft_sequence_constraint( model, works, hard_min, soft_min, min_cost, soft_max, hard_max, - max_cost, - 'shift_constraint(employee %i, shift %i)' % (e, shift)) + max_cost, 'shift_constraint(employee %i, shift %i)' % (e, + shift)) obj_bool_vars.extend(variables) obj_bool_coeffs.extend(coeffs) @@ -367,9 +367,9 @@ def solve_shift_scheduling(params, output_proto): # Objective model.Minimize( sum(obj_bool_vars[i] * obj_bool_coeffs[i] - for i in range(len(obj_bool_vars))) + sum( - obj_int_vars[i] * obj_int_coeffs[i] - for i in range(len(obj_int_vars)))) + for i in range(len(obj_bool_vars))) + + sum(obj_int_vars[i] * obj_int_coeffs[i] + for i in range(len(obj_int_vars)))) if output_proto: print('Writing proto to %s' % output_proto) diff --git a/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py b/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py index dba2d55ebc..f6306c3b84 100644 --- a/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py +++ b/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py @@ -198,8 +198,7 @@ def main(args): name_suffix = '_%i' % job_id start = model.NewIntVar(release_date, due_date, 's' + name_suffix) end = model.NewIntVar(release_date, due_date, 'e' + name_suffix) - interval = model.NewIntervalVar(start, duration, end, - 'i' + name_suffix) + interval = model.NewIntervalVar(start, duration, end, 'i' + name_suffix) starts.append(start) ends.append(end) intervals.append(interval) @@ -235,8 +234,8 @@ def main(args): model.Add(starts[j] == ends[i] + setup_times[i + 1][j]).OnlyEnforceIf(lit) else: - model.Add(starts[j] >= ends[i] + - setup_times[i + 1][j]).OnlyEnforceIf(lit) + model.Add(starts[j] >= + ends[i] + setup_times[i + 1][j]).OnlyEnforceIf(lit) model.AddCircuit(arcs) @@ -269,9 +268,9 @@ def main(args): solver.SolveWithSolutionCallback(model, solution_printer) print(solver.ResponseStats()) for job_id in all_jobs: - print( - 'job %i starts at %i end ends at %i' % - (job_id, solver.Value(starts[job_id]), solver.Value(ends[job_id]))) + print('job %i starts at %i end ends at %i' % + (job_id, solver.Value(starts[job_id]), + solver.Value(ends[job_id]))) if __name__ == '__main__': diff --git a/examples/python/steel_mill_slab_sat.py b/examples/python/steel_mill_slab_sat.py index 3d36cc1b17..14a9d03792 100644 --- a/examples/python/steel_mill_slab_sat.py +++ b/examples/python/steel_mill_slab_sat.py @@ -347,14 +347,12 @@ def steel_mill_slab(problem, break_symmetries, output_proto): for s in all_slabs ] color_is_in_slab = [[ - model.NewBoolVar('color_%i_in_slab_%i' % (c + 1, s)) - for c in all_colors + model.NewBoolVar('color_%i_in_slab_%i' % (c + 1, s)) for c in all_colors ] for s in all_slabs] # Compute load of all slabs. for s in all_slabs: - model.Add( - sum(assign[o][s] * widths[o] for o in all_orders) == loads[s]) + model.Add(sum(assign[o][s] * widths[o] for o in all_orders) == loads[s]) # Orders are assigned to one slab. for o in all_orders: @@ -444,8 +442,9 @@ def steel_mill_slab(problem, break_symmetries, output_proto): ### Output the solution. if status == cp_model.OPTIMAL: - print('Loss = %i, time = %f s, %i conflicts' % ( - solver.ObjectiveValue(), solver.WallTime(), solver.NumConflicts())) + print('Loss = %i, time = %f s, %i conflicts' % + (solver.ObjectiveValue(), solver.WallTime(), + solver.NumConflicts())) else: print('No solution') @@ -477,9 +476,7 @@ def collect_valid_slabs(capacities, colors, widths, loss_array, all_colors): assign = [model.NewBoolVar('assign_%i' % o) for o in all_orders] load = model.NewIntVar(0, max_capacity, 'load') - color_in_slab = [ - model.NewBoolVar('color_%i' % (c + 1)) for c in all_colors - ] + color_in_slab = [model.NewBoolVar('color_%i' % (c + 1)) for c in all_colors] # Compute load. model.Add(sum(assign[o] * widths[o] for o in all_orders) == load) @@ -538,9 +535,7 @@ def steel_mill_slab_with_valid_slabs(problem, break_symmetries, output_proto): assign = [[ model.NewBoolVar('assign_%i_to_slab_%i' % (o, s)) for s in all_slabs ] for o in all_orders] - loads = [ - model.NewIntVar(0, max_capacity, 'load_%i' % s) for s in all_slabs - ] + loads = [model.NewIntVar(0, max_capacity, 'load_%i' % s) for s in all_slabs] losses = [model.NewIntVar(0, max_loss, 'loss_%i' % s) for s in all_slabs] unsorted_valid_slabs = collect_valid_slabs(capacities, colors, widths, @@ -553,8 +548,8 @@ def steel_mill_slab_with_valid_slabs(problem, break_symmetries, output_proto): for s in all_slabs: model.AddAllowedAssignments( - [assign[o][s] for o in all_orders] + [losses[s], loads[s]], - valid_slabs) + [assign[o][s] + for o in all_orders] + [losses[s], loads[s]], valid_slabs) # Orders are assigned to one slab. for o in all_orders: @@ -595,8 +590,7 @@ def steel_mill_slab_with_valid_slabs(problem, break_symmetries, output_proto): for w, os in local_width_to_order.items(): if len(os) > 1: for p in range(len(os) - 1): - ordered_equivalent_orders.append((os[p], - os[p + 1])) + ordered_equivalent_orders.append((os[p], os[p + 1])) for w, os in width_to_unique_color_order.items(): if len(os) > 1: for p in range(len(os) - 1): @@ -640,8 +634,9 @@ def steel_mill_slab_with_valid_slabs(problem, break_symmetries, output_proto): ### Output the solution. if status == cp_model.OPTIMAL: - print('Loss = %i, time = %f s, %i conflicts' % ( - solver.ObjectiveValue(), solver.WallTime(), solver.NumConflicts())) + print('Loss = %i, time = %f s, %i conflicts' % + (solver.ObjectiveValue(), solver.WallTime(), + solver.NumConflicts())) else: print('No solution') @@ -685,8 +680,7 @@ def steel_mill_slab_with_column_generation(problem, output_proto): for o in all_orders: model.Add( - sum(selected[i] for i in all_valid_slabs - if valid_slabs[i][o]) == 1) + sum(selected[i] for i in all_valid_slabs if valid_slabs[i][o]) == 1) # Redundant constraint (sum of loads == sum of widths). model.Add( @@ -696,8 +690,8 @@ def steel_mill_slab_with_column_generation(problem, output_proto): # Objective. max_loss = max(valid_slabs[i][-2] for i in all_valid_slabs) obj = model.NewIntVar(0, num_slabs * max_loss, 'obj') - model.Add(obj == sum( - selected[i] * valid_slabs[i][-2] for i in all_valid_slabs)) + model.Add( + obj == sum(selected[i] * valid_slabs[i][-2] for i in all_valid_slabs)) model.Minimize(obj) print('Model created') @@ -715,8 +709,9 @@ def steel_mill_slab_with_column_generation(problem, output_proto): ### Output the solution. if status == cp_model.OPTIMAL: - print('Loss = %i, time = %f s, %i conflicts' % ( - solver.ObjectiveValue(), solver.WallTime(), solver.NumConflicts())) + print('Loss = %i, time = %f s, %i conflicts' % + (solver.ObjectiveValue(), solver.WallTime(), + solver.NumConflicts())) else: print('No solution') diff --git a/examples/python/stigler_diet.py b/examples/python/stigler_diet.py index eae14d96a3..99bf2ddd9e 100644 --- a/examples/python/stigler_diet.py +++ b/examples/python/stigler_diet.py @@ -22,203 +22,156 @@ from ortools.linear_solver import pywraplp def main(): """Entry point of the program""" # Nutrient minimums. - nutrients = [['Calories (kcal)', 3], ['Protein (g)', 70], - ['Calcium (g)', 0.8], ['Iron (mg)', 12], - ['Vitamin A (KIU)', 5], ['Vitamin B1 (mg)', 1.8], - ['Vitamin B2 (mg)', 2.7], ['Niacin (mg)', 18], - ['Vitamin C (mg)', 75]] + nutrients = [['Calories (kcal)', 3], ['Protein (g)', 70], [ + 'Calcium (g)', 0.8 + ], ['Iron (mg)', 12], ['Vitamin A (KIU)', 5], ['Vitamin B1 (mg)', 1.8], + ['Vitamin B2 (mg)', 2.7], ['Niacin (mg)', + 18], ['Vitamin C (mg)', 75]] # Commodity, Unit, 1939 price (cents), Calories (kcal), Protein (g), Calcium (g), Iron (mg), # Vitamin A (KIU), Vitamin B1 (mg), Vitamin B2 (mg), Niacin (mg), Vitamin C (mg) - data = [ - [ - 'Wheat Flour (Enriched)', '10 lb.', 36, 44.7, 1411, 2, 365, 0, - 55.4, 33.3, 441, 0 - ], ['Macaroni', '1 lb.', 14.1, 11.6, 418, 0.7, 54, 0, 3.2, 1.9, 68, 0], - [ - 'Wheat Cereal (Enriched)', '28 oz.', 24.2, 11.8, 377, 14.4, 175, 0, - 14.4, 8.8, 114, 0 - ], - ['Corn Flakes', '8 oz.', 7.1, 11.4, 252, 0.1, 56, 0, 13.5, 2.3, 68, 0], - [ - 'Corn Meal', '1 lb.', 4.6, 36.0, 897, 1.7, 99, 30.9, 17.4, 7.9, - 106, 0 - ], - [ - 'Hominy Grits', '24 oz.', 8.5, 28.6, 680, 0.8, 80, 0, 10.6, 1.6, - 110, 0 - ], ['Rice', '1 lb.', 7.5, 21.2, 460, 0.6, 41, 0, 2, 4.8, 60, 0], - [ - 'Rolled Oats', '1 lb.', 7.1, 25.3, 907, 5.1, 341, 0, 37.1, 8.9, 64, - 0 - ], - [ - 'White Bread (Enriched)', '1 lb.', 7.9, 15.0, 488, 2.5, 115, 0, - 13.8, 8.5, 126, 0 - ], - [ - 'Whole Wheat Bread', '1 lb.', 9.1, 12.2, 484, 2.7, 125, 0, 13.9, - 6.4, 160, 0 - ], ['Rye Bread', '1 lb.', 9.1, 12.4, 439, 1.1, 82, 0, 9.9, 3, 66, 0], - ['Pound Cake', '1 lb.', 24.8, 8.0, 130, 0.4, 31, 18.9, 2.8, 3, 17, 0], - ['Soda Crackers', '1 lb.', 15.1, 12.5, 288, 0.5, 50, 0, 0, 0, 0, 0], - ['Milk', '1 qt.', 11, 6.1, 310, 10.5, 18, 16.8, 4, 16, 7, 177], - [ - 'Evaporated Milk (can)', '14.5 oz.', 6.7, 8.4, 422, 15.1, 9, 26, 3, - 23.5, 11, 60 - ], ['Butter', '1 lb.', 30.8, 10.8, 9, 0.2, 3, 44.2, 0, 0.2, 2, 0], - ['Oleomargarine', '1 lb.', 16.1, 20.6, 17, 0.6, 6, 55.8, 0.2, 0, 0, 0], - ['Eggs', '1 doz.', 32.6, 2.9, 238, 1.0, 52, 18.6, 2.8, 6.5, 1, 0], - [ - 'Cheese (Cheddar)', '1 lb.', 24.2, 7.4, 448, 16.4, 19, 28.1, 0.8, - 10.3, 4, 0 - ], ['Cream', '1/2 pt.', 14.1, 3.5, 49, 1.7, 3, 16.9, 0.6, 2.5, 0, 17], - [ - 'Peanut Butter', '1 lb.', 17.9, 15.7, 661, 1.0, 48, 0, 9.6, 8.1, - 471, 0 - ], - ['Mayonnaise', '1/2 pt.', 16.7, 8.6, 18, 0.2, 8, 2.7, 0.4, 0.5, 0, 0], - ['Crisco', '1 lb.', 20.3, 20.1, 0, 0, 0, 0, 0, 0, 0, 0], - ['Lard', '1 lb.', 9.8, 41.7, 0, 0, 0, 0.2, 0, 0.5, 5, 0], - [ - 'Sirloin Steak', '1 lb.', 39.6, 2.9, 166, 0.1, 34, 0.2, 2.1, 2.9, - 69, 0 - ], - [ - 'Round Steak', '1 lb.', 36.4, 2.2, 214, 0.1, 32, 0.4, 2.5, 2.4, 87, - 0 - ], ['Rib Roast', '1 lb.', 29.2, 3.4, 213, 0.1, 33, 0, 0, 2, 0, 0], - ['Chuck Roast', '1 lb.', 22.6, 3.6, 309, 0.2, 46, 0.4, 1, 4, 120, 0], - ['Plate', '1 lb.', 14.6, 8.5, 404, 0.2, 62, 0, 0.9, 0, 0, 0], - [ - 'Liver (Beef)', '1 lb.', 26.8, 2.2, 333, 0.2, 139, 169.2, 6.4, - 50.8, 316, 525 - ], - ['Leg of Lamb', '1 lb.', 27.6, 3.1, 245, 0.1, 20, 0, 2.8, 3.9, 86, 0], - [ - 'Lamb Chops (Rib)', '1 lb.', 36.6, 3.3, 140, 0.1, 15, 0, 1.7, 2.7, - 54, 0 - ], [ - 'Pork Chops', '1 lb.', 30.7, 3.5, 196, 0.2, 30, 0, 17.4, 2.7, 60, 0 - ], - [ - 'Pork Loin Roast', '1 lb.', 24.2, 4.4, 249, 0.3, 37, 0, 18.2, 3.6, - 79, 0 - ], ['Bacon', '1 lb.', 25.6, 10.4, 152, 0.2, 23, 0, 1.8, 1.8, 71, 0], - ['Ham, smoked', '1 lb.', 27.4, 6.7, 212, 0.2, 31, 0, 9.9, 3.3, 50, 0], - ['Salt Pork', '1 lb.', 16, 18.8, 164, 0.1, 26, 0, 1.4, 1.8, 0, 0], - [ - 'Roasting Chicken', '1 lb.', 30.3, 1.8, 184, 0.1, 30, 0.1, 0.9, - 1.8, 68, 46 - ], - ['Veal Cutlets', '1 lb.', 42.3, 1.7, 156, 0.1, 24, 0, 1.4, 2.4, 57, 0], - [ - 'Salmon, Pink (can)', '16 oz.', 13, 5.8, 705, 6.8, 45, 3.5, 1, 4.9, - 209, 0 - ], ['Apples', '1 lb.', 4.4, 5.8, 27, 0.5, 36, 7.3, 3.6, 2.7, 5, 544], - ['Bananas', '1 lb.', 6.1, 4.9, 60, 0.4, 30, 17.4, 2.5, 3.5, 28, 498], - ['Lemons', '1 doz.', 26, 1.0, 21, 0.5, 14, 0, 0.5, 0, 4, 952], - [ - 'Oranges', '1 doz.', 30.9, 2.2, 40, 1.1, 18, 11.1, 3.6, 1.3, 10, - 1998 - ], - [ - 'Green Beans', '1 lb.', 7.1, 2.4, 138, 3.7, 80, 69, 4.3, 5.8, 37, - 862 - ], ['Cabbage', '1 lb.', 3.7, 2.6, 125, 4.0, 36, 7.2, 9, 4.5, 26, 5369], - [ - 'Carrots', '1 bunch', 4.7, 2.7, 73, 2.8, 43, 188.5, 6.1, 4.3, 89, - 608 - ], ['Celery', '1 stalk', 7.3, 0.9, 51, 3.0, 23, 0.9, 1.4, 1.4, 9, 313], - ['Lettuce', '1 head', 8.2, 0.4, 27, 1.1, 22, 112.4, 1.8, 3.4, 11, 449], - ['Onions', '1 lb.', 3.6, 5.8, 166, 3.8, 59, 16.6, 4.7, 5.9, 21, 1184], - [ - 'Potatoes', '15 lb.', 34, 14.3, 336, 1.8, 118, 6.7, 29.4, 7.1, 198, - 2522 - ], - [ - 'Spinach', '1 lb.', 8.1, 1.1, 106, 0, 138, 918.4, 5.7, 13.8, 33, - 2755 - ], - [ - 'Sweet Potatoes', '1 lb.', 5.1, 9.6, 138, 2.7, 54, 290.7, 8.4, 5.4, - 83, 1912 - ], - [ - 'Peaches (can)', 'No. 2 1/2', 16.8, 3.7, 20, 0.4, 10, 21.5, 0.5, 1, - 31, 196 - ], - [ - 'Pears (can)', 'No. 2 1/2', 20.4, 3.0, 8, 0.3, 8, 0.8, 0.8, 0.8, 5, - 81 - ], - [ - 'Pineapple (can)', 'No. 2 1/2', 21.3, 2.4, 16, 0.4, 8, 2, 2.8, 0.8, - 7, 399 - ], - [ - 'Asparagus (can)', 'No. 2', 27.7, 0.4, 33, 0.3, 12, 16.3, 1.4, 2.1, - 17, 272 - ], - [ - 'Green Beans (can)', 'No. 2', 10, 1.0, 54, 2, 65, 53.9, 1.6, 4.3, - 32, 431 - ], - [ - 'Pork and Beans (can)', '16 oz.', 7.1, 7.5, 364, 4, 134, 3.5, 8.3, - 7.7, 56, 0 - ], - [ - 'Corn (can)', 'No. 2', 10.4, 5.2, 136, 0.2, 16, 12, 1.6, 2.7, 42, - 218 - ], - [ - 'Peas (can)', 'No. 2', 13.8, 2.3, 136, 0.6, 45, 34.9, 4.9, 2.5, 37, - 370 - ], - [ - 'Tomatoes (can)', 'No. 2', 8.6, 1.3, 63, 0.7, 38, 53.2, 3.4, 2.5, - 36, 1253 - ], - [ - 'Tomato Soup (can)', '10 1/2 oz.', 7.6, 1.6, 71, 0.6, 43, 57.9, - 3.5, 2.4, 67, 862 - ], - [ - 'Peaches, Dried', '1 lb.', 15.7, 8.5, 87, 1.7, 173, 86.8, 1.2, 4.3, - 55, 57 - ], - [ - 'Prunes, Dried', '1 lb.', 9, 12.8, 99, 2.5, 154, 85.7, 3.9, 4.3, - 65, 257 - ], - [ - 'Raisins, Dried', '15 oz.', 9.4, 13.5, 104, 2.5, 136, 4.5, 6.3, - 1.4, 24, 136 - ], - [ - 'Peas, Dried', '1 lb.', 7.9, 20.0, 1367, 4.2, 345, 2.9, 28.7, 18.4, - 162, 0 - ], - [ - 'Lima Beans, Dried', '1 lb.', 8.9, 17.4, 1055, 3.7, 459, 5.1, 26.9, - 38.2, 93, 0 - ], - [ - 'Navy Beans, Dried', '1 lb.', 5.9, 26.9, 1691, 11.4, 792, 0, 38.4, - 24.6, 217, 0 - ], ['Coffee', '1 lb.', 22.4, 0, 0, 0, 0, 0, 4, 5.1, 50, 0], - ['Tea', '1/4 lb.', 17.4, 0, 0, 0, 0, 0, 0, 2.3, 42, 0], - ['Cocoa', '8 oz.', 8.6, 8.7, 237, 3, 72, 0, 2, 11.9, 40, 0], - ['Chocolate', '8 oz.', 16.2, 8.0, 77, 1.3, 39, 0, 0.9, 3.4, 14, 0], - ['Sugar', '10 lb.', 51.7, 34.9, 0, 0, 0, 0, 0, 0, 0, 0], - ['Corn Syrup', '24 oz.', 13.7, 14.7, 0, 0.5, 74, 0, 0, 0, 5, 0], - ['Molasses', '18 oz.', 13.6, 9.0, 0, 10.3, 244, 0, 1.9, 7.5, 146, 0], - [ - 'Strawberry Preserves', '1 lb.', 20.5, 6.4, 11, 0.4, 7, 0.2, 0.2, - 0.4, 3, 0 - ] - ] + data = [[ + 'Wheat Flour (Enriched)', '10 lb.', 36, 44.7, 1411, 2, 365, 0, 55.4, + 33.3, 441, 0 + ], ['Macaroni', '1 lb.', 14.1, 11.6, 418, 0.7, 54, 0, 3.2, 1.9, 68, 0], [ + 'Wheat Cereal (Enriched)', '28 oz.', 24.2, 11.8, 377, 14.4, 175, 0, + 14.4, 8.8, 114, 0 + ], ['Corn Flakes', '8 oz.', 7.1, 11.4, 252, 0.1, 56, 0, 13.5, 2.3, 68, 0], [ + 'Corn Meal', '1 lb.', 4.6, 36.0, 897, 1.7, 99, 30.9, 17.4, 7.9, 106, 0 + ], [ + 'Hominy Grits', '24 oz.', 8.5, 28.6, 680, 0.8, 80, 0, 10.6, 1.6, 110, 0 + ], ['Rice', '1 lb.', 7.5, 21.2, 460, 0.6, 41, 0, 2, 4.8, 60, 0], [ + 'Rolled Oats', '1 lb.', 7.1, 25.3, 907, 5.1, 341, 0, 37.1, 8.9, 64, 0 + ], [ + 'White Bread (Enriched)', '1 lb.', 7.9, 15.0, 488, 2.5, 115, 0, 13.8, + 8.5, 126, 0 + ], [ + 'Whole Wheat Bread', '1 lb.', 9.1, 12.2, 484, 2.7, 125, 0, 13.9, 6.4, + 160, 0 + ], ['Rye Bread', '1 lb.', 9.1, 12.4, 439, 1.1, 82, 0, 9.9, 3, 66, 0], [ + 'Pound Cake', '1 lb.', 24.8, 8.0, 130, 0.4, 31, 18.9, 2.8, 3, 17, 0 + ], ['Soda Crackers', '1 lb.', 15.1, 12.5, 288, 0.5, 50, 0, 0, 0, 0, 0], [ + 'Milk', '1 qt.', 11, 6.1, 310, 10.5, 18, 16.8, 4, 16, 7, 177 + ], [ + 'Evaporated Milk (can)', '14.5 oz.', 6.7, 8.4, 422, 15.1, 9, 26, 3, + 23.5, 11, 60 + ], ['Butter', '1 lb.', 30.8, 10.8, 9, 0.2, 3, 44.2, 0, 0.2, 2, 0], [ + 'Oleomargarine', '1 lb.', 16.1, 20.6, 17, 0.6, 6, 55.8, 0.2, 0, 0, 0 + ], ['Eggs', '1 doz.', 32.6, 2.9, 238, 1.0, 52, 18.6, 2.8, 6.5, 1, 0], [ + 'Cheese (Cheddar)', '1 lb.', 24.2, 7.4, 448, 16.4, 19, 28.1, 0.8, 10.3, + 4, 0 + ], ['Cream', '1/2 pt.', 14.1, 3.5, 49, 1.7, 3, 16.9, 0.6, 2.5, 0, 17], [ + 'Peanut Butter', '1 lb.', 17.9, 15.7, 661, 1.0, 48, 0, 9.6, 8.1, 471, 0 + ], ['Mayonnaise', '1/2 pt.', 16.7, 8.6, 18, 0.2, 8, 2.7, 0.4, 0.5, 0, 0], [ + 'Crisco', '1 lb.', 20.3, 20.1, 0, 0, 0, 0, 0, 0, 0, 0 + ], ['Lard', '1 lb.', 9.8, 41.7, 0, 0, 0, 0.2, 0, 0.5, 5, 0], [ + 'Sirloin Steak', '1 lb.', 39.6, 2.9, 166, 0.1, 34, 0.2, 2.1, 2.9, 69, 0 + ], ['Round Steak', '1 lb.', 36.4, 2.2, 214, 0.1, 32, 0.4, 2.5, 2.4, 87, 0 + ], ['Rib Roast', '1 lb.', 29.2, 3.4, 213, 0.1, 33, 0, 0, 2, 0, 0], [ + 'Chuck Roast', '1 lb.', 22.6, 3.6, 309, 0.2, 46, 0.4, 1, 4, 120, 0 + ], ['Plate', '1 lb.', 14.6, 8.5, 404, 0.2, 62, 0, 0.9, 0, 0, 0], [ + 'Liver (Beef)', '1 lb.', 26.8, 2.2, 333, 0.2, 139, 169.2, 6.4, 50.8, + 316, 525 + ], [ + 'Leg of Lamb', '1 lb.', 27.6, 3.1, 245, 0.1, 20, 0, 2.8, 3.9, 86, 0 + ], [ + 'Lamb Chops (Rib)', + '1 lb.', 36.6, 3.3, 140, 0.1, 15, 0, 1.7, 2.7, 54, 0 + ], [ + 'Pork Chops', '1 lb.', 30.7, 3.5, 196, 0.2, 30, 0, 17.4, 2.7, 60, 0 + ], [ + 'Pork Loin Roast', + '1 lb.', 24.2, 4.4, 249, 0.3, 37, 0, 18.2, 3.6, 79, 0 + ], ['Bacon', '1 lb.', 25.6, 10.4, 152, 0.2, 23, 0, 1.8, 1.8, 71, 0], [ + 'Ham, smoked', '1 lb.', 27.4, 6.7, 212, 0.2, 31, 0, 9.9, 3.3, 50, 0 + ], ['Salt Pork', '1 lb.', 16, 18.8, 164, 0.1, 26, 0, 1.4, 1.8, 0, 0], [ + 'Roasting Chicken', '1 lb.', 30.3, 1.8, 184, 0.1, 30, 0.1, 0.9, 1.8, + 68, 46 + ], [ + 'Veal Cutlets', '1 lb.', 42.3, 1.7, 156, 0.1, 24, 0, 1.4, 2.4, 57, 0 + ], [ + 'Salmon, Pink (can)', '16 oz.', 13, 5.8, 705, 6.8, 45, 3.5, + 1, 4.9, 209, 0 + ], ['Apples', '1 lb.', 4.4, 5.8, 27, 0.5, 36, 7.3, 3.6, 2.7, 5, 544], [ + 'Bananas', '1 lb.', 6.1, 4.9, 60, 0.4, 30, 17.4, 2.5, 3.5, 28, 498 + ], ['Lemons', '1 doz.', 26, 1.0, 21, 0.5, 14, 0, 0.5, 0, 4, 952], [ + 'Oranges', '1 doz.', 30.9, 2.2, 40, 1.1, 18, 11.1, 3.6, 1.3, 10, 1998 + ], [ + 'Green Beans', '1 lb.', 7.1, 2.4, 138, 3.7, 80, 69, 4.3, 5.8, 37, 862 + ], ['Cabbage', '1 lb.', 3.7, 2.6, 125, 4.0, 36, 7.2, 9, 4.5, 26, 5369], [ + 'Carrots', '1 bunch', 4.7, 2.7, 73, 2.8, 43, 188.5, 6.1, 4.3, 89, 608 + ], ['Celery', '1 stalk', 7.3, 0.9, 51, 3.0, 23, 0.9, 1.4, 1.4, 9, 313], [ + 'Lettuce', '1 head', 8.2, 0.4, 27, 1.1, 22, 112.4, 1.8, 3.4, 11, 449 + ], ['Onions', '1 lb.', 3.6, 5.8, 166, 3.8, 59, 16.6, 4.7, 5.9, 21, + 1184], [ + 'Potatoes', '15 lb.', 34, 14.3, 336, 1.8, 118, 6.7, 29.4, 7.1, + 198, 2522 + ], [ + 'Spinach', '1 lb.', 8.1, 1.1, 106, 0, 138, 918.4, 5.7, 13.8, 33, + 2755 + ], [ + 'Sweet Potatoes', '1 lb.', 5.1, 9.6, 138, 2.7, 54, 290.7, 8.4, + 5.4, 83, 1912 + ], [ + 'Peaches (can)', 'No. 2 1/2', 16.8, 3.7, 20, 0.4, 10, 21.5, 0.5, + 1, 31, 196 + ], [ + 'Pears (can)', 'No. 2 1/2', 20.4, 3.0, 8, 0.3, 8, 0.8, 0.8, 0.8, + 5, 81 + ], [ + 'Pineapple (can)', 'No. 2 1/2', 21.3, 2.4, 16, 0.4, 8, 2, 2.8, + 0.8, 7, 399 + ], [ + 'Asparagus (can)', 'No. 2', 27.7, 0.4, 33, 0.3, 12, 16.3, 1.4, + 2.1, 17, 272 + ], [ + 'Green Beans (can)', 'No. 2', 10, 1.0, 54, 2, 65, 53.9, 1.6, 4.3, + 32, 431 + ], [ + 'Pork and Beans (can)', '16 oz.', 7.1, 7.5, 364, 4, 134, 3.5, + 8.3, 7.7, 56, 0 + ], [ + 'Corn (can)', 'No. 2', 10.4, 5.2, 136, 0.2, 16, 12, 1.6, 2.7, 42, + 218 + ], [ + 'Peas (can)', 'No. 2', 13.8, 2.3, 136, 0.6, 45, 34.9, 4.9, 2.5, + 37, 370 + ], [ + 'Tomatoes (can)', 'No. 2', 8.6, 1.3, 63, 0.7, 38, 53.2, 3.4, 2.5, + 36, 1253 + ], [ + 'Tomato Soup (can)', '10 1/2 oz.', 7.6, 1.6, 71, 0.6, 43, 57.9, + 3.5, 2.4, 67, 862 + ], [ + 'Peaches, Dried', '1 lb.', 15.7, 8.5, 87, 1.7, 173, 86.8, 1.2, + 4.3, 55, 57 + ], [ + 'Prunes, Dried', '1 lb.', 9, 12.8, 99, 2.5, 154, 85.7, 3.9, 4.3, + 65, 257 + ], [ + 'Raisins, Dried', '15 oz.', 9.4, 13.5, 104, 2.5, 136, 4.5, 6.3, + 1.4, 24, 136 + ], [ + 'Peas, Dried', '1 lb.', 7.9, 20.0, 1367, 4.2, 345, 2.9, 28.7, + 18.4, 162, 0 + ], [ + 'Lima Beans, Dried', '1 lb.', 8.9, 17.4, 1055, 3.7, 459, 5.1, + 26.9, 38.2, 93, 0 + ], [ + 'Navy Beans, Dried', '1 lb.', 5.9, 26.9, 1691, 11.4, 792, 0, + 38.4, 24.6, 217, 0 + ], ['Coffee', '1 lb.', 22.4, 0, 0, 0, 0, 0, 4, 5.1, 50, + 0], ['Tea', '1/4 lb.', 17.4, 0, 0, 0, 0, 0, 0, 2.3, 42, 0], + ['Cocoa', '8 oz.', 8.6, 8.7, 237, 3, 72, 0, 2, 11.9, 40, 0], [ + 'Chocolate', '8 oz.', 16.2, 8.0, 77, 1.3, 39, 0, 0.9, 3.4, 14, 0 + ], ['Sugar', '10 lb.', 51.7, 34.9, 0, 0, 0, 0, 0, 0, 0, 0], + ['Corn Syrup', '24 oz.', 13.7, 14.7, 0, 0.5, 74, 0, 0, 0, 5, 0], [ + 'Molasses', '18 oz.', 13.6, 9.0, 0, 10.3, 244, 0, 1.9, 7.5, 146, + 0 + ], [ + 'Strawberry Preserves', '1 lb.', 20.5, 6.4, 11, 0.4, 7, 0.2, + 0.2, 0.4, 3, 0 + ]] # Instantiate a Glop solver, naming it LinearExample. solver = pywraplp.Solver('StiglerDietExample', diff --git a/examples/python/sudoku_sat.py b/examples/python/sudoku_sat.py index c1dd516548..642ab0226e 100644 --- a/examples/python/sudoku_sat.py +++ b/examples/python/sudoku_sat.py @@ -28,10 +28,10 @@ def solve_sudoku(): cell = list(range(0, cell_size)) initial_grid = [[0, 6, 0, 0, 5, 0, 0, 2, 0], [0, 0, 0, 3, 0, 0, 0, 9, 0], - [7, 0, 0, 6, 0, 0, 0, 1, 0], [0, 0, 6, 0, 3, 0, 4, 0, 0], - [0, 0, 4, 0, 7, 0, 1, 0, 0], [0, 0, 5, 0, 9, 0, 8, 0, 0], - [0, 4, 0, 0, 0, 1, 0, 0, 6], [0, 3, 0, 0, 0, 8, 0, 0, 0], - [0, 2, 0, 0, 4, 0, 0, 5, 0]] + [7, 0, 0, 6, 0, 0, 0, 1, 0], [0, 0, 6, 0, 3, 0, 4, 0, 0], [ + 0, 0, 4, 0, 7, 0, 1, 0, 0 + ], [0, 0, 5, 0, 9, 0, 8, 0, 0], [0, 4, 0, 0, 0, 1, 0, 0, 6], + [0, 3, 0, 0, 0, 8, 0, 0, 0], [0, 2, 0, 0, 4, 0, 0, 5, 0]] grid = {} for i in line: diff --git a/examples/python/task_allocation_sat.py b/examples/python/task_allocation_sat.py index c3987e10b9..45b72156d3 100644 --- a/examples/python/task_allocation_sat.py +++ b/examples/python/task_allocation_sat.py @@ -27,252 +27,203 @@ def main(): 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - ], - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, - 1, 0, 0, 0, 0, 0, 0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, + 0, 0 + ], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + ], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + ], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + ], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + ], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 + ]] ntasks = len(available) nslots = len(available[0]) diff --git a/examples/python/tasks_and_workers_assignment_sat.py b/examples/python/tasks_and_workers_assignment_sat.py index 74b985054e..b8687498ae 100644 --- a/examples/python/tasks_and_workers_assignment_sat.py +++ b/examples/python/tasks_and_workers_assignment_sat.py @@ -78,8 +78,7 @@ def tasks_and_workers_assignment_sat(): model.Add(n == sum(x[i, j] for i in all_workers)) c = model.NewIntVar(0, sum_of_costs * scaling, 'sum_of_costs_of_group_%i' % j) - model.Add(c == sum( - y[k, j] * task_cost[k] * scaling for k in all_tasks)) + model.Add(c == sum(y[k, j] * task_cost[k] * scaling for k in all_tasks)) a = model.NewIntVar(0, sum_of_costs * scaling, 'average_cost_of_group_%i' % j) model.AddDivisionEquality(a, c, n) diff --git a/examples/python/transit_time.py b/examples/python/transit_time.py index daa7460627..1cdd8df631 100755 --- a/examples/python/transit_time.py +++ b/examples/python/transit_time.py @@ -147,8 +147,8 @@ class DataProblem(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) class CreateTimeEvaluator(object): @@ -165,9 +165,8 @@ class CreateTimeEvaluator(object): if from_node == to_node: travel_time = 0 else: - travel_time = manhattan_distance( - data.locations[from_node], - data.locations[to_node]) / data.vehicle.speed + travel_time = manhattan_distance(data.locations[ + from_node], data.locations[to_node]) / data.vehicle.speed return travel_time def __init__(self, data): @@ -181,8 +180,8 @@ class CreateTimeEvaluator(object): self._total_time[from_node][to_node] = 0 else: self._total_time[from_node][to_node] = int( - self.service_time(data, from_node) + - self.travel_time(data, from_node, to_node)) + self.service_time(data, from_node) + self.travel_time( + data, from_node, to_node)) def time_evaluator(self, from_node, to_node): """Returns the total time between the two nodes""" @@ -209,8 +208,7 @@ def main(): # Print Transit Time time_evaluator = CreateTimeEvaluator(data).time_evaluator print('Route 0:') - print_transit_time([[0, 5], [5, 8], [8, 6], [6, 2], [2, 0]], - time_evaluator) + print_transit_time([[0, 5], [5, 8], [8, 6], [6, 2], [2, 0]], time_evaluator) print('Route 1:') print_transit_time([[0, 9], [9, 14], [14, 16], [16, 10], [10, 0]], @@ -221,8 +219,7 @@ def main(): time_evaluator) print('Route 3:') - print_transit_time([[0, 7], [7, 4], [4, 3], [3, 1], [1, 0]], - time_evaluator) + print_transit_time([[0, 7], [7, 4], [4, 3], [3, 1], [1, 0]], time_evaluator) if __name__ == '__main__': diff --git a/examples/python/tsp.py b/examples/python/tsp.py index e7630fb0e2..f794d7c101 100755 --- a/examples/python/tsp.py +++ b/examples/python/tsp.py @@ -65,8 +65,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): diff --git a/examples/python/vendor_scheduling_sat.py b/examples/python/vendor_scheduling_sat.py index c741a93b21..98ca23248a 100644 --- a/examples/python/vendor_scheduling_sat.py +++ b/examples/python/vendor_scheduling_sat.py @@ -39,9 +39,8 @@ class SolutionPrinter(cp_model.CpSolverSolutionCallback): print('Solution %i: ', self.__solution_count) print(' min vendors:', self.__min_vendors) for i in range(self.__num_vendors): - print( - ' - vendor %i: ' % i, self.__possible_schedules[self.Value( - self.__selected_schedules[i])]) + print(' - vendor %i: ' % i, self.__possible_schedules[self.Value( + self.__selected_schedules[i])]) print() for j in range(self.__num_hours): @@ -73,12 +72,12 @@ def main(): # Last columns are : # index_of_the_schedule, sum of worked hours (per work type). # The index is useful for branching. - possible_schedules = [[1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 8], - [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 4], - [0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 2, 5], - [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3, 4], - [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 4, 3], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0]] + possible_schedules = [[1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, + 8], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, + 4], [0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 2, + 5], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3, 4], + [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 4, + 3], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0]] num_possible_schedules = len(possible_schedules) selected_schedules = [] @@ -137,8 +136,8 @@ def main(): print(' - conflicts : %i' % solver.NumConflicts()) print(' - branches : %i' % solver.NumBranches()) print(' - wall time : %f s' % solver.WallTime()) - print(' - number of solutions found: %i' % - solution_printer.solution_count()) + print( + ' - number of solutions found: %i' % solution_printer.solution_count()) if __name__ == '__main__': diff --git a/examples/python/vrp.py b/examples/python/vrp.py index 5028776a78..052d3f49f6 100755 --- a/examples/python/vrp.py +++ b/examples/python/vrp.py @@ -65,8 +65,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): diff --git a/examples/python/vrpgs.py b/examples/python/vrpgs.py index f852b8e2e9..cb625c8553 100755 --- a/examples/python/vrpgs.py +++ b/examples/python/vrpgs.py @@ -65,8 +65,8 @@ def create_data_model(): ####################### def manhattan_distance(position_1, position_2): """Computes the Manhattan distance between two points""" - return (abs(position_1[0] - position_2[0]) + - abs(position_1[1] - position_2[1])) + return ( + abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1])) def create_distance_evaluator(data): diff --git a/examples/python/wedding_optimal_chart_sat.py b/examples/python/wedding_optimal_chart_sat.py index 1f2d4c2c2b..1d9323aaec 100644 --- a/examples/python/wedding_optimal_chart_sat.py +++ b/examples/python/wedding_optimal_chart_sat.py @@ -88,23 +88,23 @@ def BuildData(): # Connection matrix: who knows who, and how strong # is the relation - C = [[1, 50, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], - [50, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], - [1, 1, 1, 50, 1, 1, 1,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1, 1, 1, 1, 50, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0], [1, 1, 1, 1, 1, 1, 1, 50, 1, 0, 0, 0, 0, 0, 0, 0, 0], + [1, 1, 1, 1, 1, 1, 50, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0], [1, 1, 10, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 50, 1, 1, 1, 1, 1, 1], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 1, 1, 1, 1, 1, 1, + 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 + ], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 + ], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]] # Names of the guests. B: Bride side, G: Groom side names = [ @@ -133,8 +133,8 @@ def solve_with_discrete_model(): seats = {} for t in all_tables: for g in all_guests: - seats[(t, g)] = model.NewBoolVar( - "guest %i seats on table %i" % (g, t)) + seats[(t, g)] = model.NewBoolVar("guest %i seats on table %i" % (g, + t)) colocated = {} for g1 in range(num_guests - 1): @@ -151,8 +151,9 @@ def solve_with_discrete_model(): # Objective model.Maximize( - sum(C[g1][g2] * colocated[g1, g2] for g1 in range(num_guests - 1) - for g2 in range(g1 + 1, num_guests) if C[g1][g2] > 0)) + sum(C[g1][g2] * colocated[g1, g2] + for g1 in range(num_guests - 1) for g2 in range(g1 + 1, num_guests) + if C[g1][g2] > 0)) # # Constraints @@ -186,17 +187,17 @@ def solve_with_discrete_model(): # Min known neighbors rule. for t in all_tables: model.Add( - sum(same_table[(g1, g2, t)] for g1 in range(num_guests - 1) - for g2 in range(g1 + 1, num_guests) - for t in all_tables if C[g1][g2] > 0) >= min_known_neighbors) + sum(same_table[(g1, g2, t)] + for g1 in range(num_guests - 1) + for g2 in range(g1 + 1, num_guests) for t in all_tables + if C[g1][g2] > 0) >= min_known_neighbors) # Symmetry breaking. First guest seats on the first table. model.Add(seats[(0, 0)] == 1) ### Solve model. solver = cp_model.CpSolver() - solution_printer = WeddingChartPrinter(seats, names, num_tables, - num_guests) + solution_printer = WeddingChartPrinter(seats, names, num_tables, num_guests) solver.SolveWithSolutionCallback(model, solution_printer) print("Statistics") diff --git a/examples/python/worker_schedule_sat.py b/examples/python/worker_schedule_sat.py index 6c8c7c6ea9..5ecfef81e9 100644 --- a/examples/python/worker_schedule_sat.py +++ b/examples/python/worker_schedule_sat.py @@ -19,14 +19,13 @@ def schedule(): # Input data. positions = [ - 1, 2, 8, 10, 5, 3, 4, 3, 6, 6, 4, 5, 4, 3, 4, 4, 3, 4, 2, 1, 0, 0, 0, - 0, 1, 2, 9, 9, 4, 3, 4, 3, 5, 4, 5, 2, 5, 6, 6, 7, 4, 2, 1, 0, 0, 0, 0, - 0, 0, 2, 7, 6, 5, 2, 4, 4, 6, 6, 4, 5, 5, 5, 7, 5, 4, 4, 2, 3, 1, 0, 0, - 0, 1, 2, 9, 7, 2, 2, 4, 2, 4, 5, 3, 2, 6, 7, 5, 6, 4, 4, 2, 1, 0, 0, 0, - 0, 2, 2, 8, 8, 6, 3, 3, 3, 10, 9, 6, 3, 3, 4, 5, 4, 5, 4, 2, 1, 0, 0, - 0, 0, 1, 2, 9, 5, 5, 4, 5, 2, 5, 7, 5, 3, 4, 8, 4, 4, 2, 3, 1, 0, 0, 0, - 0, 0, 1, 2, 10, 5, 5, 4, 5, 2, 4, 6, 7, 4, 4, 5, 4, 4, 3, 3, 2, 1, 0, - 0, 0, 0 + 1, 2, 8, 10, 5, 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