| task_name,problem_type,instruction,instance,solution,obj,instance_variant,solution_variant,context_index,input_format,input_index_base |
| QAP,QAP, |
|
|
| { |
| ""num_paintings"": 3, |
| ""painting_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""wall_ids"": [ |
| ""A"", |
| ""B"", |
| ""C"" |
| ], |
| ""distance"": [ |
| { |
| ""from_wall_id"": ""A"", |
| ""to_wall_id"": ""B"", |
| ""wall_distance"": 37 |
| }, |
| { |
| ""from_wall_id"": ""A"", |
| ""to_wall_id"": ""C"", |
| ""wall_distance"": 37 |
| }, |
| { |
| ""from_wall_id"": ""B"", |
| ""to_wall_id"": ""A"", |
| ""wall_distance"": 37 |
| }, |
| { |
| ""from_wall_id"": ""B"", |
| ""to_wall_id"": ""C"", |
| ""wall_distance"": 50 |
| }, |
| { |
| ""from_wall_id"": ""C"", |
| ""to_wall_id"": ""A"", |
| ""wall_distance"": 37 |
| }, |
| { |
| ""from_wall_id"": ""C"", |
| ""to_wall_id"": ""B"", |
| ""wall_distance"": 50 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_painting_id"": ""F1"", |
| ""to_painting_id"": ""F2"", |
| ""co_view_frequency"": 0 |
| }, |
| { |
| ""from_painting_id"": ""F1"", |
| ""to_painting_id"": ""F3"", |
| ""co_view_frequency"": 2151 |
| }, |
| { |
| ""from_painting_id"": ""F2"", |
| ""to_painting_id"": ""F1"", |
| ""co_view_frequency"": 5 |
| }, |
| { |
| ""from_painting_id"": ""F2"", |
| ""to_painting_id"": ""F3"", |
| ""co_view_frequency"": 61 |
| }, |
| { |
| ""from_painting_id"": ""F3"", |
| ""to_painting_id"": ""F1"", |
| ""co_view_frequency"": 0 |
| }, |
| { |
| ""from_painting_id"": ""F3"", |
| ""to_painting_id"": ""F2"", |
| ""co_view_frequency"": 0 |
| } |
| ] |
| } |
|
|
| If you want to send back a layout, just pop it into this little JSON shape so I can read it easily: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| The ""solution"" list is just the order of walls you want each painting to go on β the first entry is the wall for painting number one, the second entry is the wall for painting number two, and so on. Think of it like filling out a short form: one spot per painting that says which wall it gets. |
|
|
| This JSON is only a sketch of the expected shape, not the actual answer β please return the real identifiers from the instance when you reply. |
|
|
| All identifiers must be used exactly as they appear in the instance input β no renaming and no new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[37, 37, 37], [37, 37, 50], [37, 50, 37]], 'flow_matrix': [[9, 0, 2151], [5, 96, 61], [0, 0, 0]], 'objective': 85979.0}","[1, 2, 0]",85979.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 37}, {'from_id': 'A', 'to_id': 'C', 'distance': 37}, {'from_id': 'B', 'to_id': 'A', 'distance': 37}, {'from_id': 'B', 'to_id': 'C', 'distance': 50}, {'from_id': 'C', 'to_id': 'A', 'distance': 37}, {'from_id': 'C', 'to_id': 'B', 'distance': 50}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 2151}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 61}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","['B', 'C', 'A'] |
| QAP,QAP, |
|
|
| There are 5 teachers and 5 classrooms: the teachers are F1, F2, F3, F4, F5 and the classrooms are 1, 2, 3, 4, 5. |
| Distance from classroom 1 to classroom 2 is 53. |
| Distance from classroom 1 to classroom 3 is 53. |
| Distance from classroom 1 to classroom 4 is 53. |
| Distance from classroom 1 to classroom 5 is 53. |
| Distance from classroom 2 to classroom 1 is 53. |
| Distance from classroom 2 to classroom 3 is 53. |
| Distance from classroom 2 to classroom 4 is 73. |
| Distance from classroom 2 to classroom 5 is 73. |
| Distance from classroom 3 to classroom 1 is 66. |
| Distance from classroom 3 to classroom 2 is 53. |
| Distance from classroom 3 to classroom 4 is 53. |
| Distance from classroom 3 to classroom 5 is 53. |
| Distance from classroom 4 to classroom 1 is 53. |
| Distance from classroom 4 to classroom 2 is 53. |
| Distance from classroom 4 to classroom 3 is 53. |
| Distance from classroom 4 to classroom 5 is 73. |
| Distance from classroom 5 to classroom 1 is 53. |
| Distance from classroom 5 to classroom 2 is 66. |
| Distance from classroom 5 to classroom 3 is 53. |
| Distance from classroom 5 to classroom 4 is 73. |
| Teacher F1 travels to teacher F2 20 times. |
| Teacher F1 travels to teacher F3 438 times. |
| Teacher F1 travels to teacher F4 57 times. |
| Teacher F1 travels to teacher F5 5 times. |
| Teacher F2 travels to teacher F1 1949 times. |
| Teacher F2 travels to teacher F3 31 times. |
| Teacher F2 travels to teacher F4 154 times. |
| Teacher F2 travels to teacher F5 75 times. |
| Teacher F3 travels to teacher F1 301 times. |
| Teacher F3 travels to teacher F2 159 times. |
| Teacher F3 travels to teacher F4 340 times. |
| Teacher F3 travels to teacher F5 175 times. |
| Teacher F4 travels to teacher F1 69 times. |
| Teacher F4 travels to teacher F2 489 times. |
| Teacher F4 travels to teacher F3 494 times. |
| Teacher F4 travels to teacher F5 350 times. |
| Teacher F5 travels to teacher F1 1 times. |
| Teacher F5 travels to teacher F2 6 times. |
| Teacher F5 travels to teacher F3 7 times. |
| Teacher F5 travels to teacher F4 11 times. |
| These records provide the data to compute the assignment that minimizes the total distance-weighted movements among the 5 teachers and 1, 2, 3, 4, 5. |
|
|
| When you send back the assignment, just use this relaxed JSON shape so it's easy to parse: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of that ""solution"" list like a simple sign-up sheet: the first entry is the room (location) for the first teacher (first facility), the second entry is the room for the second teacher, and so on. It's just a sketch of the shape I expect β not the actual assignment. |
|
|
| Please use the exact identifiers shown in the instance input β don't rename or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[53, 53, 53, 53, 53], [53, 53, 53, 73, 73], [66, 53, 53, 53, 53], [53, 53, 53, 53, 73], [53, 66, 53, 73, 53]], 'flow_matrix': [[96, 20, 438, 57, 5], [1949, 342, 31, 154, 75], [301, 159, 127, 340, 175], [69, 489, 494, 164, 350], [1, 6, 7, 11, 3]], 'objective': 313967.0}","[4, 2, 0, 3, 1]",313967.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 53}, {'from_id': 1, 'to_id': 3, 'distance': 53}, {'from_id': 1, 'to_id': 4, 'distance': 53}, {'from_id': 1, 'to_id': 5, 'distance': 53}, {'from_id': 2, 'to_id': 1, 'distance': 53}, {'from_id': 2, 'to_id': 3, 'distance': 53}, {'from_id': 2, 'to_id': 4, 'distance': 73}, {'from_id': 2, 'to_id': 5, 'distance': 73}, {'from_id': 3, 'to_id': 1, 'distance': 66}, {'from_id': 3, 'to_id': 2, 'distance': 53}, {'from_id': 3, 'to_id': 4, 'distance': 53}, {'from_id': 3, 'to_id': 5, 'distance': 53}, {'from_id': 4, 'to_id': 1, 'distance': 53}, {'from_id': 4, 'to_id': 2, 'distance': 53}, {'from_id': 4, 'to_id': 3, 'distance': 53}, {'from_id': 4, 'to_id': 5, 'distance': 73}, {'from_id': 5, 'to_id': 1, 'distance': 53}, {'from_id': 5, 'to_id': 2, 'distance': 66}, {'from_id': 5, 'to_id': 3, 'distance': 53}, {'from_id': 5, 'to_id': 4, 'distance': 73}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 20}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 438}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 57}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1949}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 31}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 154}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 75}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 301}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 159}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 340}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 175}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 69}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 489}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 494}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 350}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 6}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 7}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 11}]}","[5, 3, 1, 4, 2]",2,nl,1 |
| QAP,QAP,"I run a busy warehouse and need to decide which shelf zone each product family should live in. The idea is to put each family into one dedicated zone, and make sure no zone ends up with more than one family. A better layout is the one that cuts down the total picking effort: for every pair of product families, take how often they appear together in orders, multiply that by how far apart their zones are, and add up those numbers for all pairs β the smaller that sum, the easier the picking. The specific layout, travel distances, and pair frequencies are shown below. |
| |
| { |
| ""num_families_zones"": 3, |
| ""product_family_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""shelf_zone_ids"": [ |
| ""A"", |
| ""B"", |
| ""C"" |
| ], |
| ""distance"": [ |
| { |
| ""from_zone_id"": ""A"", |
| ""to_zone_id"": ""B"", |
| ""zone_travel_distance"": 64 |
| }, |
| { |
| ""from_zone_id"": ""A"", |
| ""to_zone_id"": ""C"", |
| ""zone_travel_distance"": 795 |
| }, |
| { |
| ""from_zone_id"": ""B"", |
| ""to_zone_id"": ""A"", |
| ""zone_travel_distance"": 64 |
| }, |
| { |
| ""from_zone_id"": ""B"", |
| ""to_zone_id"": ""C"", |
| ""zone_travel_distance"": 758 |
| }, |
| { |
| ""from_zone_id"": ""C"", |
| ""to_zone_id"": ""A"", |
| ""zone_travel_distance"": 795 |
| }, |
| { |
| ""from_zone_id"": ""C"", |
| ""to_zone_id"": ""B"", |
| ""zone_travel_distance"": 758 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_family_id"": ""F1"", |
| ""to_family_id"": ""F2"", |
| ""co_pick_frequency"": 0 |
| }, |
| { |
| ""from_family_id"": ""F1"", |
| ""to_family_id"": ""F3"", |
| ""co_pick_frequency"": 1 |
| }, |
| { |
| ""from_family_id"": ""F2"", |
| ""to_family_id"": ""F1"", |
| ""co_pick_frequency"": 0 |
| }, |
| { |
| ""from_family_id"": ""F2"", |
| ""to_family_id"": ""F3"", |
| ""co_pick_frequency"": 0 |
| }, |
| { |
| ""from_family_id"": ""F3"", |
| ""to_family_id"": ""F1"", |
| ""co_pick_frequency"": 1 |
| }, |
| { |
| ""from_family_id"": ""F3"", |
| ""to_family_id"": ""F2"", |
| ""co_pick_frequency"": 16916 |
| } |
| ] |
| } |
| |
| If you want to send me a proposed layout, just drop it in this simple JSON shape so I can read it programmatically β something like this: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of the ""solution"" array as a plain list: the first entry is the zone (location) you want the first product family to live in, the second entry is the zone for the second family, and so on down the list. It's just a lightweight form to say ""family X goes to zone Y."" |
|
|
| This JSON is only a sketch of the expected shape β not the actual answer. Please use the exact identifiers from the instance input; do not rename or invent labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 64, 795], [64, 0, 758], [795, 758, 0]], 'flow_matrix': [[0, 0, 1], [0, 0, 0], [1, 16916, 0]], 'objective': 1084140.0}","[2, 0, 1]",1084140.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 64}, {'from_id': 'A', 'to_id': 'C', 'distance': 795}, {'from_id': 'B', 'to_id': 'A', 'distance': 64}, {'from_id': 'B', 'to_id': 'C', 'distance': 758}, {'from_id': 'C', 'to_id': 'A', 'distance': 795}, {'from_id': 'C', 'to_id': 'B', 'distance': 758}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 16916}]}","['C', 'A', 'B'] |
| QAP,QAP, |
|
|
| There are 3 agents and desks; agents are F1, F2, F3 and desks are 1, 2, 3. |
| Desk 1 to desk 2: distance 293. |
| Desk 1 to desk 3: distance 328. |
| Desk 2 to desk 1: distance 293. |
| Desk 2 to desk 3: distance 35. |
| Desk 3 to desk 1: distance 328. |
| Desk 3 to desk 2: distance 35. |
| Agent F1 to agent F2: interaction frequency 2. |
| Agent F1 to agent F3: interaction frequency 0. |
| Agent F2 to agent F1: interaction frequency 0. |
| Agent F2 to agent F3: interaction frequency 0. |
| Agent F3 to agent F1: interaction frequency 7. |
| Agent F3 to agent F2: interaction frequency 0. |
| Aim to minimize the total sum of interaction frequency times desk distance across all pairs. |
|
|
| Also, when you send back the seating, it'd be great if you drop it into this little JSON shape so it's quick to check: |
|
|
| { |
| ""solution"": [ |
| <seat_id_for_first_employee>, |
| <seat_id_for_second_employee>, |
| ..., |
| <seat_id_for_last_employee> |
| ] |
| } |
|
|
| Think of it like a simple form: the ""solution"" array lists, in order, which desk each person gets β first entry is the desk for the first person, the second entry for the second person, and so on. This block is just the expected shape (a sketch), not the actual answer β replace those placeholders with the real desk/location identifiers from the instance. |
|
|
| Please use the identifiers exactly as they appear in the instance input β no renaming and no new labels. |
| For example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 293, 328], [293, 0, 35], [328, 35, 0]], 'flow_matrix': [[0, 2, 0], [0, 0, 0], [7, 0, 0]], 'objective': 831.0}","[1, 0, 2]",831.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 293}, {'from_id': 1, 'to_id': 3, 'distance': 328}, {'from_id': 2, 'to_id': 1, 'distance': 293}, {'from_id': 2, 'to_id': 3, 'distance': 35}, {'from_id': 3, 'to_id': 1, 'distance': 328}, {'from_id': 3, 'to_id': 2, 'distance': 35}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 7}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","[2, 1, 3] |
| QAP,QAP, |
|
|
| { |
| ""device_and_area_count"": 3, |
| ""devices"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""patient_areas"": [ |
| 0, |
| 1, |
| 2 |
| ], |
| ""distance"": [ |
| { |
| ""from_area_id"": 0, |
| ""to_area_id"": 1, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_area_id"": 0, |
| ""to_area_id"": 2, |
| ""travel_distance"": 8 |
| }, |
| { |
| ""from_area_id"": 1, |
| ""to_area_id"": 0, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_area_id"": 1, |
| ""to_area_id"": 2, |
| ""travel_distance"": 6 |
| }, |
| { |
| ""from_area_id"": 2, |
| ""to_area_id"": 0, |
| ""travel_distance"": 8 |
| }, |
| { |
| ""from_area_id"": 2, |
| ""to_area_id"": 1, |
| ""travel_distance"": 6 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_device_id"": ""F1"", |
| ""to_device_id"": ""F2"", |
| ""co_usage_frequency"": 10 |
| }, |
| { |
| ""from_device_id"": ""F1"", |
| ""to_device_id"": ""F3"", |
| ""co_usage_frequency"": 0 |
| }, |
| { |
| ""from_device_id"": ""F2"", |
| ""to_device_id"": ""F1"", |
| ""co_usage_frequency"": 10 |
| }, |
| { |
| ""from_device_id"": ""F2"", |
| ""to_device_id"": ""F3"", |
| ""co_usage_frequency"": 2 |
| }, |
| { |
| ""from_device_id"": ""F3"", |
| ""to_device_id"": ""F1"", |
| ""co_usage_frequency"": 0 |
| }, |
| { |
| ""from_device_id"": ""F3"", |
| ""to_device_id"": ""F2"", |
| ""co_usage_frequency"": 2 |
| } |
| ] |
| } |
|
|
| Also, when you send back your assignment, please follow this simple JSON layout so I can read it without guessing: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| Think of that ""solution"" list as a little form: the first entry is the spot you picked for the first device, the second is the spot for the second device, and so on down the line. Super casual β just a one-to-one list in order. |
|
|
| This JSON is just a sketch of the shape I expect, not the actual filled-in answer. Please use the exact identifiers from the instance input β do not rename them or invent new labels. For example: Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 2, 8], [2, 0, 6], [8, 6, 0]], 'flow_matrix': [[0, 10, 0], [10, 0, 2], [0, 2, 0]], 'objective': 64.0}","[0, 1, 2]",64.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 2}, {'from_id': 0, 'to_id': 2, 'distance': 8}, {'from_id': 1, 'to_id': 0, 'distance': 2}, {'from_id': 1, 'to_id': 2, 'distance': 6}, {'from_id': 2, 'to_id': 0, 'distance': 8}, {'from_id': 2, 'to_id': 1, 'distance': 6}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 10}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 2}]}","[0, 1, 2] |
| QAP,QAP, |
|
|
| Below are the instance details: 3 servers and slots; server ids F1, F2, F3; slot ids 1, 2, 3. |
|
|
| | slot_from_id | slot_to_id | slot_distance | |
| |---|---|---| |
| | 1 | 2 | 26 | |
| | 1 | 3 | 970 | |
| | 2 | 1 | 26 | |
| | 2 | 3 | 968 | |
| | 3 | 1 | 970 | |
| | 3 | 2 | 968 | |
|
|
| | server_from_id | server_to_id | service_together_frequency | |
| |---|---|---| |
| | F1 | F2 | 116 | |
| | F1 | F3 | 0 | |
| | F2 | F1 | 19781 | |
| | F2 | F3 | 0 | |
| | F3 | F1 | 14 | |
| | F3 | F2 | 0 | |
|
|
| Use these entries to compute the total walking number and pick the assignment with the lowest cost. |
|
|
| Also, when you send your arrangement back, think of it like filling a tiny form β I want a JSON object with one key, ""solution"", whose value is an array listing which slot each server gets (first array entry = first server, second = second server, and so on). Here's the shape I expect: |
| |
| { |
| ""solution"": [ |
| <slot_id_for_first_server>, |
| <slot_id_for_second_server>, |
| ..., |
| <slot_id_for_last_server> |
| ] |
| } |
| |
| This just shows the expected shape: the array should contain one identifier per server, in order. Treat it like a simple lineup form rather than a technical schema β first entry = where server #1 goes, second = where server #2 goes, etc. It's only a sketch, not the final assignment. |
|
|
| Please be careful to use the exact identifiers from the instance input β don't rename them or invent new labels. For example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 26, 970], [26, 0, 968], [970, 968, 0]], 'flow_matrix': [[0, 116, 0], [19781, 0, 0], [14, 0, 0]], 'objective': 530874.0}","[1, 0, 2]",530874.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 26}, {'from_id': 1, 'to_id': 3, 'distance': 970}, {'from_id': 2, 'to_id': 1, 'distance': 26}, {'from_id': 2, 'to_id': 3, 'distance': 968}, {'from_id': 3, 'to_id': 1, 'distance': 970}, {'from_id': 3, 'to_id': 2, 'distance': 968}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 116}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 19781}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 14}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","[2, 1, 3]",6,markdown_table,1 |
| QAP,QAP,"Recently the team decided to rework the floor: each collection will go to one display fixture and each fixture will show one collection, no repeats and no empty spots. The point is to reduce how much extra walking shoppers have to do, measured this way β for every pair of collections, multiply the number of times theyβre bought together by the distance between their fixtures, then add those products for all pairs; a lower total means shoppers can shop more easily. The exact fixture distances and the buy-together numbers are shown below. |
| |
| There are 3 collections (F1, F2, F3) and 3 display fixtures (1, 2, 3). |
| Distance between fixture 1 and fixture 2: 8. |
| Distance between fixture 1 and fixture 3: 9. |
| Distance between fixture 2 and fixture 1: 8. |
| Distance between fixture 2 and fixture 3: 1. |
| Distance between fixture 3 and fixture 1: 9. |
| Distance between fixture 3 and fixture 2: 1. |
| Times collections F1 and F2 are bought together: 2. |
| Times collections F1 and F3 are bought together: 0. |
| Times collections F2 and F1 are bought together: 2. |
| Times collections F2 and F3 are bought together: 5. |
| Times collections F3 and F1 are bought together: 0. |
| Times collections F3 and F2 are bought together: 5. |
| Use the data below to compute and minimize the total shopper walking inconvenience. |
| |
| Oh, and when you send the actual placement, please stick to this simple JSON layout so it's easy to parse: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| This just means the ""solution"" array lists, in order, which fixture (location) each collection is assigned to β first entry = where the first collection goes, second = where the second collection goes, and so on. It's just a quick form, not the final packing β think of it as filling in the blanks. |
| |
| The JSON above is only a sketch of the shape I expect, not the actual answer. Please use the exact identifiers from the instance input β no renaming and no new labels. |
| |
| Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 8, 9], [8, 0, 1], [9, 1, 0]], 'flow_matrix': [[0, 2, 0], [2, 0, 5], [0, 5, 0]], 'objective': 42.0}","[0, 1, 2]",42.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 8}, {'from_id': 1, 'to_id': 3, 'distance': 9}, {'from_id': 2, 'to_id': 1, 'distance': 8}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 9}, {'from_id': 3, 'to_id': 2, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 5}]}","[1, 2, 3]",7,nl,1 |
| QAP,QAP,"A conductorβs little challenge: seat each player at one unique stand with no duplicates or empty spots. Then, for every pair of instruments, take how often they play together and multiply it by how far apart their stands are β sum those values across all pairs to see how good the seating is; the smaller the total, the more cohesive the layout. The exact interaction counts and stand distances are listed below. |
| |
| # num_musicians=5 |
| # musician_ids=F1, F2, F3, F4, F5 |
| # stand_ids=1, 2, 3, 4, 5 |
| |
| stand_from_id,stand_to_id,stand_distance |
| 1,2,2 |
| 1,3,3 |
| 1,4,2 |
| 1,5,0 |
| 2,1,2 |
| 2,3,2 |
| 2,4,2 |
| 2,5,0 |
| 3,1,3 |
| 3,2,2 |
| 3,4,2 |
| 3,5,0 |
| 4,1,2 |
| 4,2,2 |
| 4,3,2 |
| 4,5,0 |
| 5,1,0 |
| 5,2,0 |
| 5,3,0 |
| 5,4,0 |
| |
| musician_from_id,musician_to_id,pairwise_play_frequency |
| F1,F2,150 |
| F1,F3,100 |
| F1,F4,150 |
| F1,F5,115 |
| F2,F1,150 |
| F2,F3,50 |
| F2,F4,200 |
| F2,F5,265 |
| F3,F1,100 |
| F3,F2,50 |
| F3,F4,150 |
| F3,F5,215 |
| F4,F1,150 |
| F4,F2,200 |
| F4,F3,150 |
| F4,F5,265 |
| F5,F1,115 |
| F5,F2,265 |
| F5,F3,215 |
| F5,F4,265 |
| |
| Oh, and if you want to hand the seating back to me in a neat, predictable shape, just use this little JSON sketch: |
| |
| { |
| ""solution"": [ |
| <seat_id_for_first_facility>, |
| <seat_id_for_second_facility>, |
| ..., |
| <seat_id_for_last_facility> |
| ] |
| } |
| |
| The ""solution"" array is simply the list of seat IDs in order β the first entry is the seat for the first musician, the second entry for the second musician, and so on. Think of it like filling out a short form: one seat per musician, in order. This is just the expected shape, not the actual seating answer. |
| |
| Please be sure to use the exact identifiers from the instance input β don't rename them or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 2, 3, 2, 0], [2, 0, 2, 2, 0], [3, 2, 0, 2, 0], [2, 2, 2, 0, 0], [0, 0, 0, 0, 0]], 'flow_matrix': [[0, 150, 100, 150, 115], [150, 0, 50, 200, 265], [100, 50, 0, 150, 215], [150, 200, 150, 0, 265], [115, 265, 215, 265, 0]], 'objective': 3300.0}","[1, 2, 0, 3, 4]",3300.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 3}, {'from_id': 1, 'to_id': 4, 'distance': 2}, {'from_id': 1, 'to_id': 5, 'distance': 0}, {'from_id': 2, 'to_id': 1, 'distance': 2}, {'from_id': 2, 'to_id': 3, 'distance': 2}, {'from_id': 2, 'to_id': 4, 'distance': 2}, {'from_id': 2, 'to_id': 5, 'distance': 0}, {'from_id': 3, 'to_id': 1, 'distance': 3}, {'from_id': 3, 'to_id': 2, 'distance': 2}, {'from_id': 3, 'to_id': 4, 'distance': 2}, {'from_id': 3, 'to_id': 5, 'distance': 0}, {'from_id': 4, 'to_id': 1, 'distance': 2}, {'from_id': 4, 'to_id': 2, 'distance': 2}, {'from_id': 4, 'to_id': 3, 'distance': 2}, {'from_id': 4, 'to_id': 5, 'distance': 0}, {'from_id': 5, 'to_id': 1, 'distance': 0}, {'from_id': 5, 'to_id': 2, 'distance': 0}, {'from_id': 5, 'to_id': 3, 'distance': 0}, {'from_id': 5, 'to_id': 4, 'distance': 0}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 150}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 100}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 150}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 115}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 150}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 50}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 200}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 265}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 100}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 50}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 150}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 215}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 150}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 200}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 150}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 265}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 115}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 265}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 215}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 265}]}","[2, 3, 1, 4, 5] |
| QAP,QAP, |
|
|
| { |
| ""num_employees_and_offices"": 3, |
| ""employee_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""office_ids"": [ |
| 1, |
| 2, |
| 3 |
| ], |
| ""distance"": [ |
| { |
| ""office_source_id"": 1, |
| ""office_target_id"": 2, |
| ""office_distance"": 2 |
| }, |
| { |
| ""office_source_id"": 1, |
| ""office_target_id"": 3, |
| ""office_distance"": 1 |
| }, |
| { |
| ""office_source_id"": 2, |
| ""office_target_id"": 1, |
| ""office_distance"": 2 |
| }, |
| { |
| ""office_source_id"": 2, |
| ""office_target_id"": 3, |
| ""office_distance"": 1 |
| }, |
| { |
| ""office_source_id"": 3, |
| ""office_target_id"": 1, |
| ""office_distance"": 1 |
| }, |
| { |
| ""office_source_id"": 3, |
| ""office_target_id"": 2, |
| ""office_distance"": 1 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""employee_source_id"": ""F1"", |
| ""employee_target_id"": ""F2"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""employee_source_id"": ""F1"", |
| ""employee_target_id"": ""F3"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""employee_source_id"": ""F2"", |
| ""employee_target_id"": ""F1"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""employee_source_id"": ""F2"", |
| ""employee_target_id"": ""F3"", |
| ""interaction_frequency"": 2 |
| }, |
| { |
| ""employee_source_id"": ""F3"", |
| ""employee_target_id"": ""F1"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""employee_source_id"": ""F3"", |
| ""employee_target_id"": ""F2"", |
| ""interaction_frequency"": 2 |
| } |
| ] |
| } |
|
|
| Also, when you send back the chosen arrangement, please use this simple JSON shape β it's just a single ""solution"" list that gives the office assigned to each person in order. |
| |
| { |
| ""solution"": [ |
| <office_id_for_first_person>, |
| <office_id_for_second_person>, |
| ..., |
| <office_id_for_last_person> |
| ] |
| } |
| |
| Nothing fancy β ""solution"" is the array, the first slot is the office for the first person, the second slot for the second person, and so on. Think of it like filling out a short form: position in the list = which person, value = which office. |
| |
| This JSON is just a sketch of the shape I expect, not the actual answer. |
| |
| Please use the exact identifiers from the instance input β do not rename them or invent new ones. |
| - Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 2, 1], [2, 0, 1], [1, 1, 0]], 'flow_matrix': [[0, 1, 0], [1, 0, 2], [0, 2, 0]], 'objective': 6.0}","[0, 2, 1]",6.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 2}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 2}]}","[1, 3, 2]",9,json,1 |
| QAP,QAP,"Out in the kitchen thereβs a simple rule for layout: each ingredient category gets one dedicated counter and every counter holds one category. The overall slow-down comes from ingredient pairs β for each pair, take the number of times theyβre used together, multiply it by the distance between their counters, and sum all those results to get the total delay. The trick is to arrange the categories so that summed delay is as low as possible. The concrete instance β the groups, their pair-usage numbers and the counter distances β appears below. |
| |
| Below are the 5 ingredient categories F1, F2, F3, F4, F5 and the 1, 2, 3, 4, 5 prep counters. |
| Prep counter 1 β prep counter 2: distance 3. |
| Prep counter 1 β prep counter 3: distance 1. |
| Prep counter 1 β prep counter 4: distance 4. |
| Prep counter 1 β prep counter 5: distance 3. |
| Prep counter 2 β prep counter 1: distance 3. |
| Prep counter 2 β prep counter 3: distance 4. |
| Prep counter 2 β prep counter 4: distance 7. |
| Prep counter 2 β prep counter 5: distance 6. |
| Prep counter 3 β prep counter 1: distance 1. |
| Prep counter 3 β prep counter 2: distance 4. |
| Prep counter 3 β prep counter 4: distance 3. |
| Prep counter 3 β prep counter 5: distance 2. |
| Prep counter 4 β prep counter 1: distance 4. |
| Prep counter 4 β prep counter 2: distance 7. |
| Prep counter 4 β prep counter 3: distance 3. |
| Prep counter 4 β prep counter 5: distance 1. |
| Prep counter 5 β prep counter 1: distance 3. |
| Prep counter 5 β prep counter 2: distance 6. |
| Prep counter 5 β prep counter 3: distance 2. |
| Prep counter 5 β prep counter 4: distance 1. |
| Ingredient group F1 β F2: used together 5 times. |
| Ingredient group F1 β F3: used together 2 times. |
| Ingredient group F1 β F4: used together 2 times. |
| Ingredient group F1 β F5: used together 5 times. |
| Ingredient group F2 β F1: used together 5 times. |
| Ingredient group F2 β F3: used together 1 times. |
| Ingredient group F2 β F4: used together 0 times. |
| Ingredient group F2 β F5: used together 0 times. |
| Ingredient group F3 β F1: used together 2 times. |
| Ingredient group F3 β F2: used together 1 times. |
| Ingredient group F3 β F4: used together 2 times. |
| Ingredient group F3 β F5: used together 2 times. |
| Ingredient group F4 β F1: used together 2 times. |
| Ingredient group F4 β F2: used together 0 times. |
| Ingredient group F4 β F3: used together 2 times. |
| Ingredient group F4 β F5: used together 2 times. |
| Ingredient group F5 β F1: used together 5 times. |
| Ingredient group F5 β F2: used together 0 times. |
| Ingredient group F5 β F3: used together 2 times. |
| Ingredient group F5 β F4: used together 2 times. |
| Place the F1, F2, F3, F4, F5 on the 1, 2, 3, 4, 5 so the summed delay is as small as possible. |
| |
| Also, when you send your layout back, just use this simple JSON shape so I can read it without guessing: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| The ""solution"" array is just a straight list: the first entry is the counter (location) you put the first ingredient category on, the second entry is the counter for the second category, and so on β one entry per category in order. Think of it like filling out a short form: one slot for each category, write the counter label you chose. |
| |
| This JSON is only a sketch of the shape I need, not the actual answer. Please use the exact identifiers from the instance input β do not rename them or invent new ones. Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 3, 1, 4, 3], [3, 0, 4, 7, 6], [1, 4, 0, 3, 2], [4, 7, 3, 0, 1], [3, 6, 2, 1, 0]], 'flow_matrix': [[0, 5, 2, 2, 5], [5, 0, 1, 0, 0], [2, 1, 0, 2, 2], [2, 0, 2, 0, 2], [5, 0, 2, 2, 0]], 'objective': 104.0}","[0, 1, 4, 3, 2]",104.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 3}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 4}, {'from_id': 1, 'to_id': 5, 'distance': 3}, {'from_id': 2, 'to_id': 1, 'distance': 3}, {'from_id': 2, 'to_id': 3, 'distance': 4}, {'from_id': 2, 'to_id': 4, 'distance': 7}, {'from_id': 2, 'to_id': 5, 'distance': 6}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 4}, {'from_id': 3, 'to_id': 4, 'distance': 3}, {'from_id': 3, 'to_id': 5, 'distance': 2}, {'from_id': 4, 'to_id': 1, 'distance': 4}, {'from_id': 4, 'to_id': 2, 'distance': 7}, {'from_id': 4, 'to_id': 3, 'distance': 3}, {'from_id': 4, 'to_id': 5, 'distance': 1}, {'from_id': 5, 'to_id': 1, 'distance': 3}, {'from_id': 5, 'to_id': 2, 'distance': 6}, {'from_id': 5, 'to_id': 3, 'distance': 2}, {'from_id': 5, 'to_id': 4, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 2}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 2}]}","[1, 2, 5, 4, 3]",10,nl,1 |
| QAP,QAP,"Weβve got a bunch of produce categories and a handful of display islands, and the job is to put one category on each island without any duplicates or empty spots. What makes an arrangement βgoodβ is simple: for each pair of categories, multiply how often theyβre purchased together by the walking distance between their islands, then sum all those products β smaller sums mean shoppers travel less overall. The concrete layout and purchase counts are listed below. |
| |
| { |
| ""num_categories_and_islands"": 4, |
| ""produce_categories"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"" |
| ], |
| ""display_islands"": [ |
| 1, |
| 2, |
| 3, |
| 4 |
| ], |
| ""distance"": [ |
| { |
| ""from_island_id"": 1, |
| ""to_island_id"": 2, |
| ""walking_distance"": 6 |
| }, |
| { |
| ""from_island_id"": 1, |
| ""to_island_id"": 3, |
| ""walking_distance"": 5 |
| }, |
| { |
| ""from_island_id"": 1, |
| ""to_island_id"": 4, |
| ""walking_distance"": 11 |
| }, |
| { |
| ""from_island_id"": 2, |
| ""to_island_id"": 1, |
| ""walking_distance"": 6 |
| }, |
| { |
| ""from_island_id"": 2, |
| ""to_island_id"": 3, |
| ""walking_distance"": 3 |
| }, |
| { |
| ""from_island_id"": 2, |
| ""to_island_id"": 4, |
| ""walking_distance"": 5 |
| }, |
| { |
| ""from_island_id"": 3, |
| ""to_island_id"": 1, |
| ""walking_distance"": 5 |
| }, |
| { |
| ""from_island_id"": 3, |
| ""to_island_id"": 2, |
| ""walking_distance"": 3 |
| }, |
| { |
| ""from_island_id"": 3, |
| ""to_island_id"": 4, |
| ""walking_distance"": 6 |
| }, |
| { |
| ""from_island_id"": 4, |
| ""to_island_id"": 1, |
| ""walking_distance"": 11 |
| }, |
| { |
| ""from_island_id"": 4, |
| ""to_island_id"": 2, |
| ""walking_distance"": 5 |
| }, |
| { |
| ""from_island_id"": 4, |
| ""to_island_id"": 3, |
| ""walking_distance"": 6 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F2"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F3"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F4"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F1"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F3"", |
| ""co_purchase_frequency"": 10 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F4"", |
| ""co_purchase_frequency"": 2 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F1"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F2"", |
| ""co_purchase_frequency"": 10 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F4"", |
| ""co_purchase_frequency"": 5 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F1"", |
| ""co_purchase_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F2"", |
| ""co_purchase_frequency"": 2 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F3"", |
| ""co_purchase_frequency"": 5 |
| } |
| ] |
| } |
| |
| One more thing β when you send back your chosen layout, please use this simple JSON shape so I can read it easily: |
| |
| { |
| ""solution"": [ |
| <island_id_for_first_category>, |
| <island_id_for_second_category>, |
| ..., |
| <island_id_for_last_category> |
| ] |
| } |
| |
| ""solution"" should be a list where the first entry is the island id where the first produce category goes, the second entry is the island id for the second category, and so on through the list of categories in the instance. This JSON is just a sketch of the expected shape β not your final answer filled in. |
| |
| Please make sure to use the exact identifiers from the instance input, with no renaming and no new labels. Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 6, 5, 11], [6, 0, 3, 5], [5, 3, 0, 6], [11, 5, 6, 0]], 'flow_matrix': [[0, 0, 0, 0], [0, 0, 10, 2], [0, 10, 0, 5], [0, 2, 5, 0]], 'objective': 134.0}","[0, 2, 1, 3]",134.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 6}, {'from_id': 1, 'to_id': 3, 'distance': 5}, {'from_id': 1, 'to_id': 4, 'distance': 11}, {'from_id': 2, 'to_id': 1, 'distance': 6}, {'from_id': 2, 'to_id': 3, 'distance': 3}, {'from_id': 2, 'to_id': 4, 'distance': 5}, {'from_id': 3, 'to_id': 1, 'distance': 5}, {'from_id': 3, 'to_id': 2, 'distance': 3}, {'from_id': 3, 'to_id': 4, 'distance': 6}, {'from_id': 4, 'to_id': 1, 'distance': 11}, {'from_id': 4, 'to_id': 2, 'distance': 5}, {'from_id': 4, 'to_id': 3, 'distance': 6}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 10}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 5}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 5}]}","[1, 3, 2, 4]",11,json,1 |
| QAP,QAP,"I work in a library where every subject collection has to live on its own single bookcase, and every case can hold only one subject. The job is to arrange those bookcases so that when people grab pairs of titles, the total amount of hauling around is kept as small as possible. Practically that means looking at how often each pair of titles gets requested together and how far apart their bookcases would be, multiplying those two numbers for each pair, and adding all those products up β the smaller that total, the better the layout. No collection can be split across cases or duplicated, and no case can be empty or hold more than one subject. The exact lists of collections, request-pair counts, and shelf spacings are shown below. |
| |
| There are 3 subject collections and 3 bookcases; the collections are F1, F2, F3 and the bookcases are A, B, C. |
| |
| | from_bookcase_id | to_bookcase_id | shelf_distance | |
| |---|---|---| |
| | A | B | 1 | |
| | A | C | 1 | |
| | B | A | 1 | |
| | B | C | 1 | |
| | C | A | 1 | |
| | C | B | 1 | |
| |
| | from_collection_id | to_collection_id | co_request_count | |
| |---|---|---| |
| | F1 | F2 | 27 | |
| | F1 | F3 | 40 | |
| | F2 | F1 | 27 | |
| | F2 | F3 | 33 | |
| | F3 | F1 | 40 | |
| | F3 | F2 | 33 | |
| |
| I'll use these 3 collections and 3 bookcases to arrange each collection on a single case and minimize the total hauling effort. |
|
|
| If you want to send your proposed layout back to me, just use this simple JSON shape so I can read it easily: |
|
|
| { |
| ""solution"": [ |
| <case_id_for_first_collection>, |
| <case_id_for_second_collection>, |
| ..., |
| <case_id_for_last_collection> |
| ] |
| } |
|
|
| Think of that ""solution"" list as a form: the first item is the case id where the first collection should live, the second item is where the second collection goes, and so on through the whole list. This is just a sketch of the shape I need, not the actual answerβfill in the real case IDs when you reply. |
|
|
| Please make sure to use the exact identifiers from the instance input β no renaming and no new labels. |
| for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1], [1, 0, 1], [1, 1, 0]], 'flow_matrix': [[0, 27, 40], [27, 0, 33], [40, 33, 0]], 'objective': 200.0}","[2, 0, 1]",200.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 1}, {'from_id': 'A', 'to_id': 'C', 'distance': 1}, {'from_id': 'B', 'to_id': 'A', 'distance': 1}, {'from_id': 'B', 'to_id': 'C', 'distance': 1}, {'from_id': 'C', 'to_id': 'A', 'distance': 1}, {'from_id': 'C', 'to_id': 'B', 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 27}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 40}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 27}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 33}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 40}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 33}]}","['C', 'A', 'B'] |
| QAP,QAP, |
|
|
| # num_equipment_and_bays=4 |
| # equipment_ids=F1, F2, F3, F4 |
| # bay_ids=1, 2, 3, 4 |
|
|
| bay_from_id,bay_to_id,bay_distance |
| 1,2,1000 |
| 1,3,4123 |
| 1,4,2828 |
| 2,1,1000 |
| 2,3,4000 |
| 2,4,2236 |
| 3,1,4123 |
| 3,2,4000 |
| 3,4,6082 |
| 4,1,2828 |
| 4,2,2236 |
| 4,3,6082 |
|
|
| equipment_from_id,equipment_to_id,pairing_frequency |
| F1,F2,0 |
| F1,F3,0 |
| F1,F4,0 |
| F2,F1,0 |
| F2,F3,1 |
| F2,F4,0 |
| F3,F1,0 |
| F3,F2,1 |
| F3,F4,0 |
| F4,F1,0 |
| F4,F2,0 |
| F4,F3,0 |
|
|
| When you send back the parking plan, just use a tiny JSON object so it's easy to parse β something casual like this will do: |
| |
| { |
| ""solution"": [ |
| <bay_id_for_first_piece>, |
| <bay_id_for_second_piece>, |
| ..., |
| <bay_id_for_last_piece> |
| ] |
| } |
| |
| Think of that ""solution"" list as a simple checklist: the first entry says which bay the first item on the equipment roster goes to, the second entry is for the second item, and so on. The angled-bracket names are just placeholders showing the shape I expect β you'll replace each with the actual bay identifier from the instance. |
|
|
| This JSON is only a sketch of the shape I need, not the final answer itself. Please use the exact identifiers as they appear in the instance input β do not rename them or invent new labels. |
|
|
| - Valid identifiers look like plain numbers such as ""1"" or ""23"", single capital letters like ""A"" or ""B"", or a capital letter followed by digits like ""A1"" or ""X7"".","{'distance_matrix': [[0, 1000, 4123, 2828], [1000, 0, 4000, 2236], [4123, 4000, 0, 6082], [2828, 2236, 6082, 0]], 'flow_matrix': [[0, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 0]], 'objective': 2000.0}","[2, 1, 0, 3]",2000.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 1000}, {'from_id': 1, 'to_id': 3, 'distance': 4123}, {'from_id': 1, 'to_id': 4, 'distance': 2828}, {'from_id': 2, 'to_id': 1, 'distance': 1000}, {'from_id': 2, 'to_id': 3, 'distance': 4000}, {'from_id': 2, 'to_id': 4, 'distance': 2236}, {'from_id': 3, 'to_id': 1, 'distance': 4123}, {'from_id': 3, 'to_id': 2, 'distance': 4000}, {'from_id': 3, 'to_id': 4, 'distance': 6082}, {'from_id': 4, 'to_id': 1, 'distance': 2828}, {'from_id': 4, 'to_id': 2, 'distance': 2236}, {'from_id': 4, 'to_id': 3, 'distance': 6082}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}]}","[3, 2, 1, 4] |
| QAP,QAP, |
|
|
| { |
| ""num_machines_and_bays"": 3, |
| ""machine_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""bay_ids"": [ |
| 0, |
| 1, |
| 2 |
| ], |
| ""distance"": [ |
| { |
| ""bay_from_id"": 0, |
| ""bay_to_id"": 1, |
| ""travel_distance_between_bays"": 602 |
| }, |
| { |
| ""bay_from_id"": 0, |
| ""bay_to_id"": 2, |
| ""travel_distance_between_bays"": 611 |
| }, |
| { |
| ""bay_from_id"": 1, |
| ""bay_to_id"": 0, |
| ""travel_distance_between_bays"": 602 |
| }, |
| { |
| ""bay_from_id"": 1, |
| ""bay_to_id"": 2, |
| ""travel_distance_between_bays"": 10 |
| }, |
| { |
| ""bay_from_id"": 2, |
| ""bay_to_id"": 0, |
| ""travel_distance_between_bays"": 611 |
| }, |
| { |
| ""bay_from_id"": 2, |
| ""bay_to_id"": 1, |
| ""travel_distance_between_bays"": 10 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""machine_from_id"": ""F1"", |
| ""machine_to_id"": ""F2"", |
| ""part_transfer_frequency"": 0 |
| }, |
| { |
| ""machine_from_id"": ""F1"", |
| ""machine_to_id"": ""F3"", |
| ""part_transfer_frequency"": 0 |
| }, |
| { |
| ""machine_from_id"": ""F2"", |
| ""machine_to_id"": ""F1"", |
| ""part_transfer_frequency"": 1 |
| }, |
| { |
| ""machine_from_id"": ""F2"", |
| ""machine_to_id"": ""F3"", |
| ""part_transfer_frequency"": 0 |
| }, |
| { |
| ""machine_from_id"": ""F3"", |
| ""machine_to_id"": ""F1"", |
| ""part_transfer_frequency"": 0 |
| }, |
| { |
| ""machine_from_id"": ""F3"", |
| ""machine_to_id"": ""F2"", |
| ""part_transfer_frequency"": 0 |
| } |
| ] |
| } |
|
|
| If you'd like to give the assignment back to me, a compact JSON like this works best β nothing fancy, just a list that says which bay each machine goes to: |
| |
| { |
| ""solution"": [ |
| <bay_id_for_first_machine>, |
| <bay_id_for_second_machine>, |
| ..., |
| <bay_id_for_last_machine> |
| ] |
| } |
| |
| This ""solution"" array is just a simple mapping: the first entry is the bay for the first machine, the second entry is the bay for the second machine, and so on. Think of the angle-bracket placeholders as blanks to fill in with the exact bay identifiers from the instance β it's just a sketch of the shape I need, not the final answer. |
|
|
| Please make sure to use the identifiers exactly as they appear in the problem input β do not rename them or invent new labels. To be clear, valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 602, 611], [602, 0, 10], [611, 10, 0]], 'flow_matrix': [[0, 0, 0], [1, 0, 0], [0, 0, 0]], 'objective': 10.0}","[1, 2, 0]",10.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 602}, {'from_id': 0, 'to_id': 2, 'distance': 611}, {'from_id': 1, 'to_id': 0, 'distance': 602}, {'from_id': 1, 'to_id': 2, 'distance': 10}, {'from_id': 2, 'to_id': 0, 'distance': 611}, {'from_id': 2, 'to_id': 1, 'distance': 10}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","[1, 2, 0] |
| QAP,QAP, |
|
|
| # num_exhibitors_and_booths=5 |
| # exhibitor_ids=F1, F2, F3, F4, F5 |
| # booth_ids=A, B, C, D, E |
|
|
| booth_source_id,booth_target_id,walking_distance_between_booths |
| A,B,87 |
| A,C,15 |
| A,D,989 |
| A,E,770 |
| B,A,87 |
| B,C,79 |
| B,D,908 |
| B,E,683 |
| C,A,15 |
| C,B,79 |
| C,D,985 |
| C,E,762 |
| D,A,989 |
| D,B,908 |
| D,C,985 |
| D,E,290 |
| E,A,770 |
| E,B,683 |
| E,C,762 |
| E,D,290 |
|
|
| exhibitor_source_id,exhibitor_target_id,attendee_flow_between_exhibitors |
| F1,F2,0 |
| F1,F3,0 |
| F1,F4,53531 |
| F1,F5,0 |
| F2,F1,1 |
| F2,F3,0 |
| F2,F4,270 |
| F2,F5,2 |
| F3,F1,0 |
| F3,F2,5 |
| F3,F4,0 |
| F3,F5,283 |
| F4,F1,37455 |
| F4,F2,0 |
| F4,F3,2137 |
| F4,F5,0 |
| F5,F1,1 |
| F5,F2,6 |
| F5,F3,16242 |
| F5,F4,15 |
|
|
| Also, when you send back your final assignment, keep it in this simple JSON shape so it's easy to parse: |
| |
| { |
| ""solution"": [ |
| <booth_id_for_first_vendor>, |
| <booth_id_for_second_vendor>, |
| ..., |
| <booth_id_for_last_vendor> |
| ] |
| } |
| |
| Here that array is just a list that says which booth goes to which vendor β first entry = booth for the first vendor, second entry = booth for the second vendor, and so on. It's just the format I need, not the actual assignment β think of it like filling out a short form. |
|
|
| Please be sure to use the exact identifiers from the instance input (don't rename them or invent new ones). For example: |
| - Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 87, 15, 989, 770], [87, 0, 79, 908, 683], [15, 79, 0, 985, 762], [989, 908, 985, 0, 290], [770, 683, 762, 290, 0]], 'flow_matrix': [[0, 0, 0, 53531, 0], [1, 0, 0, 270, 2], [0, 5, 0, 0, 283], [37455, 0, 2137, 0, 0], [1, 6, 16242, 15, 0]], 'objective': 7833294.0}","[0, 1, 4, 2, 3]",7833294.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': ['A', 'B', 'C', 'D', 'E'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 87}, {'from_id': 'A', 'to_id': 'C', 'distance': 15}, {'from_id': 'A', 'to_id': 'D', 'distance': 989}, {'from_id': 'A', 'to_id': 'E', 'distance': 770}, {'from_id': 'B', 'to_id': 'A', 'distance': 87}, {'from_id': 'B', 'to_id': 'C', 'distance': 79}, {'from_id': 'B', 'to_id': 'D', 'distance': 908}, {'from_id': 'B', 'to_id': 'E', 'distance': 683}, {'from_id': 'C', 'to_id': 'A', 'distance': 15}, {'from_id': 'C', 'to_id': 'B', 'distance': 79}, {'from_id': 'C', 'to_id': 'D', 'distance': 985}, {'from_id': 'C', 'to_id': 'E', 'distance': 762}, {'from_id': 'D', 'to_id': 'A', 'distance': 989}, {'from_id': 'D', 'to_id': 'B', 'distance': 908}, {'from_id': 'D', 'to_id': 'C', 'distance': 985}, {'from_id': 'D', 'to_id': 'E', 'distance': 290}, {'from_id': 'E', 'to_id': 'A', 'distance': 770}, {'from_id': 'E', 'to_id': 'B', 'distance': 683}, {'from_id': 'E', 'to_id': 'C', 'distance': 762}, {'from_id': 'E', 'to_id': 'D', 'distance': 290}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 53531}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 270}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 283}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 37455}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 2137}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 6}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 16242}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 15}]}","['A', 'B', 'E', 'C', 'D']",15,csv,names |
| QAP,QAP,"Over the last week the chair has been mapping groups to benches so that each group ends up at exactly one bench and each bench hosts exactly one group. To figure out which mapping makes life easier, calculate for every pair how often they interact times the distance between their benches, then add all those numbers together; a smaller total means less overhead from distance. No benches left empty and no group placed twice. The exact bench positions and interaction counts follow below. |
| |
| { |
| ""num_groups_and_benches"": 5, |
| ""research_group_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""bench_ids"": [ |
| 1, |
| 2, |
| 3, |
| 4, |
| 5 |
| ], |
| ""distance"": [ |
| { |
| ""bench_id_from"": 1, |
| ""bench_id_to"": 2, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 1, |
| ""bench_id_to"": 3, |
| ""bench_distance"": 1 |
| }, |
| { |
| ""bench_id_from"": 1, |
| ""bench_id_to"": 4, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 1, |
| ""bench_id_to"": 5, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 2, |
| ""bench_id_to"": 1, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 2, |
| ""bench_id_to"": 3, |
| ""bench_distance"": 4 |
| }, |
| { |
| ""bench_id_from"": 2, |
| ""bench_id_to"": 4, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 2, |
| ""bench_id_to"": 5, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 3, |
| ""bench_id_to"": 1, |
| ""bench_distance"": 1 |
| }, |
| { |
| ""bench_id_from"": 3, |
| ""bench_id_to"": 2, |
| ""bench_distance"": 4 |
| }, |
| { |
| ""bench_id_from"": 3, |
| ""bench_id_to"": 4, |
| ""bench_distance"": 1 |
| }, |
| { |
| ""bench_id_from"": 3, |
| ""bench_id_to"": 5, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 4, |
| ""bench_id_to"": 1, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 4, |
| ""bench_id_to"": 2, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 4, |
| ""bench_id_to"": 3, |
| ""bench_distance"": 1 |
| }, |
| { |
| ""bench_id_from"": 4, |
| ""bench_id_to"": 5, |
| ""bench_distance"": 1 |
| }, |
| { |
| ""bench_id_from"": 5, |
| ""bench_id_to"": 1, |
| ""bench_distance"": 3 |
| }, |
| { |
| ""bench_id_from"": 5, |
| ""bench_id_to"": 2, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 5, |
| ""bench_id_to"": 3, |
| ""bench_distance"": 2 |
| }, |
| { |
| ""bench_id_from"": 5, |
| ""bench_id_to"": 4, |
| ""bench_distance"": 1 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""group_id_from"": ""F1"", |
| ""group_id_to"": ""F2"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""group_id_from"": ""F1"", |
| ""group_id_to"": ""F3"", |
| ""interaction_frequency"": 5 |
| }, |
| { |
| ""group_id_from"": ""F1"", |
| ""group_id_to"": ""F4"", |
| ""interaction_frequency"": 5 |
| }, |
| { |
| ""group_id_from"": ""F1"", |
| ""group_id_to"": ""F5"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""group_id_from"": ""F2"", |
| ""group_id_to"": ""F1"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""group_id_from"": ""F2"", |
| ""group_id_to"": ""F3"", |
| ""interaction_frequency"": 4 |
| }, |
| { |
| ""group_id_from"": ""F2"", |
| ""group_id_to"": ""F4"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""group_id_from"": ""F2"", |
| ""group_id_to"": ""F5"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""group_id_from"": ""F3"", |
| ""group_id_to"": ""F1"", |
| ""interaction_frequency"": 5 |
| }, |
| { |
| ""group_id_from"": ""F3"", |
| ""group_id_to"": ""F2"", |
| ""interaction_frequency"": 4 |
| }, |
| { |
| ""group_id_from"": ""F3"", |
| ""group_id_to"": ""F4"", |
| ""interaction_frequency"": 3 |
| }, |
| { |
| ""group_id_from"": ""F3"", |
| ""group_id_to"": ""F5"", |
| ""interaction_frequency"": 3 |
| }, |
| { |
| ""group_id_from"": ""F4"", |
| ""group_id_to"": ""F1"", |
| ""interaction_frequency"": 5 |
| }, |
| { |
| ""group_id_from"": ""F4"", |
| ""group_id_to"": ""F2"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""group_id_from"": ""F4"", |
| ""group_id_to"": ""F3"", |
| ""interaction_frequency"": 3 |
| }, |
| { |
| ""group_id_from"": ""F4"", |
| ""group_id_to"": ""F5"", |
| ""interaction_frequency"": 10 |
| }, |
| { |
| ""group_id_from"": ""F5"", |
| ""group_id_to"": ""F1"", |
| ""interaction_frequency"": 1 |
| }, |
| { |
| ""group_id_from"": ""F5"", |
| ""group_id_to"": ""F2"", |
| ""interaction_frequency"": 0 |
| }, |
| { |
| ""group_id_from"": ""F5"", |
| ""group_id_to"": ""F3"", |
| ""interaction_frequency"": 3 |
| }, |
| { |
| ""group_id_from"": ""F5"", |
| ""group_id_to"": ""F4"", |
| ""interaction_frequency"": 10 |
| } |
| ] |
| } |
| |
| If you want to hand me the final mapping in a simple, machine-friendly way, just follow this little JSON sketch β nothing fancy, just the order of benches for each group: |
| |
| { |
| ""solution"": [ |
| <bench_id_for_first_group>, |
| <bench_id_for_second_group>, |
| ..., |
| <bench_id_for_last_group> |
| ] |
| } |
| |
| This ""solution"" list is just the benches in order: the first entry is the bench for the first group, the second entry for the second group, and so on. Treat the angle-bracket placeholders as slots you replace with the actual bench identifiers from the instance. It's just a form to fill out β not the real answer itself. |
|
|
| Please be sure to use the exact identifiers given in the instance input β don't rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 3, 1, 2, 3], [3, 0, 4, 3, 2], [1, 4, 0, 1, 2], [2, 3, 1, 0, 1], [3, 2, 2, 1, 0]], 'flow_matrix': [[0, 1, 5, 5, 1], [1, 0, 4, 0, 0], [5, 4, 0, 3, 3], [5, 0, 3, 0, 10], [1, 0, 3, 10, 0]], 'objective': 96.0}","[3, 1, 4, 2, 0]",96.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 3}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 2}, {'from_id': 1, 'to_id': 5, 'distance': 3}, {'from_id': 2, 'to_id': 1, 'distance': 3}, {'from_id': 2, 'to_id': 3, 'distance': 4}, {'from_id': 2, 'to_id': 4, 'distance': 3}, {'from_id': 2, 'to_id': 5, 'distance': 2}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 4}, {'from_id': 3, 'to_id': 4, 'distance': 1}, {'from_id': 3, 'to_id': 5, 'distance': 2}, {'from_id': 4, 'to_id': 1, 'distance': 2}, {'from_id': 4, 'to_id': 2, 'distance': 3}, {'from_id': 4, 'to_id': 3, 'distance': 1}, {'from_id': 4, 'to_id': 5, 'distance': 1}, {'from_id': 5, 'to_id': 1, 'distance': 3}, {'from_id': 5, 'to_id': 2, 'distance': 2}, {'from_id': 5, 'to_id': 3, 'distance': 2}, {'from_id': 5, 'to_id': 4, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 5}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 5}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 4}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 4}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 3}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 10}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 3}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 10}]}","[4, 2, 5, 3, 1]",16,json,1 |
| QAP,QAP,"Many people donβt realize how much walking for props adds up, so the plan is to put each prop set into its own storage spot and ensure no spot holds more than one set. Thereβs a number for how frequently any two sets are fetched together and a distance for any two spots; for each pair, multiply the frequency by the distance to get the pairβs retrieval cost. Sum those costs across all pairs and that total is what we want to keep small by choosing which set goes where. The detailed frequencies and distances are listed below. |
| |
| There are 4 of each: prop set ids are F1, F2, F3, F4 and storage spot ids are 1, 2, 3, 4. |
| |
| | from_spot_id | to_spot_id | walking_time_between_spots | |
| |---|---|---| |
| | 1 | 2 | 1 | |
| | 1 | 3 | 1 | |
| | 1 | 4 | 1 | |
| | 2 | 1 | 1 | |
| | 2 | 3 | 1 | |
| | 2 | 4 | 1 | |
| | 3 | 1 | 1 | |
| | 3 | 2 | 1 | |
| | 3 | 4 | 1 | |
| | 4 | 1 | 1 | |
| | 4 | 2 | 1 | |
| | 4 | 3 | 1 | |
| |
| | from_prop_set_id | to_prop_set_id | joint_fetch_frequency | |
| |---|---|---| |
| | F1 | F2 | 23 | |
| | F1 | F3 | 26 | |
| | F1 | F4 | 28 | |
| | F2 | F1 | 23 | |
| | F2 | F3 | 16 | |
| | F2 | F4 | 10 | |
| | F3 | F1 | 26 | |
| | F3 | F2 | 16 | |
| | F3 | F4 | 27 | |
| | F4 | F1 | 28 | |
| | F4 | F2 | 10 | |
| | F4 | F3 | 27 | |
| |
| Use these entries to compute the total retrieval cost and choose assignments that keep it small. |
| |
| Also, when you send back your placement, a little JSON blob like the one below is handy β it just lists which spot each prop set goes to, in order. |
| |
| { |
| ""solution"": [ |
| <spot_id_for_first_set>, |
| <spot_id_for_second_set>, |
| ..., |
| <spot_id_for_last_set> |
| ] |
| } |
| |
| This simply means: the first entry is the spot assigned to the first prop set, the second entry is the spot for the second prop set, and so on. Think of it as a quick form where each slot in the list names the storage spot for that particular set. |
| |
| This JSON is only a sketch of the shape I expect, not the actual placement β please fill in the real identifiers from the instance when you reply. Also make sure to use the exact identifiers given in the instance input β do not rename them or invent new labels. For example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0]], 'flow_matrix': [[0, 23, 26, 28], [23, 0, 16, 10], [26, 16, 0, 27], [28, 10, 27, 0]], 'objective': 260.0}","[3, 1, 2, 0]",260.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 4, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}, {'from_id': 3, 'to_id': 4, 'distance': 1}, {'from_id': 4, 'to_id': 1, 'distance': 1}, {'from_id': 4, 'to_id': 2, 'distance': 1}, {'from_id': 4, 'to_id': 3, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 23}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 26}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 28}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 23}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 16}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 10}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 26}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 16}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 27}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 28}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 27}]}","[4, 2, 3, 1]",17,markdown_table,1 |
| QAP,QAP,"Thereβs a plan to reduce bottlenecks at the dispensary by reassigning where medication families sit. The rule is strict β one family per drawer and one drawer per family, no sharing or empty slots. The task is choosing which family is assigned to which drawer; an assignment is judged by adding up, for every pair of families, the frequency theyβre prescribed together times how far apart their drawers are. The lower that combined number, the less time lost to fetching meds. The detailed instance data (families, drawers, co-prescription counts and distances) appear below. |
| |
| { |
| ""num_families_drawers"": 5, |
| ""medication_families"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""drawer_ids"": [ |
| ""A"", |
| ""B"", |
| ""C"", |
| ""D"", |
| ""E"" |
| ], |
| ""distance"": [ |
| { |
| ""from_drawer"": ""A"", |
| ""to_drawer"": ""B"", |
| ""drawer_distance"": 331 |
| }, |
| { |
| ""from_drawer"": ""A"", |
| ""to_drawer"": ""C"", |
| ""drawer_distance"": 318 |
| }, |
| { |
| ""from_drawer"": ""A"", |
| ""to_drawer"": ""D"", |
| ""drawer_distance"": 222 |
| }, |
| { |
| ""from_drawer"": ""A"", |
| ""to_drawer"": ""E"", |
| ""drawer_distance"": 390 |
| }, |
| { |
| ""from_drawer"": ""B"", |
| ""to_drawer"": ""A"", |
| ""drawer_distance"": 331 |
| }, |
| { |
| ""from_drawer"": ""B"", |
| ""to_drawer"": ""C"", |
| ""drawer_distance"": 20 |
| }, |
| { |
| ""from_drawer"": ""B"", |
| ""to_drawer"": ""D"", |
| ""drawer_distance"": 111 |
| }, |
| { |
| ""from_drawer"": ""B"", |
| ""to_drawer"": ""E"", |
| ""drawer_distance"": 91 |
| }, |
| { |
| ""from_drawer"": ""C"", |
| ""to_drawer"": ""A"", |
| ""drawer_distance"": 318 |
| }, |
| { |
| ""from_drawer"": ""C"", |
| ""to_drawer"": ""B"", |
| ""drawer_distance"": 20 |
| }, |
| { |
| ""from_drawer"": ""C"", |
| ""to_drawer"": ""D"", |
| ""drawer_distance"": 97 |
| }, |
| { |
| ""from_drawer"": ""C"", |
| ""to_drawer"": ""E"", |
| ""drawer_distance"": 89 |
| }, |
| { |
| ""from_drawer"": ""D"", |
| ""to_drawer"": ""A"", |
| ""drawer_distance"": 222 |
| }, |
| { |
| ""from_drawer"": ""D"", |
| ""to_drawer"": ""B"", |
| ""drawer_distance"": 111 |
| }, |
| { |
| ""from_drawer"": ""D"", |
| ""to_drawer"": ""C"", |
| ""drawer_distance"": 97 |
| }, |
| { |
| ""from_drawer"": ""D"", |
| ""to_drawer"": ""E"", |
| ""drawer_distance"": 173 |
| }, |
| { |
| ""from_drawer"": ""E"", |
| ""to_drawer"": ""A"", |
| ""drawer_distance"": 390 |
| }, |
| { |
| ""from_drawer"": ""E"", |
| ""to_drawer"": ""B"", |
| ""drawer_distance"": 91 |
| }, |
| { |
| ""from_drawer"": ""E"", |
| ""to_drawer"": ""C"", |
| ""drawer_distance"": 89 |
| }, |
| { |
| ""from_drawer"": ""E"", |
| ""to_drawer"": ""D"", |
| ""drawer_distance"": 173 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_family"": ""F1"", |
| ""to_family"": ""F2"", |
| ""coprescription_count"": 58098 |
| }, |
| { |
| ""from_family"": ""F1"", |
| ""to_family"": ""F3"", |
| ""coprescription_count"": 6273 |
| }, |
| { |
| ""from_family"": ""F1"", |
| ""to_family"": ""F4"", |
| ""coprescription_count"": 3 |
| }, |
| { |
| ""from_family"": ""F1"", |
| ""to_family"": ""F5"", |
| ""coprescription_count"": 57 |
| }, |
| { |
| ""from_family"": ""F2"", |
| ""to_family"": ""F1"", |
| ""coprescription_count"": 14543 |
| }, |
| { |
| ""from_family"": ""F2"", |
| ""to_family"": ""F3"", |
| ""coprescription_count"": 3720 |
| }, |
| { |
| ""from_family"": ""F2"", |
| ""to_family"": ""F4"", |
| ""coprescription_count"": 2 |
| }, |
| { |
| ""from_family"": ""F2"", |
| ""to_family"": ""F5"", |
| ""coprescription_count"": 759 |
| }, |
| { |
| ""from_family"": ""F3"", |
| ""to_family"": ""F1"", |
| ""coprescription_count"": 0 |
| }, |
| { |
| ""from_family"": ""F3"", |
| ""to_family"": ""F2"", |
| ""coprescription_count"": 3516 |
| }, |
| { |
| ""from_family"": ""F3"", |
| ""to_family"": ""F4"", |
| ""coprescription_count"": 2106 |
| }, |
| { |
| ""from_family"": ""F3"", |
| ""to_family"": ""F5"", |
| ""coprescription_count"": 20364 |
| }, |
| { |
| ""from_family"": ""F4"", |
| ""to_family"": ""F1"", |
| ""coprescription_count"": 3 |
| }, |
| { |
| ""from_family"": ""F4"", |
| ""to_family"": ""F2"", |
| ""coprescription_count"": 5417 |
| }, |
| { |
| ""from_family"": ""F4"", |
| ""to_family"": ""F3"", |
| ""coprescription_count"": 0 |
| }, |
| { |
| ""from_family"": ""F4"", |
| ""to_family"": ""F5"", |
| ""coprescription_count"": 0 |
| }, |
| { |
| ""from_family"": ""F5"", |
| ""to_family"": ""F1"", |
| ""coprescription_count"": 36146 |
| }, |
| { |
| ""from_family"": ""F5"", |
| ""to_family"": ""F2"", |
| ""coprescription_count"": 1 |
| }, |
| { |
| ""from_family"": ""F5"", |
| ""to_family"": ""F3"", |
| ""coprescription_count"": 19 |
| }, |
| { |
| ""from_family"": ""F5"", |
| ""to_family"": ""F4"", |
| ""coprescription_count"": 0 |
| } |
| ] |
| } |
| |
| When youβre ready to return an assignment, just use this simple JSON layout β nothing fancy, just a ""solution"" list that maps each family (in the order they appear in the instance) to a drawer. |
| |
| { |
| ""solution"": [ |
| <drawer_id_for_first_family>, |
| <drawer_id_for_second_family>, |
| ..., |
| <drawer_id_for_last_family> |
| ] |
| } |
| |
| Think of the array as a fill-in-the-blanks form: the first entry is the drawer assigned to the first family listed in the instance, the second entry is for the second family, and so on. This block is just a sketch of the shape I expect, not the actual assignment. |
| |
| Please be careful to use the exact identifiers from the instance input β donβt rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 331, 318, 222, 390], [331, 0, 20, 111, 91], [318, 20, 0, 97, 89], [222, 111, 97, 0, 173], [390, 91, 89, 173, 0]], 'flow_matrix': [[0, 58098, 6273, 3, 57], [14543, 0, 3720, 2, 759], [0, 3516, 0, 2106, 20364], [3, 5417, 0, 0, 0], [36146, 1, 19, 0, 0]], 'objective': 11932147.0}","[1, 2, 3, 0, 4]",11932147.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': ['A', 'B', 'C', 'D', 'E'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 331}, {'from_id': 'A', 'to_id': 'C', 'distance': 318}, {'from_id': 'A', 'to_id': 'D', 'distance': 222}, {'from_id': 'A', 'to_id': 'E', 'distance': 390}, {'from_id': 'B', 'to_id': 'A', 'distance': 331}, {'from_id': 'B', 'to_id': 'C', 'distance': 20}, {'from_id': 'B', 'to_id': 'D', 'distance': 111}, {'from_id': 'B', 'to_id': 'E', 'distance': 91}, {'from_id': 'C', 'to_id': 'A', 'distance': 318}, {'from_id': 'C', 'to_id': 'B', 'distance': 20}, {'from_id': 'C', 'to_id': 'D', 'distance': 97}, {'from_id': 'C', 'to_id': 'E', 'distance': 89}, {'from_id': 'D', 'to_id': 'A', 'distance': 222}, {'from_id': 'D', 'to_id': 'B', 'distance': 111}, {'from_id': 'D', 'to_id': 'C', 'distance': 97}, {'from_id': 'D', 'to_id': 'E', 'distance': 173}, {'from_id': 'E', 'to_id': 'A', 'distance': 390}, {'from_id': 'E', 'to_id': 'B', 'distance': 91}, {'from_id': 'E', 'to_id': 'C', 'distance': 89}, {'from_id': 'E', 'to_id': 'D', 'distance': 173}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 58098}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 6273}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 3}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 57}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 14543}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 3720}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 759}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 3516}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 2106}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 20364}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 5417}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 36146}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 19}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 0}]}","['B', 'C', 'D', 'A', 'E']",18,json,names |
| QAP,QAP,"I run the little repair shop and need to decide where to park every repair kit on the benches so techs spend as little time walking as possible. The choice is which kit goes to which bench, with the rule that every kit gets one bench and every bench holds exactly one kit β no duplicates, nothing left out. What makes one layout better is the total walking caused when kits that are commonly used together sit far apart: for every pair of kits, multiply how often theyβre used together by how far apart their benches are, then add up all those numbers β the lower that total, the better the bench plan. The exact numbers for how often kits are paired and how far benches are from each other are listed below. |
| |
| They are: 5 kits and benches β kit IDs: F1, F2, F3, F4, F5; bench IDs: 1, 2, 3, 4, 5. |
| Distance between bench 1 and bench 2 is 1. |
| Distance between bench 1 and bench 3 is 1. |
| Distance between bench 1 and bench 4 is 1. |
| Distance between bench 1 and bench 5 is 1. |
| Distance between bench 2 and bench 1 is 1. |
| Distance between bench 2 and bench 3 is 1. |
| Distance between bench 2 and bench 4 is 1. |
| Distance between bench 2 and bench 5 is 1. |
| Distance between bench 3 and bench 1 is 1. |
| Distance between bench 3 and bench 2 is 1. |
| Distance between bench 3 and bench 4 is 1. |
| Distance between bench 3 and bench 5 is 1. |
| Distance between bench 4 and bench 1 is 1. |
| Distance between bench 4 and bench 2 is 1. |
| Distance between bench 4 and bench 3 is 1. |
| Distance between bench 4 and bench 5 is 1. |
| Distance between bench 5 and bench 1 is 1. |
| Distance between bench 5 and bench 2 is 0. |
| Distance between bench 5 and bench 3 is 1. |
| Distance between bench 5 and bench 4 is 1. |
| Kits F1 and F2 are paired with usage 82. |
| Kits F1 and F3 are paired with usage 26. |
| Kits F1 and F4 are paired with usage 41. |
| Kits F1 and F5 are paired with usage 45. |
| Kits F2 and F1 are paired with usage 82. |
| Kits F2 and F3 are paired with usage 43. |
| Kits F2 and F4 are paired with usage 27. |
| Kits F2 and F5 are paired with usage 49. |
| Kits F3 and F1 are paired with usage 26. |
| Kits F3 and F2 are paired with usage 43. |
| Kits F3 and F4 are paired with usage 33. |
| Kits F3 and F5 are paired with usage 48. |
| Kits F4 and F1 are paired with usage 41. |
| Kits F4 and F2 are paired with usage 27. |
| Kits F4 and F3 are paired with usage 33. |
| Kits F4 and F5 are paired with usage 28. |
| Kits F5 and F1 are paired with usage 45. |
| Kits F5 and F2 are paired with usage 49. |
| Kits F5 and F3 are paired with usage 48. |
| Kits F5 and F4 are paired with usage 28. |
| I'll use these figures to pick the bench layout that minimizes total walking. |
|
|
| If you want to hand me a bench plan, just drop it in this simple JSON shape so I can read it straight away β a list that says which bench goes with which kit. For our shop story Iβll show the placeholders using bench-themed names so itβs obvious what goes where: |
|
|
| { |
| ""solution"": [ |
| <bench_id_for_first_kit>, |
| <bench_id_for_second_kit>, |
| ..., |
| <bench_id_for_last_kit> |
| ] |
| } |
|
|
| This is just a sketch of the shape I need: the solution array lists, in order, the bench identifier that the first kit should go to, then the bench for the second kit, and so on until the last kit. Think of it as filling out a simple form where each kit gets one bench labeled by the identifier. |
|
|
| One quick reminder: use the exact identifiers from the instance input β donβt rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 0, 1], [1, 0, 1, 1, 0]], 'flow_matrix': [[0, 82, 26, 41, 45], [82, 0, 43, 27, 49], [26, 43, 0, 33, 48], [41, 27, 33, 0, 28], [45, 49, 48, 28, 0]], 'objective': 762.0}","[4, 1, 2, 3, 0]",762.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 1}, {'from_id': 1, 'to_id': 5, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 4, 'distance': 1}, {'from_id': 2, 'to_id': 5, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}, {'from_id': 3, 'to_id': 4, 'distance': 1}, {'from_id': 3, 'to_id': 5, 'distance': 1}, {'from_id': 4, 'to_id': 1, 'distance': 1}, {'from_id': 4, 'to_id': 2, 'distance': 1}, {'from_id': 4, 'to_id': 3, 'distance': 1}, {'from_id': 4, 'to_id': 5, 'distance': 1}, {'from_id': 5, 'to_id': 1, 'distance': 1}, {'from_id': 5, 'to_id': 2, 'distance': 0}, {'from_id': 5, 'to_id': 3, 'distance': 1}, {'from_id': 5, 'to_id': 4, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 82}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 26}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 41}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 45}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 82}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 43}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 27}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 49}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 26}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 43}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 33}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 48}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 41}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 27}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 33}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 28}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 45}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 49}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 48}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 28}]}","[5, 2, 3, 4, 1] |
| QAP,QAP, |
|
|
| Here are the 4 workshops and the 4 rooms: F1, F2, F3, F4 and 0, 1, 2, 3. |
| From room 0 to room 1 the walking distance is 5. |
| From room 0 to room 2 the walking distance is 5. |
| From room 0 to room 3 the walking distance is 5. |
| From room 1 to room 0 the walking distance is 5. |
| From room 1 to room 2 the walking distance is 8. |
| From room 1 to room 3 the walking distance is 8. |
| From room 2 to room 0 the walking distance is 5. |
| From room 2 to room 1 the walking distance is 8. |
| From room 2 to room 3 the walking distance is 4. |
| From room 3 to room 0 the walking distance is 5. |
| From room 3 to room 1 the walking distance is 8. |
| From room 3 to room 2 the walking distance is 4. |
| From workshop F1 to workshop F2: 0 attendees switch between them. |
| From workshop F1 to workshop F3: 0 attendees switch between them. |
| From workshop F1 to workshop F4: 6 attendees switch between them. |
| From workshop F2 to workshop F1: 0 attendees switch between them. |
| From workshop F2 to workshop F3: 1 attendees switch between them. |
| From workshop F2 to workshop F4: 3 attendees switch between them. |
| From workshop F3 to workshop F1: 0 attendees switch between them. |
| From workshop F3 to workshop F2: 1 attendees switch between them. |
| From workshop F3 to workshop F4: 10 attendees switch between them. |
| From workshop F4 to workshop F1: 6 attendees switch between them. |
| From workshop F4 to workshop F2: 3 attendees switch between them. |
| From workshop F4 to workshop F3: 10 attendees switch between them. |
| We'll use these entries to compute the total walking cost for the assignments. |
| |
| When you send the final answer, please use a tiny JSON snippet like this so it's straightforward to read and check: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| This means: ""solution"" is an ordered list where each entry is the room/location identifier assigned to the corresponding workshop (first list item β first workshop, second β second workshop, and so on). Think of it like filling out a simple form β one room id per workshop in order. The JSON above is just the shape I need, not the actual assignment. |
|
|
| Please use the exact identifiers from the instance input β don't rename them or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 5, 5, 5], [5, 0, 8, 8], [5, 8, 0, 4], [5, 8, 4, 0]], 'flow_matrix': [[0, 0, 0, 6], [0, 0, 1, 3], [0, 1, 0, 10], [6, 3, 10, 0]], 'objective': 198.0}","[1, 3, 2, 0]",198.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 5}, {'from_id': 0, 'to_id': 2, 'distance': 5}, {'from_id': 0, 'to_id': 3, 'distance': 5}, {'from_id': 1, 'to_id': 0, 'distance': 5}, {'from_id': 1, 'to_id': 2, 'distance': 8}, {'from_id': 1, 'to_id': 3, 'distance': 8}, {'from_id': 2, 'to_id': 0, 'distance': 5}, {'from_id': 2, 'to_id': 1, 'distance': 8}, {'from_id': 2, 'to_id': 3, 'distance': 4}, {'from_id': 3, 'to_id': 0, 'distance': 5}, {'from_id': 3, 'to_id': 1, 'distance': 8}, {'from_id': 3, 'to_id': 2, 'distance': 4}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 6}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 3}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 10}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 6}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 10}]}","[1, 3, 2, 0]",20,nl,0 |
| QAP,QAP,"Recently the facilities team decided to rearrange where crews park so that the teams swapping the most equipment donβt have to travel far. The way to compare setups is straightforward: for every pair of crews multiply how much they interact by the distance between their assigned bays, then total those numbers; the arrangement with the smallest total is the one that keeps walking and cart trips down. Every crew must be placed into one distinct bay and every bay must be filled by one crew. The detailed exchange counts and bay-to-bay distances follow below. |
| |
| The instance below lists 4 crews (F1, F2, F3, F4) and 4 bays (0, 1, 2, 3). |
| From bay 0 to bay 1: walking distance 53. |
| From bay 0 to bay 2: walking distance 53. |
| From bay 0 to bay 3: walking distance 73. |
| From bay 1 to bay 0: walking distance 66. |
| From bay 1 to bay 2: walking distance 53. |
| From bay 1 to bay 3: walking distance 73. |
| From bay 2 to bay 0: walking distance 53. |
| From bay 2 to bay 1: walking distance 53. |
| From bay 2 to bay 3: walking distance 53. |
| From bay 3 to bay 0: walking distance 66. |
| From bay 3 to bay 1: walking distance 66. |
| From bay 3 to bay 2: walking distance 53. |
| From crew F1 to crew F2: equipment exchanges 3. |
| From crew F1 to crew F3: equipment exchanges 4. |
| From crew F1 to crew F4: equipment exchanges 0. |
| From crew F2 to crew F1: equipment exchanges 0. |
| From crew F2 to crew F3: equipment exchanges 0. |
| From crew F2 to crew F4: equipment exchanges 0. |
| From crew F3 to crew F1: equipment exchanges 15. |
| From crew F3 to crew F2: equipment exchanges 0. |
| From crew F3 to crew F4: equipment exchanges 1. |
| From crew F4 to crew F1: equipment exchanges 1. |
| From crew F4 to crew F2: equipment exchanges 0. |
| From crew F4 to crew F3: equipment exchanges 1. |
| Use these distances and exchange counts to compute each assignment's total interaction cost; the arrangement with the smallest total is preferred. |
|
|
| If you want to submit an arrangement, just reply with a small JSON snippet like this so it's easy to parse. Here's the shape I expect: |
|
|
| { |
| ""solution"": [ |
| <bay_id_for_first_crew>, |
| <bay_id_for_second_crew>, |
| ..., |
| <bay_id_for_last_crew> |
| ] |
| } |
|
|
| This array should list, in order, which bay each crew is assigned to β first entry = first crew, second = second crew, and so on. Think of it like filling out a short form: one bay ID per crew. The block above is only a sketch of the shape I need, not the actual assignment. |
|
|
| Please use the exact identifiers from the instance input β don't rename them or invent new labels. Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[53, 53, 53, 73], [66, 53, 53, 73], [53, 53, 53, 53], [66, 66, 53, 53]], 'flow_matrix': [[3, 3, 4, 0], [0, 0, 0, 0], [15, 0, 0, 1], [1, 0, 1, 0]], 'objective': 1497.0}","[0, 1, 2, 3]",1497.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 53}, {'from_id': 0, 'to_id': 2, 'distance': 53}, {'from_id': 0, 'to_id': 3, 'distance': 73}, {'from_id': 1, 'to_id': 0, 'distance': 66}, {'from_id': 1, 'to_id': 2, 'distance': 53}, {'from_id': 1, 'to_id': 3, 'distance': 73}, {'from_id': 2, 'to_id': 0, 'distance': 53}, {'from_id': 2, 'to_id': 1, 'distance': 53}, {'from_id': 2, 'to_id': 3, 'distance': 53}, {'from_id': 3, 'to_id': 0, 'distance': 66}, {'from_id': 3, 'to_id': 1, 'distance': 66}, {'from_id': 3, 'to_id': 2, 'distance': 53}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 3}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 4}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 15}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 1}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 1}]}","[0, 1, 2, 3]",21,nl,0 |
| QAP,QAP,"I was chatting with a hospital director who wanted to rearrange where the specialty teams sit so the groups that send lots of patients to each other end up nearer. The task is to give every team its own ward area and make sure every ward has exactly one team β no team doubled up and no area left empty. Better layouts are the ones where, for every pair of teams, you take how many patients they transfer, multiply that by how far apart their assigned wards are, and add all those numbers together; the smaller that total, the better the setup. The exact teams, ward areas, distances and transfer counts are listed below. |
| |
| # num_teams_and_wards=3 |
| # specialty_teams=F1, F2, F3 |
| # ward_areas=A, B, C |
| |
| ward_from_id,ward_to_id,separation_distance |
| A,B,74 |
| A,C,20 |
| B,A,74 |
| B,C,26 |
| C,A,20 |
| C,B,26 |
| |
| team_from_id,team_to_id,patient_transfers |
| F1,F2,27 |
| F1,F3,81 |
| F2,F1,27 |
| F2,F3,17 |
| F3,F1,81 |
| F3,F2,17 |
| |
| If you want to hand me the layout in a machine-friendly way, just use this simple JSON shape when you reply β keeps things tidy and quick to read. |
| |
| { |
| ""solution"": [ |
| <ward_id_for_first_team>, |
| <ward_id_for_second_team>, |
| ..., |
| <ward_id_for_last_team> |
| ] |
| } |
| |
| This just says: ""solution"" is the ordered list of ward IDs assigned to teams in the same order the instance lists the teams. The first entry is the ward for the first team, the second is for the second team, and so on. Itβs just a template β not the real assignment. |
| |
| Please make sure to use the exact identifiers that appear in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 74, 20], [74, 0, 26], [20, 26, 0]], 'flow_matrix': [[0, 27, 81], [27, 0, 17], [81, 17, 0]], 'objective': 7160.0}","[2, 1, 0]",7160.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 74}, {'from_id': 'A', 'to_id': 'C', 'distance': 20}, {'from_id': 'B', 'to_id': 'A', 'distance': 74}, {'from_id': 'B', 'to_id': 'C', 'distance': 26}, {'from_id': 'C', 'to_id': 'A', 'distance': 20}, {'from_id': 'C', 'to_id': 'B', 'distance': 26}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 27}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 81}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 27}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 17}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 81}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 17}]}","['C', 'B', 'A']",22,csv,names |
| QAP,QAP,"Weβre reshuffling the aisles and have to decide which category goes into which dedicated shelf zone β one category per zone and every zone filled once. A good plan keeps category pairs that trade customers close together; you score any plan by going through all pairs, multiplying their mutual sales by the distance between the zones you put them in, and summing those values, so lower sums mean better groupings. The exact cross-sales figures and the map of zone distances are listed below. |
| |
| { |
| ""num_categories_and_zones"": 5, |
| ""product_categories"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""shelf_zones"": [ |
| 0, |
| 1, |
| 2, |
| 3, |
| 4 |
| ], |
| ""distance"": [ |
| { |
| ""from_zone_id"": 0, |
| ""to_zone_id"": 1, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 0, |
| ""to_zone_id"": 2, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 0, |
| ""to_zone_id"": 3, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 0, |
| ""to_zone_id"": 4, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 1, |
| ""to_zone_id"": 0, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 1, |
| ""to_zone_id"": 2, |
| ""zone_distance"": 2 |
| }, |
| { |
| ""from_zone_id"": 1, |
| ""to_zone_id"": 3, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 1, |
| ""to_zone_id"": 4, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 2, |
| ""to_zone_id"": 0, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 2, |
| ""to_zone_id"": 1, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 2, |
| ""to_zone_id"": 3, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 2, |
| ""to_zone_id"": 4, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 3, |
| ""to_zone_id"": 0, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 3, |
| ""to_zone_id"": 1, |
| ""zone_distance"": 0 |
| }, |
| { |
| ""from_zone_id"": 3, |
| ""to_zone_id"": 2, |
| ""zone_distance"": 2 |
| }, |
| { |
| ""from_zone_id"": 3, |
| ""to_zone_id"": 4, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 4, |
| ""to_zone_id"": 0, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 4, |
| ""to_zone_id"": 1, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 4, |
| ""to_zone_id"": 2, |
| ""zone_distance"": 1 |
| }, |
| { |
| ""from_zone_id"": 4, |
| ""to_zone_id"": 3, |
| ""zone_distance"": 1 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F2"", |
| ""cross_sales_flow"": 19 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F3"", |
| ""cross_sales_flow"": 9 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F4"", |
| ""cross_sales_flow"": 4 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F5"", |
| ""cross_sales_flow"": 4 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F1"", |
| ""cross_sales_flow"": 19 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F3"", |
| ""cross_sales_flow"": 19 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F4"", |
| ""cross_sales_flow"": 10 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F5"", |
| ""cross_sales_flow"": 10 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F1"", |
| ""cross_sales_flow"": 9 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F2"", |
| ""cross_sales_flow"": 19 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F4"", |
| ""cross_sales_flow"": 9 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F5"", |
| ""cross_sales_flow"": 12 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F1"", |
| ""cross_sales_flow"": 4 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F2"", |
| ""cross_sales_flow"": 10 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F3"", |
| ""cross_sales_flow"": 9 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F5"", |
| ""cross_sales_flow"": 12 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F1"", |
| ""cross_sales_flow"": 4 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F2"", |
| ""cross_sales_flow"": 10 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F3"", |
| ""cross_sales_flow"": 12 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F4"", |
| ""cross_sales_flow"": 12 |
| } |
| ] |
| } |
| |
| When you send your suggested shelving plan back, just drop it into a tiny JSON snippet like the one below β nothing fancy, just a straight list showing which zone each category goes into. |
| |
| { |
| ""solution"": [ |
| <zone_id_for_first_category>, |
| <zone_id_for_second_category>, |
| ..., |
| <zone_id_for_last_category> |
| ] |
| } |
| |
| This shows the mapping in order: the first entry is the zone you want for the first category, the second entry is the zone for the second category, and so on. Think of it like filling out a simple form β one slot per category. |
| |
| This is only a sketch of the shape I expect, not your actual answer. Please use the exact identifiers from the instance input with no renaming or invented labels β no changing ""A1"" to ""aisle1"" or the like. |
| |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1, 1, 1], [1, 0, 2, 1, 1], [1, 1, 0, 1, 1], [1, 0, 2, 0, 1], [1, 1, 1, 1, 0]], 'flow_matrix': [[0, 19, 9, 4, 4], [19, 0, 19, 10, 10], [9, 19, 0, 9, 12], [4, 10, 9, 0, 12], [4, 10, 12, 12, 0]], 'objective': 211.0}","[3, 1, 0, 2, 4]",211.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [0, 1, 2, 3, 4], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 1}, {'from_id': 0, 'to_id': 2, 'distance': 1}, {'from_id': 0, 'to_id': 3, 'distance': 1}, {'from_id': 0, 'to_id': 4, 'distance': 1}, {'from_id': 1, 'to_id': 0, 'distance': 1}, {'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 1}, {'from_id': 2, 'to_id': 0, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 4, 'distance': 1}, {'from_id': 3, 'to_id': 0, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 0}, {'from_id': 3, 'to_id': 2, 'distance': 2}, {'from_id': 3, 'to_id': 4, 'distance': 1}, {'from_id': 4, 'to_id': 0, 'distance': 1}, {'from_id': 4, 'to_id': 1, 'distance': 1}, {'from_id': 4, 'to_id': 2, 'distance': 1}, {'from_id': 4, 'to_id': 3, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 19}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 9}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 4}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 4}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 19}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 19}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 10}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 10}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 9}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 19}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 9}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 12}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 4}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 9}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 12}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 4}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 12}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 12}]}","[3, 1, 0, 2, 4]",23,json,0 |
| QAP,QAP,"Weβve got a stack of bands and a handful of stages, and the job is to match each band to a single stage in a way that keeps crews and gear movement to a minimum. Picture checking every pair of bands, seeing how much crew or kit they need in common, multiplying that by the distance between their assigned stages, and summing all those results β a smaller sum means less lugging and fewer crossover headaches. Each band gets one stage and each stage gets only one band. The exact acts, distances, and shared-resource numbers are listed below. |
| |
| { |
| ""num_bands_and_stages"": 5, |
| ""bands_list"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""stages_list"": [ |
| 1, |
| 2, |
| 3, |
| 4, |
| 5 |
| ], |
| ""distance"": [ |
| { |
| ""stage_from_id"": 1, |
| ""stage_to_id"": 2, |
| ""stage_distance"": 79 |
| }, |
| { |
| ""stage_from_id"": 1, |
| ""stage_to_id"": 3, |
| ""stage_distance"": 68 |
| }, |
| { |
| ""stage_from_id"": 1, |
| ""stage_to_id"": 4, |
| ""stage_distance"": 99 |
| }, |
| { |
| ""stage_from_id"": 1, |
| ""stage_to_id"": 5, |
| ""stage_distance"": 80 |
| }, |
| { |
| ""stage_from_id"": 2, |
| ""stage_to_id"": 1, |
| ""stage_distance"": 79 |
| }, |
| { |
| ""stage_from_id"": 2, |
| ""stage_to_id"": 3, |
| ""stage_distance"": 55 |
| }, |
| { |
| ""stage_from_id"": 2, |
| ""stage_to_id"": 4, |
| ""stage_distance"": 11 |
| }, |
| { |
| ""stage_from_id"": 2, |
| ""stage_to_id"": 5, |
| ""stage_distance"": 17 |
| }, |
| { |
| ""stage_from_id"": 3, |
| ""stage_to_id"": 1, |
| ""stage_distance"": 68 |
| }, |
| { |
| ""stage_from_id"": 3, |
| ""stage_to_id"": 2, |
| ""stage_distance"": 55 |
| }, |
| { |
| ""stage_from_id"": 3, |
| ""stage_to_id"": 4, |
| ""stage_distance"": 33 |
| }, |
| { |
| ""stage_from_id"": 3, |
| ""stage_to_id"": 5, |
| ""stage_distance"": 54 |
| }, |
| { |
| ""stage_from_id"": 4, |
| ""stage_to_id"": 1, |
| ""stage_distance"": 99 |
| }, |
| { |
| ""stage_from_id"": 4, |
| ""stage_to_id"": 2, |
| ""stage_distance"": 11 |
| }, |
| { |
| ""stage_from_id"": 4, |
| ""stage_to_id"": 3, |
| ""stage_distance"": 33 |
| }, |
| { |
| ""stage_from_id"": 4, |
| ""stage_to_id"": 5, |
| ""stage_distance"": 86 |
| }, |
| { |
| ""stage_from_id"": 5, |
| ""stage_to_id"": 1, |
| ""stage_distance"": 80 |
| }, |
| { |
| ""stage_from_id"": 5, |
| ""stage_to_id"": 2, |
| ""stage_distance"": 17 |
| }, |
| { |
| ""stage_from_id"": 5, |
| ""stage_to_id"": 3, |
| ""stage_distance"": 54 |
| }, |
| { |
| ""stage_from_id"": 5, |
| ""stage_to_id"": 4, |
| ""stage_distance"": 86 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""band_from_id"": ""F1"", |
| ""band_to_id"": ""F2"", |
| ""shared_resource_flow"": 78 |
| }, |
| { |
| ""band_from_id"": ""F1"", |
| ""band_to_id"": ""F3"", |
| ""shared_resource_flow"": 86 |
| }, |
| { |
| ""band_from_id"": ""F1"", |
| ""band_to_id"": ""F4"", |
| ""shared_resource_flow"": 8 |
| }, |
| { |
| ""band_from_id"": ""F1"", |
| ""band_to_id"": ""F5"", |
| ""shared_resource_flow"": 5 |
| }, |
| { |
| ""band_from_id"": ""F2"", |
| ""band_to_id"": ""F1"", |
| ""shared_resource_flow"": 78 |
| }, |
| { |
| ""band_from_id"": ""F2"", |
| ""band_to_id"": ""F3"", |
| ""shared_resource_flow"": 24 |
| }, |
| { |
| ""band_from_id"": ""F2"", |
| ""band_to_id"": ""F4"", |
| ""shared_resource_flow"": 83 |
| }, |
| { |
| ""band_from_id"": ""F2"", |
| ""band_to_id"": ""F5"", |
| ""shared_resource_flow"": 36 |
| }, |
| { |
| ""band_from_id"": ""F3"", |
| ""band_to_id"": ""F1"", |
| ""shared_resource_flow"": 86 |
| }, |
| { |
| ""band_from_id"": ""F3"", |
| ""band_to_id"": ""F2"", |
| ""shared_resource_flow"": 24 |
| }, |
| { |
| ""band_from_id"": ""F3"", |
| ""band_to_id"": ""F4"", |
| ""shared_resource_flow"": 41 |
| }, |
| { |
| ""band_from_id"": ""F3"", |
| ""band_to_id"": ""F5"", |
| ""shared_resource_flow"": 68 |
| }, |
| { |
| ""band_from_id"": ""F4"", |
| ""band_to_id"": ""F1"", |
| ""shared_resource_flow"": 8 |
| }, |
| { |
| ""band_from_id"": ""F4"", |
| ""band_to_id"": ""F2"", |
| ""shared_resource_flow"": 83 |
| }, |
| { |
| ""band_from_id"": ""F4"", |
| ""band_to_id"": ""F3"", |
| ""shared_resource_flow"": 41 |
| }, |
| { |
| ""band_from_id"": ""F4"", |
| ""band_to_id"": ""F5"", |
| ""shared_resource_flow"": 44 |
| }, |
| { |
| ""band_from_id"": ""F5"", |
| ""band_to_id"": ""F1"", |
| ""shared_resource_flow"": 5 |
| }, |
| { |
| ""band_from_id"": ""F5"", |
| ""band_to_id"": ""F2"", |
| ""shared_resource_flow"": 36 |
| }, |
| { |
| ""band_from_id"": ""F5"", |
| ""band_to_id"": ""F3"", |
| ""shared_resource_flow"": 68 |
| }, |
| { |
| ""band_from_id"": ""F5"", |
| ""band_to_id"": ""F4"", |
| ""shared_resource_flow"": 44 |
| } |
| ] |
| } |
| |
| Oh, and when you send back the matching, please use this simple JSON layout so it's easy to read by whatever's checking it: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of ""solution"" as just a list: the first item is the stage (location) you pick for the first band (facility), the second item is the stage for the second band, and so on down the line. Super informal β it's just a form showing who goes where. |
|
|
| This JSON is only a sketch of the shape I need, not your final answer. Please use the exact identifiers from the instance input β don't rename them and don't invent new labels. |
|
|
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 79, 68, 99, 80], [79, 0, 55, 11, 17], [68, 55, 0, 33, 54], [99, 11, 33, 0, 86], [80, 17, 54, 86, 0]], 'flow_matrix': [[0, 78, 86, 8, 5], [78, 0, 24, 83, 36], [86, 24, 0, 41, 68], [8, 83, 41, 0, 44], [5, 36, 68, 44, 0]], 'objective': 41624.0}","[3, 1, 2, 4, 0]",41624.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 79}, {'from_id': 1, 'to_id': 3, 'distance': 68}, {'from_id': 1, 'to_id': 4, 'distance': 99}, {'from_id': 1, 'to_id': 5, 'distance': 80}, {'from_id': 2, 'to_id': 1, 'distance': 79}, {'from_id': 2, 'to_id': 3, 'distance': 55}, {'from_id': 2, 'to_id': 4, 'distance': 11}, {'from_id': 2, 'to_id': 5, 'distance': 17}, {'from_id': 3, 'to_id': 1, 'distance': 68}, {'from_id': 3, 'to_id': 2, 'distance': 55}, {'from_id': 3, 'to_id': 4, 'distance': 33}, {'from_id': 3, 'to_id': 5, 'distance': 54}, {'from_id': 4, 'to_id': 1, 'distance': 99}, {'from_id': 4, 'to_id': 2, 'distance': 11}, {'from_id': 4, 'to_id': 3, 'distance': 33}, {'from_id': 4, 'to_id': 5, 'distance': 86}, {'from_id': 5, 'to_id': 1, 'distance': 80}, {'from_id': 5, 'to_id': 2, 'distance': 17}, {'from_id': 5, 'to_id': 3, 'distance': 54}, {'from_id': 5, 'to_id': 4, 'distance': 86}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 78}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 86}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 8}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 78}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 24}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 83}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 36}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 86}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 24}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 41}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 68}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 8}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 83}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 41}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 44}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 36}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 68}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 44}]}","[4, 2, 3, 5, 1] |
| QAP,QAP, |
|
|
| There are 5 groups and rooms; the group ids are F1, F2, F3, F4, F5 and the room ids are 1, 2, 3, 4, 5. |
|
|
| | room_from | room_to | room_distance | |
| |---|---|---| |
| | 1 | 2 | 49 | |
| | 1 | 3 | 87 | |
| | 1 | 4 | 61 | |
| | 1 | 5 | 42 | |
| | 2 | 1 | 49 | |
| | 2 | 3 | 62 | |
| | 2 | 4 | 63 | |
| | 2 | 5 | 13 | |
| | 3 | 1 | 87 | |
| | 3 | 2 | 62 | |
| | 3 | 4 | 92 | |
| | 3 | 5 | 82 | |
| | 4 | 1 | 61 | |
| | 4 | 2 | 63 | |
| | 4 | 3 | 92 | |
| | 4 | 5 | 6 | |
| | 5 | 1 | 42 | |
| | 5 | 2 | 13 | |
| | 5 | 3 | 82 | |
| | 5 | 4 | 6 | |
|
|
| | group_from | group_to | collaboration_flow | |
| |---|---|---| |
| | F1 | F2 | 92 | |
| | F1 | F3 | 18 | |
| | F1 | F4 | 47 | |
| | F1 | F5 | 61 | |
| | F2 | F1 | 92 | |
| | F2 | F3 | 88 | |
| | F2 | F4 | 61 | |
| | F2 | F5 | 67 | |
| | F3 | F1 | 18 | |
| | F3 | F2 | 88 | |
| | F3 | F4 | 73 | |
| | F3 | F5 | 17 | |
| | F4 | F1 | 47 | |
| | F4 | F2 | 61 | |
| | F4 | F3 | 73 | |
| | F4 | F5 | 20 | |
| | F5 | F1 | 61 | |
| | F5 | F2 | 67 | |
| | F5 | F3 | 17 | |
| | F5 | F4 | 20 | |
|
|
| I'll use these 5 entries to compute the layout friendliness by the rule above. |
| |
| If you want to send back a suggested layout, just use this simple JSON shape so I know which room goes to which group: |
| |
| { |
| ""solution"": [ |
| <room_id_for_first_group>, |
| <room_id_for_second_group>, |
| ..., |
| <room_id_for_last_group> |
| ] |
| } |
| |
| ""solution"" is just a list: the first item is the room assigned to the first research group, the second item is the room for the second group, and so on. Treat this as a sketch of the expected shape β not the final assignment itself. |
| |
| Please use the exact identifiers from the instance input β don't rename them or invent new ones. |
| Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 49, 87, 61, 42], [49, 0, 62, 63, 13], [87, 62, 0, 92, 82], [61, 63, 92, 0, 6], [42, 13, 82, 6, 0]], 'flow_matrix': [[0, 92, 18, 47, 61], [92, 0, 88, 61, 67], [18, 88, 0, 73, 17], [47, 61, 73, 0, 20], [61, 67, 17, 20, 0]], 'objective': 49512.0}","[1, 4, 3, 0, 2]",49512.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 49}, {'from_id': 1, 'to_id': 3, 'distance': 87}, {'from_id': 1, 'to_id': 4, 'distance': 61}, {'from_id': 1, 'to_id': 5, 'distance': 42}, {'from_id': 2, 'to_id': 1, 'distance': 49}, {'from_id': 2, 'to_id': 3, 'distance': 62}, {'from_id': 2, 'to_id': 4, 'distance': 63}, {'from_id': 2, 'to_id': 5, 'distance': 13}, {'from_id': 3, 'to_id': 1, 'distance': 87}, {'from_id': 3, 'to_id': 2, 'distance': 62}, {'from_id': 3, 'to_id': 4, 'distance': 92}, {'from_id': 3, 'to_id': 5, 'distance': 82}, {'from_id': 4, 'to_id': 1, 'distance': 61}, {'from_id': 4, 'to_id': 2, 'distance': 63}, {'from_id': 4, 'to_id': 3, 'distance': 92}, {'from_id': 4, 'to_id': 5, 'distance': 6}, {'from_id': 5, 'to_id': 1, 'distance': 42}, {'from_id': 5, 'to_id': 2, 'distance': 13}, {'from_id': 5, 'to_id': 3, 'distance': 82}, {'from_id': 5, 'to_id': 4, 'distance': 6}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 92}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 18}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 47}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 61}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 92}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 88}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 61}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 67}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 18}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 88}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 73}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 17}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 47}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 61}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 73}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 20}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 61}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 67}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 17}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 20}]}","[2, 5, 4, 1, 3] |
| QAP,QAP, |
|
|
| Here are the instance details: 3 total services and racks; the service identifiers are F1, F2, F3; the rack identifiers are A, B, C. |
|
|
| | rack_from_id | rack_to_id | rack_latency | |
| |---|---|---| |
| | A | B | 25 | |
| | A | C | 641 | |
| | B | A | 25 | |
| | B | C | 622 | |
| | C | A | 641 | |
| | C | B | 622 | |
|
|
| | service_from_id | service_to_id | traffic_volume | |
| |---|---|---| |
| | F1 | F2 | 0 | |
| | F1 | F3 | 3322 | |
| | F2 | F1 | 0 | |
| | F2 | F3 | 22 | |
| | F3 | F1 | 0 | |
| | F3 | F2 | 0 | |
|
|
| Use these traffic and latency lines to compute the summed trafficΓlatency cost for any seating. |
|
|
| Also, when you reply with the actual seating plan, a simple JSON snippet like this is the shape I expect β just so it's easy to read and machine-friendly: |
| |
| { |
| ""solution"": [ |
| <rack_id_for_first_service>, |
| <rack_id_for_second_service>, |
| ..., |
| <rack_id_for_last_service> |
| ] |
| } |
| |
| Think of ""solution"" as a list where each position is a service and the value is the rack it gets assigned to: first list entry β first service, second β second service, and so on. This block is just a sketch of the shape I want, not the real assignment. |
| |
| Please make sure to use the exact identifiers from the instance input β do not rename or invent labels. |
| For example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 25, 641], [25, 0, 622], [641, 622, 0]], 'flow_matrix': [[0, 0, 3322], [0, 0, 22], [0, 0, 0]], 'objective': 96734.0}","[0, 2, 1]",96734.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 25}, {'from_id': 'A', 'to_id': 'C', 'distance': 641}, {'from_id': 'B', 'to_id': 'A', 'distance': 25}, {'from_id': 'B', 'to_id': 'C', 'distance': 622}, {'from_id': 'C', 'to_id': 'A', 'distance': 641}, {'from_id': 'C', 'to_id': 'B', 'distance': 622}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 3322}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 22}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","['A', 'C', 'B']",26,markdown_table,names |
| QAP,QAP,"Recently the loading team talked about reordering the slots: give each cargo category one slot and make sure no slot is shared or left empty. If two categories end up frequently on the same shipments, put their slots near each other so the overall strain goes down β compute that strain by multiplying each pairβs co-loading frequency by how far apart their slots are, then add everything up; the arrangement with the smallest sum cuts time and cost. The precise category list, pairwise frequencies, and distances appear below. |
| |
| { |
| ""number_of_categories"": 5, |
| ""cargo_categories"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""dock_slots"": [ |
| ""A"", |
| ""B"", |
| ""C"", |
| ""D"", |
| ""E"" |
| ], |
| ""distance"": [ |
| { |
| ""from_slot_id"": ""A"", |
| ""to_slot_id"": ""B"", |
| ""slot_separation"": 93 |
| }, |
| { |
| ""from_slot_id"": ""A"", |
| ""to_slot_id"": ""C"", |
| ""slot_separation"": 106 |
| }, |
| { |
| ""from_slot_id"": ""A"", |
| ""to_slot_id"": ""D"", |
| ""slot_separation"": 113 |
| }, |
| { |
| ""from_slot_id"": ""A"", |
| ""to_slot_id"": ""E"", |
| ""slot_separation"": 195 |
| }, |
| { |
| ""from_slot_id"": ""B"", |
| ""to_slot_id"": ""A"", |
| ""slot_separation"": 93 |
| }, |
| { |
| ""from_slot_id"": ""B"", |
| ""to_slot_id"": ""C"", |
| ""slot_separation"": 42 |
| }, |
| { |
| ""from_slot_id"": ""B"", |
| ""to_slot_id"": ""D"", |
| ""slot_separation"": 95 |
| }, |
| { |
| ""from_slot_id"": ""B"", |
| ""to_slot_id"": ""E"", |
| ""slot_separation"": 107 |
| }, |
| { |
| ""from_slot_id"": ""C"", |
| ""to_slot_id"": ""A"", |
| ""slot_separation"": 106 |
| }, |
| { |
| ""from_slot_id"": ""C"", |
| ""to_slot_id"": ""B"", |
| ""slot_separation"": 42 |
| }, |
| { |
| ""from_slot_id"": ""C"", |
| ""to_slot_id"": ""D"", |
| ""slot_separation"": 59 |
| }, |
| { |
| ""from_slot_id"": ""C"", |
| ""to_slot_id"": ""E"", |
| ""slot_separation"": 91 |
| }, |
| { |
| ""from_slot_id"": ""D"", |
| ""to_slot_id"": ""A"", |
| ""slot_separation"": 113 |
| }, |
| { |
| ""from_slot_id"": ""D"", |
| ""to_slot_id"": ""B"", |
| ""slot_separation"": 95 |
| }, |
| { |
| ""from_slot_id"": ""D"", |
| ""to_slot_id"": ""C"", |
| ""slot_separation"": 59 |
| }, |
| { |
| ""from_slot_id"": ""D"", |
| ""to_slot_id"": ""E"", |
| ""slot_separation"": 129 |
| }, |
| { |
| ""from_slot_id"": ""E"", |
| ""to_slot_id"": ""A"", |
| ""slot_separation"": 195 |
| }, |
| { |
| ""from_slot_id"": ""E"", |
| ""to_slot_id"": ""B"", |
| ""slot_separation"": 107 |
| }, |
| { |
| ""from_slot_id"": ""E"", |
| ""to_slot_id"": ""C"", |
| ""slot_separation"": 91 |
| }, |
| { |
| ""from_slot_id"": ""E"", |
| ""to_slot_id"": ""D"", |
| ""slot_separation"": 129 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F2"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F3"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F4"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F5"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F1"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F3"", |
| ""co_load_frequency"": 456 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F4"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F5"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F1"", |
| ""co_load_frequency"": 93 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F2"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F4"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F5"", |
| ""co_load_frequency"": 759 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F1"", |
| ""co_load_frequency"": 30 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F2"", |
| ""co_load_frequency"": 5399 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F3"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F5"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F1"", |
| ""co_load_frequency"": 0 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F2"", |
| ""co_load_frequency"": 525 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F3"", |
| ""co_load_frequency"": 1 |
| }, |
| { |
| ""from_category_id"": ""F5"", |
| ""to_category_id"": ""F4"", |
| ""co_load_frequency"": 0 |
| } |
| ] |
| } |
| |
| Also, when you send back the arrangement, please follow this simple JSON layout so it's easy to read by the team β nothing fancy, just a single list that says which slot goes with which category. |
|
|
| { |
| ""solution"": [ |
| <slot_id_for_first_category>, |
| <slot_id_for_second_category>, |
| ..., |
| <slot_id_for_last_category> |
| ] |
| } |
|
|
| Here the ""solution"" array is just an ordered checklist: the first entry is the slot assigned to the first cargo category, the second entry is the slot for the second category, and so on down the line. Think of it like filling out a form β one slot per category in order. |
|
|
| This JSON block is only a sketch of the expected shape, not the actual answer β replace the placeholders with the exact identifiers from the instance. |
|
|
| Please be careful to use the identifiers exactly as they appear in the input β no renaming and no new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 93, 106, 113, 195], [93, 0, 42, 95, 107], [106, 42, 0, 59, 91], [113, 95, 59, 0, 129], [195, 107, 91, 129, 0]], 'flow_matrix': [[0, 0, 0, 0, 0], [0, 0, 456, 0, 0], [93, 0, 0, 0, 759], [30, 5399, 0, 0, 0], [0, 525, 1, 0, 0]], 'objective': 410399.0}","[4, 2, 3, 1, 0]",410399.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': ['A', 'B', 'C', 'D', 'E'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 93}, {'from_id': 'A', 'to_id': 'C', 'distance': 106}, {'from_id': 'A', 'to_id': 'D', 'distance': 113}, {'from_id': 'A', 'to_id': 'E', 'distance': 195}, {'from_id': 'B', 'to_id': 'A', 'distance': 93}, {'from_id': 'B', 'to_id': 'C', 'distance': 42}, {'from_id': 'B', 'to_id': 'D', 'distance': 95}, {'from_id': 'B', 'to_id': 'E', 'distance': 107}, {'from_id': 'C', 'to_id': 'A', 'distance': 106}, {'from_id': 'C', 'to_id': 'B', 'distance': 42}, {'from_id': 'C', 'to_id': 'D', 'distance': 59}, {'from_id': 'C', 'to_id': 'E', 'distance': 91}, {'from_id': 'D', 'to_id': 'A', 'distance': 113}, {'from_id': 'D', 'to_id': 'B', 'distance': 95}, {'from_id': 'D', 'to_id': 'C', 'distance': 59}, {'from_id': 'D', 'to_id': 'E', 'distance': 129}, {'from_id': 'E', 'to_id': 'A', 'distance': 195}, {'from_id': 'E', 'to_id': 'B', 'distance': 107}, {'from_id': 'E', 'to_id': 'C', 'distance': 91}, {'from_id': 'E', 'to_id': 'D', 'distance': 129}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 456}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 93}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 759}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 30}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 5399}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 525}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 0}]}","['E', 'C', 'D', 'B', 'A'] |
| QAP,QAP, |
|
|
| # num_groups_and_rooms=5 |
| # class_groups=F1, F2, F3, F4, F5 |
| # classrooms=1, 2, 3, 4, 5 |
|
|
| room_from_id,room_to_id,walking_distance_between_rooms |
| 1,2,2 |
| 1,3,1 |
| 1,4,6 |
| 1,5,10 |
| 2,1,2 |
| 2,3,1 |
| 2,4,4 |
| 2,5,8 |
| 3,1,1 |
| 3,2,1 |
| 3,4,5 |
| 3,5,9 |
| 4,1,6 |
| 4,2,4 |
| 4,3,5 |
| 4,5,4 |
| 5,1,10 |
| 5,2,8 |
| 5,3,9 |
| 5,4,4 |
|
|
| group_from_id,group_to_id,resource_sharing_rate |
| F1,F2,2 |
| F1,F3,4 |
| F1,F4,2 |
| F1,F5,0 |
| F2,F1,2 |
| F2,F3,0 |
| F2,F4,2 |
| F2,F5,0 |
| F3,F1,4 |
| F3,F2,0 |
| F3,F4,0 |
| F3,F5,2 |
| F4,F1,2 |
| F4,F2,2 |
| F4,F3,0 |
| F4,F5,0 |
| F5,F1,0 |
| F5,F2,0 |
| F5,F3,2 |
| F5,F4,0 |
|
|
| Oh, and when you send back the actual room assignment, please use this simple JSON layout so it's clear which group goes to which room: |
| |
| { |
| ""solution"": [ |
| ""<room_id_for_first_group>"", |
| ""<room_id_for_second_group>"", |
| ..., |
| ""<room_id_for_last_group>"" |
| ] |
| } |
| |
| This just means the array lists, in order, the room id chosen for each group β first entry = first group, second = second group, and so on. It's just a sketch of the shape I need, not the real assignment. |
|
|
| Please be careful to use the exact identifiers from the instance input β don't rename them or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 2, 1, 6, 10], [2, 0, 1, 4, 8], [1, 1, 0, 5, 9], [6, 4, 5, 0, 4], [10, 8, 9, 4, 0]], 'flow_matrix': [[0, 2, 4, 2, 0], [2, 0, 0, 2, 0], [4, 0, 0, 0, 2], [2, 2, 0, 0, 0], [0, 0, 2, 0, 0]], 'objective': 64.0}","[1, 2, 3, 0, 4]",64.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 6}, {'from_id': 1, 'to_id': 5, 'distance': 10}, {'from_id': 2, 'to_id': 1, 'distance': 2}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 4, 'distance': 4}, {'from_id': 2, 'to_id': 5, 'distance': 8}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}, {'from_id': 3, 'to_id': 4, 'distance': 5}, {'from_id': 3, 'to_id': 5, 'distance': 9}, {'from_id': 4, 'to_id': 1, 'distance': 6}, {'from_id': 4, 'to_id': 2, 'distance': 4}, {'from_id': 4, 'to_id': 3, 'distance': 5}, {'from_id': 4, 'to_id': 5, 'distance': 4}, {'from_id': 5, 'to_id': 1, 'distance': 10}, {'from_id': 5, 'to_id': 2, 'distance': 8}, {'from_id': 5, 'to_id': 3, 'distance': 9}, {'from_id': 5, 'to_id': 4, 'distance': 4}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 4}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 4}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 0}]}","[2, 3, 4, 1, 5]",28,csv,1 |
| QAP,QAP,"Out on the tarmac the challenge is to park each ground crew in its own apron spot so the teams that exchange the most calls and handoffs sit close by. Itβs simple logistics: one team per zone, and each zone gets exactly one team β no overlaps, no omissions. Evaluate any layout by taking each pair of teams, multiplying how often they need to coordinate by how far apart their zones are, and summing every resulting product; the smaller that total, the better the layout. The detailed figures and distances are listed below. |
| |
| { |
| ""num_teams_and_zones"": 3, |
| ""ground_crew_teams"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""apron_zones"": [ |
| 1, |
| 2, |
| 3 |
| ], |
| ""distance"": [ |
| { |
| ""zone_source_id"": 1, |
| ""zone_target_id"": 2, |
| ""zone_separation_distance"": 0 |
| }, |
| { |
| ""zone_source_id"": 1, |
| ""zone_target_id"": 3, |
| ""zone_separation_distance"": 0 |
| }, |
| { |
| ""zone_source_id"": 2, |
| ""zone_target_id"": 1, |
| ""zone_separation_distance"": 0 |
| }, |
| { |
| ""zone_source_id"": 2, |
| ""zone_target_id"": 3, |
| ""zone_separation_distance"": 465 |
| }, |
| { |
| ""zone_source_id"": 3, |
| ""zone_target_id"": 1, |
| ""zone_separation_distance"": 0 |
| }, |
| { |
| ""zone_source_id"": 3, |
| ""zone_target_id"": 2, |
| ""zone_separation_distance"": 465 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""team_source_id"": ""F1"", |
| ""team_target_id"": ""F2"", |
| ""coordination_frequency"": 5 |
| }, |
| { |
| ""team_source_id"": ""F1"", |
| ""team_target_id"": ""F3"", |
| ""coordination_frequency"": 6 |
| }, |
| { |
| ""team_source_id"": ""F2"", |
| ""team_target_id"": ""F1"", |
| ""coordination_frequency"": 5 |
| }, |
| { |
| ""team_source_id"": ""F2"", |
| ""team_target_id"": ""F3"", |
| ""coordination_frequency"": 1 |
| }, |
| { |
| ""team_source_id"": ""F3"", |
| ""team_target_id"": ""F1"", |
| ""coordination_frequency"": 6 |
| }, |
| { |
| ""team_source_id"": ""F3"", |
| ""team_target_id"": ""F2"", |
| ""coordination_frequency"": 1 |
| } |
| ] |
| } |
| |
| And when you reply with a proposed layout, a neat little JSON snippet like this is easiest for me to read: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of that as a simple form: the array lists the spot (location) for each crew in order β first entry for the first team, second for the second team, and so on. It's just a sketch of the shape I expect, not the actual answer. |
|
|
| Please use the exact identifiers from the instance input β no renaming, no extra labels. Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 0, 0], [0, 0, 465], [0, 465, 0]], 'flow_matrix': [[0, 5, 6], [5, 0, 1], [6, 1, 0]], 'objective': 930.0}","[0, 1, 2]",930.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 0}, {'from_id': 1, 'to_id': 3, 'distance': 0}, {'from_id': 2, 'to_id': 1, 'distance': 0}, {'from_id': 2, 'to_id': 3, 'distance': 465}, {'from_id': 3, 'to_id': 1, 'distance': 0}, {'from_id': 3, 'to_id': 2, 'distance': 465}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 6}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 6}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}]}","[1, 2, 3] |
| QAP,QAP, |
|
|
| { |
| ""number_of_offices_and_buildings"": 3, |
| ""office_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""building_ids"": [ |
| 0, |
| 1, |
| 2 |
| ], |
| ""distance"": [ |
| { |
| ""origin_building_id"": 0, |
| ""destination_building_id"": 1, |
| ""walking_distance_between_buildings"": 1 |
| }, |
| { |
| ""origin_building_id"": 0, |
| ""destination_building_id"": 2, |
| ""walking_distance_between_buildings"": 1 |
| }, |
| { |
| ""origin_building_id"": 1, |
| ""destination_building_id"": 0, |
| ""walking_distance_between_buildings"": 1 |
| }, |
| { |
| ""origin_building_id"": 1, |
| ""destination_building_id"": 2, |
| ""walking_distance_between_buildings"": 1 |
| }, |
| { |
| ""origin_building_id"": 2, |
| ""destination_building_id"": 0, |
| ""walking_distance_between_buildings"": 1 |
| }, |
| { |
| ""origin_building_id"": 2, |
| ""destination_building_id"": 1, |
| ""walking_distance_between_buildings"": 1 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""origin_office_id"": ""F1"", |
| ""destination_office_id"": ""F2"", |
| ""citizen_flow_between_offices"": 31 |
| }, |
| { |
| ""origin_office_id"": ""F1"", |
| ""destination_office_id"": ""F3"", |
| ""citizen_flow_between_offices"": 37 |
| }, |
| { |
| ""origin_office_id"": ""F2"", |
| ""destination_office_id"": ""F1"", |
| ""citizen_flow_between_offices"": 31 |
| }, |
| { |
| ""origin_office_id"": ""F2"", |
| ""destination_office_id"": ""F3"", |
| ""citizen_flow_between_offices"": 21 |
| }, |
| { |
| ""origin_office_id"": ""F3"", |
| ""destination_office_id"": ""F1"", |
| ""citizen_flow_between_offices"": 37 |
| }, |
| { |
| ""origin_office_id"": ""F3"", |
| ""destination_office_id"": ""F2"", |
| ""citizen_flow_between_offices"": 21 |
| } |
| ] |
| } |
|
|
| If you want to send a plan back, it's handy to use a small JSON snippet like this so everything lines up cleanly with the instance format: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of that list as a simple form: the first entry is the building chosen for the first office, the second entry is the building for the second office, and so on down the list. This JSON is just a sketch of the expected shape β not the actual answer itself. |
| |
| Also, please make sure to use the exact identifiers that appear in the instance input β do not rename them or invent new labels. For example: Valid identifiers look like plain numbers such as ""1"" or ""23"", single capital letters like ""A"" or ""B"", or a capital letter followed by digits like ""A1"" or ""X7"".","{'distance_matrix': [[0, 1, 1], [1, 0, 1], [1, 1, 0]], 'flow_matrix': [[0, 31, 37], [31, 0, 21], [37, 21, 0]], 'objective': 178.0}","[2, 0, 1]",178.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 1}, {'from_id': 0, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 0, 'distance': 1}, {'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 2, 'to_id': 0, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 31}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 37}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 31}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 21}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 37}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 21}]}","[2, 0, 1]",30,json,0 |
| QAP,QAP,"Recently the sysadmin sketched a map where every node must host just one service and each service must pick one node. The trick is to put services that exchange lots of requests close to each other: for each pair you check how many requests flow between them and how long it takes to get from one node to the other, multiply those two to get that pairβs share, and then sum everything up β arrangements with a smaller overall sum are preferable. The detailed list of services, nodes, call volumes, and inter-node times is given below. |
| |
| It lists 5 services and 5 nodes: F1, F2, F3, F4, F5 must be assigned to 0, 1, 2, 3, 4, one service per node. |
| The sysadmin noted the latency from node 0 to node 1 is 0. |
| The sysadmin noted the latency from node 0 to node 2 is 0. |
| The sysadmin noted the latency from node 0 to node 3 is 0. |
| The sysadmin noted the latency from node 0 to node 4 is 0. |
| The sysadmin noted the latency from node 1 to node 0 is 0. |
| The sysadmin noted the latency from node 1 to node 2 is 0. |
| The sysadmin noted the latency from node 1 to node 3 is 0. |
| The sysadmin noted the latency from node 1 to node 4 is 0. |
| The sysadmin noted the latency from node 2 to node 0 is 0. |
| The sysadmin noted the latency from node 2 to node 1 is 0. |
| The sysadmin noted the latency from node 2 to node 3 is 20. |
| The sysadmin noted the latency from node 2 to node 4 is 0. |
| The sysadmin noted the latency from node 3 to node 0 is 0. |
| The sysadmin noted the latency from node 3 to node 1 is 0. |
| The sysadmin noted the latency from node 3 to node 2 is 20. |
| The sysadmin noted the latency from node 3 to node 4 is 0. |
| The sysadmin noted the latency from node 4 to node 0 is 0. |
| The sysadmin noted the latency from node 4 to node 1 is 0. |
| The sysadmin noted the latency from node 4 to node 2 is 0. |
| The sysadmin noted the latency from node 4 to node 3 is 0. |
| The sysadmin noted that service F1 calls service F2 with 1 requests. |
| The sysadmin noted that service F1 calls service F3 with 2 requests. |
| The sysadmin noted that service F1 calls service F4 with 2 requests. |
| The sysadmin noted that service F1 calls service F5 with 4 requests. |
| The sysadmin noted that service F2 calls service F1 with 1 requests. |
| The sysadmin noted that service F2 calls service F3 with 1 requests. |
| The sysadmin noted that service F2 calls service F4 with 3 requests. |
| The sysadmin noted that service F2 calls service F5 with 5 requests. |
| The sysadmin noted that service F3 calls service F1 with 2 requests. |
| The sysadmin noted that service F3 calls service F2 with 1 requests. |
| The sysadmin noted that service F3 calls service F4 with 2 requests. |
| The sysadmin noted that service F3 calls service F5 with 4 requests. |
| The sysadmin noted that service F4 calls service F1 with 2 requests. |
| The sysadmin noted that service F4 calls service F2 with 3 requests. |
| The sysadmin noted that service F4 calls service F3 with 2 requests. |
| The sysadmin noted that service F4 calls service F5 with 2 requests. |
| The sysadmin noted that service F5 calls service F1 with 4 requests. |
| The sysadmin noted that service F5 calls service F2 with 5 requests. |
| The sysadmin noted that service F5 calls service F3 with 4 requests. |
| The sysadmin noted that service F5 calls service F4 with 2 requests. |
| Use these lists to choose assignments of the F1, F2, F3, F4, F5 onto the 0, 1, 2, 3, 4 that minimize the summed products of call volumes and node latencies. |
| |
| Oh, and when you send back your chosen assignment, just drop it in a tiny JSON snippet like this so it's easy to parse: |
|
|
| { |
| ""solution"": [ |
| <node_id_for_first_service>, |
| <node_id_for_second_service>, |
| ..., |
| <node_id_for_last_service> |
| ] |
| } |
|
|
| This is just a simple sketch: the ""solution"" array should list, in order, which node each service gets β the first entry is the node for the first service, the second entry for the second service, and so on. Replace each placeholder with the actual node identifier from the instance when you answer; the block above is just showing the expected shape, not the real assignment. |
|
|
| Please use the identifiers exactly as they appear in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as ""1"" or ""23"", single capital letters like ""A"" or ""B"", or a capital letter followed by digits like ""A1"" or ""X7"".""","{'distance_matrix': [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 20, 0], [0, 0, 20, 0, 0], [0, 0, 0, 0, 0]], 'flow_matrix': [[0, 1, 2, 2, 4], [1, 0, 1, 3, 5], [2, 1, 0, 2, 4], [2, 3, 2, 0, 2], [4, 5, 4, 2, 0]], 'objective': 40.0}","[2, 3, 1, 4, 0]",40.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [0, 1, 2, 3, 4], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 0}, {'from_id': 0, 'to_id': 2, 'distance': 0}, {'from_id': 0, 'to_id': 3, 'distance': 0}, {'from_id': 0, 'to_id': 4, 'distance': 0}, {'from_id': 1, 'to_id': 0, 'distance': 0}, {'from_id': 1, 'to_id': 2, 'distance': 0}, {'from_id': 1, 'to_id': 3, 'distance': 0}, {'from_id': 1, 'to_id': 4, 'distance': 0}, {'from_id': 2, 'to_id': 0, 'distance': 0}, {'from_id': 2, 'to_id': 1, 'distance': 0}, {'from_id': 2, 'to_id': 3, 'distance': 20}, {'from_id': 2, 'to_id': 4, 'distance': 0}, {'from_id': 3, 'to_id': 0, 'distance': 0}, {'from_id': 3, 'to_id': 1, 'distance': 0}, {'from_id': 3, 'to_id': 2, 'distance': 20}, {'from_id': 3, 'to_id': 4, 'distance': 0}, {'from_id': 4, 'to_id': 0, 'distance': 0}, {'from_id': 4, 'to_id': 1, 'distance': 0}, {'from_id': 4, 'to_id': 2, 'distance': 0}, {'from_id': 4, 'to_id': 3, 'distance': 0}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 4}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 3}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 4}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 2}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 4}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 4}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 2}]}","[2, 3, 1, 4, 0] |
| QAP,QAP, |
|
|
| I'll list the 3 vendors and stalls now: vendors F1, F2, F3 and stalls 0, 1, 2. |
| I measure the walking distance from stall 0 to stall 1 as 11. |
| I measure the walking distance from stall 0 to stall 2 as 8. |
| I measure the walking distance from stall 1 to stall 0 as 11. |
| I measure the walking distance from stall 1 to stall 2 as 11. |
| I measure the walking distance from stall 2 to stall 0 as 8. |
| I measure the walking distance from stall 2 to stall 1 as 11. |
| I note that vendor F1 and vendor F2 share 210 customers. |
| I note that vendor F1 and vendor F3 share 19 customers. |
| I note that vendor F2 and vendor F1 share 210 customers. |
| I note that vendor F2 and vendor F3 share 0 customers. |
| I note that vendor F3 and vendor F1 share 19 customers. |
| I note that vendor F3 and vendor F2 share 0 customers. |
| I'll use these entries with the rule above to score each layout. |
|
|
| If you want to hand me a proposed layout, just drop it in this simple JSON shape so I can read it easily: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| Think of that as a short form: ""solution"" is a list where the first entry is the stall youβd put the first vendor in, the second entry is the stall for the second vendor, and so on down the line. Itβs just a sketch of the expected shape β not the final answer itself. |
|
|
| Please make sure to use the exact stall/vendor identifiers from the instance input β donβt rename them or invent new ones. |
| For example: Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 11, 8], [11, 0, 11], [8, 11, 0]], 'flow_matrix': [[0, 210, 19], [210, 0, 0], [19, 0, 0]], 'objective': 3778.0}","[2, 0, 1]",3778.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 11}, {'from_id': 0, 'to_id': 2, 'distance': 8}, {'from_id': 1, 'to_id': 0, 'distance': 11}, {'from_id': 1, 'to_id': 2, 'distance': 11}, {'from_id': 2, 'to_id': 0, 'distance': 8}, {'from_id': 2, 'to_id': 1, 'distance': 11}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 210}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 19}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 210}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 19}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 0}]}","[2, 0, 1] |
| QAP,QAP, |
|
|
| { |
| ""num_machine_types"": 4, |
| ""machine_types"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"" |
| ], |
| ""production_cells"": [ |
| ""A"", |
| ""B"", |
| ""C"", |
| ""D"" |
| ], |
| ""distance"": [ |
| { |
| ""cell_from"": ""A"", |
| ""cell_to"": ""B"", |
| ""cell_distance"": 1037 |
| }, |
| { |
| ""cell_from"": ""A"", |
| ""cell_to"": ""C"", |
| ""cell_distance"": 517 |
| }, |
| { |
| ""cell_from"": ""A"", |
| ""cell_to"": ""D"", |
| ""cell_distance"": 896 |
| }, |
| { |
| ""cell_from"": ""B"", |
| ""cell_to"": ""A"", |
| ""cell_distance"": 1037 |
| }, |
| { |
| ""cell_from"": ""B"", |
| ""cell_to"": ""C"", |
| ""cell_distance"": 521 |
| }, |
| { |
| ""cell_from"": ""B"", |
| ""cell_to"": ""D"", |
| ""cell_distance"": 142 |
| }, |
| { |
| ""cell_from"": ""C"", |
| ""cell_to"": ""A"", |
| ""cell_distance"": 517 |
| }, |
| { |
| ""cell_from"": ""C"", |
| ""cell_to"": ""B"", |
| ""cell_distance"": 521 |
| }, |
| { |
| ""cell_from"": ""C"", |
| ""cell_to"": ""D"", |
| ""cell_distance"": 383 |
| }, |
| { |
| ""cell_from"": ""D"", |
| ""cell_to"": ""A"", |
| ""cell_distance"": 896 |
| }, |
| { |
| ""cell_from"": ""D"", |
| ""cell_to"": ""B"", |
| ""cell_distance"": 142 |
| }, |
| { |
| ""cell_from"": ""D"", |
| ""cell_to"": ""C"", |
| ""cell_distance"": 383 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""machine_from"": ""F1"", |
| ""machine_to"": ""F2"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F1"", |
| ""machine_to"": ""F3"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F1"", |
| ""machine_to"": ""F4"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F2"", |
| ""machine_to"": ""F1"", |
| ""parts_flow"": 584 |
| }, |
| { |
| ""machine_from"": ""F2"", |
| ""machine_to"": ""F3"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F2"", |
| ""machine_to"": ""F4"", |
| ""parts_flow"": 4960 |
| }, |
| { |
| ""machine_from"": ""F3"", |
| ""machine_to"": ""F1"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F3"", |
| ""machine_to"": ""F2"", |
| ""parts_flow"": 5614 |
| }, |
| { |
| ""machine_from"": ""F3"", |
| ""machine_to"": ""F4"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F4"", |
| ""machine_to"": ""F1"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F4"", |
| ""machine_to"": ""F2"", |
| ""parts_flow"": 0 |
| }, |
| { |
| ""machine_from"": ""F4"", |
| ""machine_to"": ""F3"", |
| ""parts_flow"": 0 |
| } |
| ] |
| } |
|
|
| If you want to hand me a proposed layout, a small JSON snippet like this is an easy, predictable way to send it over: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| This just means: ""solution"" is a list in order β the first entry is the cell (location) you assign to the first machine type, the second entry is where the second machine type goes, and so on. Think of it as a simple checklist of which location each machine ends up in. |
|
|
| This JSON is only a sketch of the shape I expect, not the actual answer. Please use the exact identifiers from the instance input β no renaming and no inventing new labels. |
| Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 1037, 517, 896], [1037, 0, 521, 142], [517, 521, 0, 383], [896, 142, 383, 0]], 'flow_matrix': [[0, 0, 0, 0], [584, 0, 0, 4960], [0, 5614, 0, 0], [0, 0, 0, 0]], 'objective': 3220132.0}","[0, 3, 1, 2]",3220132.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': ['A', 'B', 'C', 'D'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 1037}, {'from_id': 'A', 'to_id': 'C', 'distance': 517}, {'from_id': 'A', 'to_id': 'D', 'distance': 896}, {'from_id': 'B', 'to_id': 'A', 'distance': 1037}, {'from_id': 'B', 'to_id': 'C', 'distance': 521}, {'from_id': 'B', 'to_id': 'D', 'distance': 142}, {'from_id': 'C', 'to_id': 'A', 'distance': 517}, {'from_id': 'C', 'to_id': 'B', 'distance': 521}, {'from_id': 'C', 'to_id': 'D', 'distance': 383}, {'from_id': 'D', 'to_id': 'A', 'distance': 896}, {'from_id': 'D', 'to_id': 'B', 'distance': 142}, {'from_id': 'D', 'to_id': 'C', 'distance': 383}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 584}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 4960}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 5614}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}]}","['A', 'D', 'B', 'C'] |
| QAP,QAP, |
|
|
| # num_groups_and_venues=4 |
| # group_ids=F1, F2, F3, F4 |
| # venue_ids=1, 2, 3, 4 |
|
|
| from_venue_id,to_venue_id,venue_separation_distance |
| 1,2,0 |
| 1,3,331 |
| 1,4,318 |
| 2,1,0 |
| 2,3,331 |
| 2,4,318 |
| 3,1,331 |
| 3,2,331 |
| 3,4,20 |
| 4,1,318 |
| 4,2,318 |
| 4,3,20 |
|
|
| from_group_id,to_group_id,equipment_swap_frequency |
| F1,F2,0 |
| F1,F3,246 |
| F1,F4,55342 |
| F2,F1,1 |
| F2,F3,58098 |
| F2,F4,6273 |
| F3,F1,948 |
| F3,F2,14543 |
| F3,F4,3720 |
| F4,F1,0 |
| F4,F2,0 |
| F4,F3,3516 |
|
|
| Also, when you send back your chosen layout, just stick to this simple JSON shape so it's easy to read and check: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| ""solution"" is just a list: the first entry is the venue ID for the first entertainment group, the second entry is the venue for the second group, and so on. Think of it like filling out a lineup form β one spot per group, in order. This JSON is just the expected shape, not the actual assignment. |
| |
| Please use the exact identifiers from the instance input β don't rename them or introduce new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 0, 331, 318], [0, 0, 331, 318], [331, 331, 0, 20], [318, 318, 20, 0]], 'flow_matrix': [[0, 0, 246, 55342], [1, 0, 58098, 6273], [948, 14543, 0, 3720], [0, 0, 3516, 0]], 'objective': 5798247.0}","[2, 0, 1, 3]",5798247.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 0}, {'from_id': 1, 'to_id': 3, 'distance': 331}, {'from_id': 1, 'to_id': 4, 'distance': 318}, {'from_id': 2, 'to_id': 1, 'distance': 0}, {'from_id': 2, 'to_id': 3, 'distance': 331}, {'from_id': 2, 'to_id': 4, 'distance': 318}, {'from_id': 3, 'to_id': 1, 'distance': 331}, {'from_id': 3, 'to_id': 2, 'distance': 331}, {'from_id': 3, 'to_id': 4, 'distance': 20}, {'from_id': 4, 'to_id': 1, 'distance': 318}, {'from_id': 4, 'to_id': 2, 'distance': 318}, {'from_id': 4, 'to_id': 3, 'distance': 20}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 246}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 55342}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 58098}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 6273}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 948}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 14543}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 3720}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 3516}]}","[3, 1, 2, 4] |
| QAP,QAP, |
|
|
| Below are the concrete details for 3 delivery hubs and 3 fixed slots, listed as F1, F2, F3 (hubs) and 1, 2, 3 (slots). |
| The distance from slot 1 to slot 2 is 44. |
| The distance from slot 1 to slot 3 is 51. |
| The distance from slot 2 to slot 1 is 44. |
| The distance from slot 2 to slot 3 is 98. |
| The distance from slot 3 to slot 1 is 51. |
| The distance from slot 3 to slot 2 is 98. |
| Hub F1 sends 79 parcels to hub F2. |
| Hub F1 sends 62 parcels to hub F3. |
| Hub F2 sends 79 parcels to hub F1. |
| Hub F2 sends 25 parcels to hub F3. |
| Hub F3 sends 62 parcels to hub F1. |
| Hub F3 sends 25 parcels to hub F2. |
| These entries let you compute the total sum of parcel flows times slot separations to evaluate the layout for the 3 hubs. |
|
|
| When you give me the final layout, just hand it over in a tiny JSON object like this so I can read it programmatically: |
|
|
| { |
| ""solution"": [ |
| <slot_id_for_first_hub>, |
| <slot_id_for_second_hub>, |
| ..., |
| <slot_id_for_last_hub> |
| ] |
| } |
|
|
| Think of that ""solution"" list as a simple roll call: the first entry is the slot you want the first hub to occupy, the second entry is the slot for the second hub, and so on down the line. It's just a sketch of the shape I expect, not the actual arrangement β you'll replace those placeholders with the real slot labels from the instance. |
|
|
| Please make sure to use the exact identifiers from the instance input, without renaming or inventing new labels. |
| Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 44, 51], [44, 0, 98], [51, 98, 0]], 'flow_matrix': [[0, 79, 62], [79, 0, 25], [62, 25, 0]], 'objective': 18176.0}","[0, 1, 2]",18176.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 44}, {'from_id': 1, 'to_id': 3, 'distance': 51}, {'from_id': 2, 'to_id': 1, 'distance': 44}, {'from_id': 2, 'to_id': 3, 'distance': 98}, {'from_id': 3, 'to_id': 1, 'distance': 51}, {'from_id': 3, 'to_id': 2, 'distance': 98}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 79}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 62}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 79}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 25}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 62}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 25}]}","[1, 2, 3] |
| QAP,QAP, |
|
|
| { |
| ""number_of_services"": 3, |
| ""service_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""building_ids"": [ |
| ""A"", |
| ""B"", |
| ""C"" |
| ], |
| ""distance"": [ |
| { |
| ""building_from_id"": ""A"", |
| ""building_to_id"": ""B"", |
| ""walking_distance"": 4 |
| }, |
| { |
| ""building_from_id"": ""A"", |
| ""building_to_id"": ""C"", |
| ""walking_distance"": 0 |
| }, |
| { |
| ""building_from_id"": ""B"", |
| ""building_to_id"": ""A"", |
| ""walking_distance"": 4 |
| }, |
| { |
| ""building_from_id"": ""B"", |
| ""building_to_id"": ""C"", |
| ""walking_distance"": 0 |
| }, |
| { |
| ""building_from_id"": ""C"", |
| ""building_to_id"": ""A"", |
| ""walking_distance"": 0 |
| }, |
| { |
| ""building_from_id"": ""C"", |
| ""building_to_id"": ""B"", |
| ""walking_distance"": 0 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""service_from_id"": ""F1"", |
| ""service_to_id"": ""F2"", |
| ""referral_count"": 50 |
| }, |
| { |
| ""service_from_id"": ""F1"", |
| ""service_to_id"": ""F3"", |
| ""referral_count"": 165 |
| }, |
| { |
| ""service_from_id"": ""F2"", |
| ""service_to_id"": ""F1"", |
| ""referral_count"": 50 |
| }, |
| { |
| ""service_from_id"": ""F2"", |
| ""service_to_id"": ""F3"", |
| ""referral_count"": 115 |
| }, |
| { |
| ""service_from_id"": ""F3"", |
| ""service_to_id"": ""F1"", |
| ""referral_count"": 165 |
| }, |
| { |
| ""service_from_id"": ""F3"", |
| ""service_to_id"": ""F2"", |
| ""referral_count"": 115 |
| } |
| ] |
| } |
|
|
| Also, when you send back a plan, please use this simple JSON layout so it's easy to parse: |
| |
| { |
| ""solution"": [ |
| <building_id_for_first_service>, |
| <building_id_for_second_service>, |
| ..., |
| <building_id_for_last_service> |
| ] |
| } |
| |
| This just means ""solution"" is a list that, in order, says which building each service goes to β first service β first entry, second service β second entry, and so on. Think of it like filling out a form: one building label per service, in the same service order as the instance. |
| |
| This is only a sketch of the expected shape, not the actual answer. Please use the exact identifiers from the instance input β do not rename them or invent new labels. |
| |
| Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.","{'distance_matrix': [[0, 4, 0], [4, 0, 0], [0, 0, 0]], 'flow_matrix': [[0, 50, 165], [50, 0, 115], [165, 115, 0]], 'objective': 400.0}","[0, 1, 2]",400.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 4}, {'from_id': 'A', 'to_id': 'C', 'distance': 0}, {'from_id': 'B', 'to_id': 'A', 'distance': 4}, {'from_id': 'B', 'to_id': 'C', 'distance': 0}, {'from_id': 'C', 'to_id': 'A', 'distance': 0}, {'from_id': 'C', 'to_id': 'B', 'distance': 0}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 50}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 165}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 50}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 115}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 165}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 115}]}","['A', 'B', 'C']",36,json,names |
| QAP,QAP,"Someone at the production office needs to line up departments with stages in a way that cuts down on prop hauling β put the teams that share props most often near each other. Every department must go to exactly one stage, and every stage must receive exactly one department, so everythingβs matched up one-to-one. For any given matching, add up, over all pairs of departments, the product of how often they move props and how far apart their stages are; the smaller that grand total, the better the plan. The numbers and map that describe the real case are shown below. |
| |
| { |
| ""num_departments_and_stages"": 4, |
| ""departments"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"" |
| ], |
| ""stages"": [ |
| 1, |
| 2, |
| 3, |
| 4 |
| ], |
| ""distance"": [ |
| { |
| ""from_stage_id"": 1, |
| ""to_stage_id"": 2, |
| ""stage_distance"": 3 |
| }, |
| { |
| ""from_stage_id"": 1, |
| ""to_stage_id"": 3, |
| ""stage_distance"": 1 |
| }, |
| { |
| ""from_stage_id"": 1, |
| ""to_stage_id"": 4, |
| ""stage_distance"": 5 |
| }, |
| { |
| ""from_stage_id"": 2, |
| ""to_stage_id"": 1, |
| ""stage_distance"": 3 |
| }, |
| { |
| ""from_stage_id"": 2, |
| ""to_stage_id"": 3, |
| ""stage_distance"": 4 |
| }, |
| { |
| ""from_stage_id"": 2, |
| ""to_stage_id"": 4, |
| ""stage_distance"": 2 |
| }, |
| { |
| ""from_stage_id"": 3, |
| ""to_stage_id"": 1, |
| ""stage_distance"": 1 |
| }, |
| { |
| ""from_stage_id"": 3, |
| ""to_stage_id"": 2, |
| ""stage_distance"": 4 |
| }, |
| { |
| ""from_stage_id"": 3, |
| ""to_stage_id"": 4, |
| ""stage_distance"": 6 |
| }, |
| { |
| ""from_stage_id"": 4, |
| ""to_stage_id"": 1, |
| ""stage_distance"": 5 |
| }, |
| { |
| ""from_stage_id"": 4, |
| ""to_stage_id"": 2, |
| ""stage_distance"": 2 |
| }, |
| { |
| ""from_stage_id"": 4, |
| ""to_stage_id"": 3, |
| ""stage_distance"": 6 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_department_id"": ""F1"", |
| ""to_department_id"": ""F2"", |
| ""prop_transfer_frequency"": 4 |
| }, |
| { |
| ""from_department_id"": ""F1"", |
| ""to_department_id"": ""F3"", |
| ""prop_transfer_frequency"": 2 |
| }, |
| { |
| ""from_department_id"": ""F1"", |
| ""to_department_id"": ""F4"", |
| ""prop_transfer_frequency"": 2 |
| }, |
| { |
| ""from_department_id"": ""F2"", |
| ""to_department_id"": ""F1"", |
| ""prop_transfer_frequency"": 4 |
| }, |
| { |
| ""from_department_id"": ""F2"", |
| ""to_department_id"": ""F3"", |
| ""prop_transfer_frequency"": 1 |
| }, |
| { |
| ""from_department_id"": ""F2"", |
| ""to_department_id"": ""F4"", |
| ""prop_transfer_frequency"": 9 |
| }, |
| { |
| ""from_department_id"": ""F3"", |
| ""to_department_id"": ""F1"", |
| ""prop_transfer_frequency"": 2 |
| }, |
| { |
| ""from_department_id"": ""F3"", |
| ""to_department_id"": ""F2"", |
| ""prop_transfer_frequency"": 1 |
| }, |
| { |
| ""from_department_id"": ""F3"", |
| ""to_department_id"": ""F4"", |
| ""prop_transfer_frequency"": 4 |
| }, |
| { |
| ""from_department_id"": ""F4"", |
| ""to_department_id"": ""F1"", |
| ""prop_transfer_frequency"": 2 |
| }, |
| { |
| ""from_department_id"": ""F4"", |
| ""to_department_id"": ""F2"", |
| ""prop_transfer_frequency"": 9 |
| }, |
| { |
| ""from_department_id"": ""F4"", |
| ""to_department_id"": ""F3"", |
| ""prop_transfer_frequency"": 4 |
| } |
| ] |
| } |
| |
| Also, when you reply with the matching plan, please use this simple JSON layout so it's easy to parse: |
|
|
| { |
| ""solution"": [ |
| <stage_id_for_first_department>, |
| <stage_id_for_second_department>, |
| ..., |
| <stage_id_for_last_department> |
| ] |
| } |
|
|
| This little block means: ""solution"" is an ordered list where the first entry is the stage assigned to the first department, the second entry is the stage for the second department, and so on. Think of the placeholders as blanks on a form β fill them in with the actual stage identifiers from the instance. |
|
|
| This JSON is only a sketch of the shape I expect, not the final answer itself. Please make sure to use the exact identifiers given in the instance input β do not rename them or invent new labels. Valid identifiers look like plain numbers such as ""1"" or ""23"", single capital letters like ""A"" or ""B"", or a capital letter followed by digits like ""A1"" or ""X7"".","{'distance_matrix': [[0, 3, 1, 5], [3, 0, 4, 2], [1, 4, 0, 6], [5, 2, 6, 0]], 'flow_matrix': [[0, 4, 2, 2], [4, 0, 1, 9], [2, 1, 0, 4], [2, 9, 4, 0]], 'objective': 122.0}","[1, 2, 3, 0]",122.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 3}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 5}, {'from_id': 2, 'to_id': 1, 'distance': 3}, {'from_id': 2, 'to_id': 3, 'distance': 4}, {'from_id': 2, 'to_id': 4, 'distance': 2}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 4}, {'from_id': 3, 'to_id': 4, 'distance': 6}, {'from_id': 4, 'to_id': 1, 'distance': 5}, {'from_id': 4, 'to_id': 2, 'distance': 2}, {'from_id': 4, 'to_id': 3, 'distance': 6}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 4}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 4}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 9}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 4}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 9}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 4}]}","[2, 3, 4, 1] |
| QAP,QAP, |
|
|
| { |
| ""num_categories"": 4, |
| ""inventory_categories"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"" |
| ], |
| ""pallet_positions"": [ |
| 0, |
| 1, |
| 2, |
| 3 |
| ], |
| ""distance"": [ |
| { |
| ""from_position_id"": 0, |
| ""to_position_id"": 1, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 0, |
| ""to_position_id"": 2, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 0, |
| ""to_position_id"": 3, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 1, |
| ""to_position_id"": 0, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 1, |
| ""to_position_id"": 2, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_position_id"": 1, |
| ""to_position_id"": 3, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_position_id"": 2, |
| ""to_position_id"": 0, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 2, |
| ""to_position_id"": 1, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_position_id"": 2, |
| ""to_position_id"": 3, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_position_id"": 3, |
| ""to_position_id"": 0, |
| ""travel_distance"": 0 |
| }, |
| { |
| ""from_position_id"": 3, |
| ""to_position_id"": 1, |
| ""travel_distance"": 2 |
| }, |
| { |
| ""from_position_id"": 3, |
| ""to_position_id"": 2, |
| ""travel_distance"": 2 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F2"", |
| ""co_movement_volume"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F3"", |
| ""co_movement_volume"": 0 |
| }, |
| { |
| ""from_category_id"": ""F1"", |
| ""to_category_id"": ""F4"", |
| ""co_movement_volume"": 1 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F1"", |
| ""co_movement_volume"": 0 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F3"", |
| ""co_movement_volume"": 1 |
| }, |
| { |
| ""from_category_id"": ""F2"", |
| ""to_category_id"": ""F4"", |
| ""co_movement_volume"": 2 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F1"", |
| ""co_movement_volume"": 0 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F2"", |
| ""co_movement_volume"": 1 |
| }, |
| { |
| ""from_category_id"": ""F3"", |
| ""to_category_id"": ""F4"", |
| ""co_movement_volume"": 0 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F1"", |
| ""co_movement_volume"": 1 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F2"", |
| ""co_movement_volume"": 2 |
| }, |
| { |
| ""from_category_id"": ""F4"", |
| ""to_category_id"": ""F3"", |
| ""co_movement_volume"": 0 |
| } |
| ] |
| } |
|
|
| When you're ready to send back a layout, just pop it into a tiny JSON shape like this so I can read it straight away. |
| |
| { |
| ""solution"": [ |
| ""<slot_id_for_first_category>"", |
| ""<slot_id_for_second_category>"", |
| ..., |
| ""<slot_id_for_last_category>"" |
| ] |
| } |
| |
| This is just a sketch of the shape I expect: the ""solution"" list gives, in order, the pallet slot (location) you assign to each inventory category (first entry β first category, second β second, and so on). Keep it simpleβone slot per category, one category per slot. |
| |
| One important note: use the identifiers exactly as they appear in the instance input β donβt rename or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β."" |
| |
| The JSON above is the format I want, not the final assignment itself.","{'distance_matrix': [[0, 0, 0, 0], [0, 0, 2, 2], [0, 2, 0, 2], [0, 2, 2, 0]], 'flow_matrix': [[0, 0, 0, 1], [0, 0, 1, 2], [0, 1, 0, 0], [1, 2, 0, 0]], 'objective': 4.0}","[2, 0, 1, 3]",4.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 0}, {'from_id': 0, 'to_id': 2, 'distance': 0}, {'from_id': 0, 'to_id': 3, 'distance': 0}, {'from_id': 1, 'to_id': 0, 'distance': 0}, {'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 2}, {'from_id': 2, 'to_id': 0, 'distance': 0}, {'from_id': 2, 'to_id': 1, 'distance': 2}, {'from_id': 2, 'to_id': 3, 'distance': 2}, {'from_id': 3, 'to_id': 0, 'distance': 0}, {'from_id': 3, 'to_id': 1, 'distance': 2}, {'from_id': 3, 'to_id': 2, 'distance': 2}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 2}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}]}","[2, 0, 1, 3]",38,json,0 |
| QAP,QAP,"Many people are involved in deciding which team goes where, but the rule is clear: each department gets its own office and every office gets one department. To judge any arrangement, take every pair of departments, multiply their interaction level by the distance between their offices, add up all those products, and favor the arrangement with the lowest total. The exact layout and interaction data are provided below. |
| |
| There are 3 departments and offices; the departments are F1, F2, F3 and the offices are 0, 1, 2. |
| |
| | from_office_id | to_office_id | distance_between_offices | |
| |---|---|---| |
| | 0 | 1 | 1 | |
| | 0 | 2 | 1 | |
| | 1 | 0 | 1 | |
| | 1 | 2 | 1 | |
| | 2 | 0 | 1 | |
| | 2 | 1 | 1 | |
| |
| | from_department_id | to_department_id | flow_between_departments | |
| |---|---|---| |
| | F1 | F2 | 32 | |
| | F1 | F3 | 39 | |
| | F2 | F1 | 32 | |
| | F2 | F3 | 50 | |
| | F3 | F1 | 39 | |
| | F3 | F2 | 50 | |
| |
| Use these measurements to compute each arrangement's total and favor the assignment with the lowest total. |
|
|
| Oh, and when you reply, please use this simple JSON layout so it's easy for everyone to read: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of ""solution"" as a list form where the first entry is the office/location you give to the first department, the second entry is the office for the second department, and so on. It's just a plain list β nothing fancy β and it helps keep the assignment neat. |
|
|
| This JSON is just a sketch of the shape I expect, not the actual assignment. Please make sure to use the exact identifiers from the instance input β don't rename them or invent new labels. |
| |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1], [1, 0, 1], [1, 1, 0]], 'flow_matrix': [[0, 32, 39], [32, 0, 50], [39, 50, 0]], 'objective': 242.0}","[2, 0, 1]",242.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 1}, {'from_id': 0, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 0, 'distance': 1}, {'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 2, 'to_id': 0, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 32}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 39}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 32}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 50}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 39}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 50}]}","[2, 0, 1]",39,markdown_table,0 |
| QAP,QAP,"Late one afternoon the curator sketched a plan: assign every painting to its own panel and use every panel once β no repeats, no omissions. Knowing which pairs of artworks draw visitors together and how far apart panels sit, the curator evaluates a layout by taking each pairβs togetherness count, multiplying it by the distance between their panels, and summing those results for all pairs; the goal is to keep that total visitor circulation cost as low as possible. The exact artwork roster, panel map, viewing-pair numbers and distances are shown below. |
| |
| { |
| ""num_artworks_panels"": 4, |
| ""artwork_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"" |
| ], |
| ""panel_ids"": [ |
| 0, |
| 1, |
| 2, |
| 3 |
| ], |
| ""distance"": [ |
| { |
| ""panel_source_id"": 0, |
| ""panel_target_id"": 1, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 0, |
| ""panel_target_id"": 2, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 0, |
| ""panel_target_id"": 3, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 1, |
| ""panel_target_id"": 0, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 1, |
| ""panel_target_id"": 2, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 1, |
| ""panel_target_id"": 3, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 2, |
| ""panel_target_id"": 0, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 2, |
| ""panel_target_id"": 1, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 2, |
| ""panel_target_id"": 3, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 3, |
| ""panel_target_id"": 0, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 3, |
| ""panel_target_id"": 1, |
| ""walking_distance_between_panels"": 1 |
| }, |
| { |
| ""panel_source_id"": 3, |
| ""panel_target_id"": 2, |
| ""walking_distance_between_panels"": 1 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""artwork_source_id"": ""F1"", |
| ""artwork_target_id"": ""F2"", |
| ""co_view_count"": 10 |
| }, |
| { |
| ""artwork_source_id"": ""F1"", |
| ""artwork_target_id"": ""F3"", |
| ""co_view_count"": 28 |
| }, |
| { |
| ""artwork_source_id"": ""F1"", |
| ""artwork_target_id"": ""F4"", |
| ""co_view_count"": 19 |
| }, |
| { |
| ""artwork_source_id"": ""F2"", |
| ""artwork_target_id"": ""F1"", |
| ""co_view_count"": 10 |
| }, |
| { |
| ""artwork_source_id"": ""F2"", |
| ""artwork_target_id"": ""F3"", |
| ""co_view_count"": 30 |
| }, |
| { |
| ""artwork_source_id"": ""F2"", |
| ""artwork_target_id"": ""F4"", |
| ""co_view_count"": 17 |
| }, |
| { |
| ""artwork_source_id"": ""F3"", |
| ""artwork_target_id"": ""F1"", |
| ""co_view_count"": 28 |
| }, |
| { |
| ""artwork_source_id"": ""F3"", |
| ""artwork_target_id"": ""F2"", |
| ""co_view_count"": 30 |
| }, |
| { |
| ""artwork_source_id"": ""F3"", |
| ""artwork_target_id"": ""F4"", |
| ""co_view_count"": 18 |
| }, |
| { |
| ""artwork_source_id"": ""F4"", |
| ""artwork_target_id"": ""F1"", |
| ""co_view_count"": 19 |
| }, |
| { |
| ""artwork_source_id"": ""F4"", |
| ""artwork_target_id"": ""F2"", |
| ""co_view_count"": 17 |
| }, |
| { |
| ""artwork_source_id"": ""F4"", |
| ""artwork_target_id"": ""F3"", |
| ""co_view_count"": 18 |
| } |
| ] |
| } |
| |
| If you want to hand me a proposed layout, just drop it in a little JSON snippet like this β nothing fancy, just the list of which panel each painting gets: |
| |
| { |
| ""solution"": [ |
| <panel_id_for_first_painting>, |
| <panel_id_for_second_painting>, |
| ..., |
| <panel_id_for_last_painting> |
| ] |
| } |
| |
| Think of that as a simple form: the array under ""solution"" lists panels in order β the first entry is where the first painting goes, the second entry for the second painting, and so on. This sketch just shows the shape I expect; it's not the actual answer. |
|
|
| Please be sure to use the exact identifiers given in the instance input β don't rename them or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0]], 'flow_matrix': [[0, 10, 28, 19], [10, 0, 30, 17], [28, 30, 0, 18], [19, 17, 18, 0]], 'objective': 244.0}","[3, 1, 2, 0]",244.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 1}, {'from_id': 0, 'to_id': 2, 'distance': 1}, {'from_id': 0, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 0, 'distance': 1}, {'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 0, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 3, 'to_id': 0, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 28}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 19}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 10}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 30}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 17}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 28}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 30}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 18}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 19}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 17}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 18}]}","[3, 1, 2, 0]",40,json,0 |
| QAP,QAP,"Many people on the floor depend on quick handoffs, so the seating plan must put each team into one cluster and make sure no cluster gets two teams or is left empty. A good seating is one that reduces overall interteam lag, measured by going through every two-team pairing, multiplying how often they interact by how far apart their seats would be, and adding all those products together. The full list of call volumes and desk distances follows below. |
| |
| # num_teams_and_clusters=3 |
| # team_ids=F1, F2, F3 |
| # cluster_ids=A, B, C |
| |
| cluster_from_id,cluster_to_id,separation_distance |
| A,B,3 |
| A,C,7 |
| B,A,3 |
| B,C,4 |
| C,A,7 |
| C,B,4 |
| |
| team_from_id,team_to_id,call_volume |
| F1,F2,0 |
| F1,F3,0 |
| F2,F1,0 |
| F2,F3,1 |
| F3,F1,0 |
| F3,F2,1 |
| |
| Also, when you send your seating pick back, just put it in a tiny JSON snippet like this so it's easy to read and plug in: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| This ""solution"" array is just the order of seats: the first entry is the seat assigned to the first team, the second entry is the seat for the second team, and so on. Consider it a simple form β a sketch of the shape I need, not the final seating plan itself. |
|
|
| Please use the exact identifiers shown in the instance input β no renaming, no new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 3, 7], [3, 0, 4], [7, 4, 0]], 'flow_matrix': [[0, 0, 0], [0, 0, 1], [0, 1, 0]], 'objective': 6.0}","[2, 1, 0]",6.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': ['A', 'B', 'C'], 'distance_pairs': [{'from_id': 'A', 'to_id': 'B', 'distance': 3}, {'from_id': 'A', 'to_id': 'C', 'distance': 7}, {'from_id': 'B', 'to_id': 'A', 'distance': 3}, {'from_id': 'B', 'to_id': 'C', 'distance': 4}, {'from_id': 'C', 'to_id': 'A', 'distance': 7}, {'from_id': 'C', 'to_id': 'B', 'distance': 4}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}]}","['C', 'B', 'A'] |
| QAP,QAP, |
|
|
| There are 4 research groups (F1, F2, F3, F4) and the same number of buildings (1, 2, 3, 4). |
|
|
| | from_building_id | to_building_id | building_distance | |
| |---|---|---| |
| | 1 | 2 | 69 | |
| | 1 | 3 | 70 | |
| | 1 | 4 | 3 | |
| | 2 | 1 | 69 | |
| | 2 | 3 | 24 | |
| | 2 | 4 | 92 | |
| | 3 | 1 | 70 | |
| | 3 | 2 | 24 | |
| | 3 | 4 | 26 | |
| | 4 | 1 | 3 | |
| | 4 | 2 | 92 | |
| | 4 | 3 | 26 | |
|
|
| | from_group_id | to_group_id | collaboration_intensity | |
| |---|---|---| |
| | F1 | F2 | 78 | |
| | F1 | F3 | 33 | |
| | F1 | F4 | 9 | |
| | F2 | F1 | 78 | |
| | F2 | F3 | 38 | |
| | F2 | F4 | 48 | |
| | F3 | F1 | 33 | |
| | F3 | F2 | 38 | |
| | F3 | F4 | 80 | |
| | F4 | F1 | 9 | |
| | F4 | F2 | 48 | |
| | F4 | F3 | 80 | |
|
|
| Use these records to compute the total travel burden for any placement; a better placement minimizes that burden. |
|
|
| If you want to send back a placement, just use this simple JSON shape β think of it like a little form that lists which building goes with which group: |
|
|
| { |
| ""solution"": [ |
| <building_id_for_first_group>, |
| <building_id_for_second_group>, |
| ..., |
| <building_id_for_last_group> |
| ] |
| } |
|
|
| This ""solution"" array should be read in order: the first entry is the building assigned to the first research group, the second entry is the building for the second group, and so on. It's just a sketch of the shape I need β replace those placeholders with the actual building identifiers from the instance when you submit the real answer. |
| |
| Please use the identifiers exactly as they appear in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 69, 70, 3], [69, 0, 24, 92], [70, 24, 0, 26], [3, 92, 26, 0]], 'flow_matrix': [[0, 78, 33, 9], [78, 0, 38, 48], [33, 38, 0, 80], [9, 48, 80, 0]], 'objective': 18250.0}","[1, 2, 0, 3]",18250.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 69}, {'from_id': 1, 'to_id': 3, 'distance': 70}, {'from_id': 1, 'to_id': 4, 'distance': 3}, {'from_id': 2, 'to_id': 1, 'distance': 69}, {'from_id': 2, 'to_id': 3, 'distance': 24}, {'from_id': 2, 'to_id': 4, 'distance': 92}, {'from_id': 3, 'to_id': 1, 'distance': 70}, {'from_id': 3, 'to_id': 2, 'distance': 24}, {'from_id': 3, 'to_id': 4, 'distance': 26}, {'from_id': 4, 'to_id': 1, 'distance': 3}, {'from_id': 4, 'to_id': 2, 'distance': 92}, {'from_id': 4, 'to_id': 3, 'distance': 26}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 78}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 33}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 9}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 78}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 38}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 48}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 33}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 38}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 80}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 9}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 48}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 80}]}","[2, 3, 1, 4]",42,markdown_table,1 |
| QAP,QAP,"Thereβs a bit of a puzzle at the airport: assign every check-in team to a unique terminal, with each terminal getting exactly one team, while keeping passenger connections smooth. You can think of the inconvenience as built up from every pair of teams β multiply the count of connecting passengers between that pair by the distance between their assigned terminals, then total all those results to see how much cumulative hassle youβve caused. The aim is to arrange the teams so that total hassle is as low as possible, and the concrete flow and distance numbers are listed below. |
| |
| { |
| ""num_checkin_teams"": 5, |
| ""checkin_team_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"", |
| ""F4"", |
| ""F5"" |
| ], |
| ""terminal_ids"": [ |
| 1, |
| 2, |
| 3, |
| 4, |
| 5 |
| ], |
| ""distance"": [ |
| { |
| ""terminal_id_from"": 1, |
| ""terminal_id_to"": 2, |
| ""terminal_distance"": 2 |
| }, |
| { |
| ""terminal_id_from"": 1, |
| ""terminal_id_to"": 3, |
| ""terminal_distance"": 66 |
| }, |
| { |
| ""terminal_id_from"": 1, |
| ""terminal_id_to"": 4, |
| ""terminal_distance"": 16 |
| }, |
| { |
| ""terminal_id_from"": 1, |
| ""terminal_id_to"": 5, |
| ""terminal_distance"": 91 |
| }, |
| { |
| ""terminal_id_from"": 2, |
| ""terminal_id_to"": 1, |
| ""terminal_distance"": 2 |
| }, |
| { |
| ""terminal_id_from"": 2, |
| ""terminal_id_to"": 3, |
| ""terminal_distance"": 84 |
| }, |
| { |
| ""terminal_id_from"": 2, |
| ""terminal_id_to"": 4, |
| ""terminal_distance"": 0 |
| }, |
| { |
| ""terminal_id_from"": 2, |
| ""terminal_id_to"": 5, |
| ""terminal_distance"": 16 |
| }, |
| { |
| ""terminal_id_from"": 3, |
| ""terminal_id_to"": 1, |
| ""terminal_distance"": 66 |
| }, |
| { |
| ""terminal_id_from"": 3, |
| ""terminal_id_to"": 2, |
| ""terminal_distance"": 84 |
| }, |
| { |
| ""terminal_id_from"": 3, |
| ""terminal_id_to"": 4, |
| ""terminal_distance"": 75 |
| }, |
| { |
| ""terminal_id_from"": 3, |
| ""terminal_id_to"": 5, |
| ""terminal_distance"": 56 |
| }, |
| { |
| ""terminal_id_from"": 4, |
| ""terminal_id_to"": 1, |
| ""terminal_distance"": 16 |
| }, |
| { |
| ""terminal_id_from"": 4, |
| ""terminal_id_to"": 2, |
| ""terminal_distance"": 0 |
| }, |
| { |
| ""terminal_id_from"": 4, |
| ""terminal_id_to"": 3, |
| ""terminal_distance"": 75 |
| }, |
| { |
| ""terminal_id_from"": 4, |
| ""terminal_id_to"": 5, |
| ""terminal_distance"": 85 |
| }, |
| { |
| ""terminal_id_from"": 5, |
| ""terminal_id_to"": 1, |
| ""terminal_distance"": 91 |
| }, |
| { |
| ""terminal_id_from"": 5, |
| ""terminal_id_to"": 2, |
| ""terminal_distance"": 16 |
| }, |
| { |
| ""terminal_id_from"": 5, |
| ""terminal_id_to"": 3, |
| ""terminal_distance"": 56 |
| }, |
| { |
| ""terminal_id_from"": 5, |
| ""terminal_id_to"": 4, |
| ""terminal_distance"": 85 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""team_id_from"": ""F1"", |
| ""team_id_to"": ""F2"", |
| ""connecting_passengers"": 77 |
| }, |
| { |
| ""team_id_from"": ""F1"", |
| ""team_id_to"": ""F3"", |
| ""connecting_passengers"": 79 |
| }, |
| { |
| ""team_id_from"": ""F1"", |
| ""team_id_to"": ""F4"", |
| ""connecting_passengers"": 48 |
| }, |
| { |
| ""team_id_from"": ""F1"", |
| ""team_id_to"": ""F5"", |
| ""connecting_passengers"": 14 |
| }, |
| { |
| ""team_id_from"": ""F2"", |
| ""team_id_to"": ""F1"", |
| ""connecting_passengers"": 77 |
| }, |
| { |
| ""team_id_from"": ""F2"", |
| ""team_id_to"": ""F3"", |
| ""connecting_passengers"": 12 |
| }, |
| { |
| ""team_id_from"": ""F2"", |
| ""team_id_to"": ""F4"", |
| ""connecting_passengers"": 1 |
| }, |
| { |
| ""team_id_from"": ""F2"", |
| ""team_id_to"": ""F5"", |
| ""connecting_passengers"": 91 |
| }, |
| { |
| ""team_id_from"": ""F3"", |
| ""team_id_to"": ""F1"", |
| ""connecting_passengers"": 79 |
| }, |
| { |
| ""team_id_from"": ""F3"", |
| ""team_id_to"": ""F2"", |
| ""connecting_passengers"": 12 |
| }, |
| { |
| ""team_id_from"": ""F3"", |
| ""team_id_to"": ""F4"", |
| ""connecting_passengers"": 51 |
| }, |
| { |
| ""team_id_from"": ""F3"", |
| ""team_id_to"": ""F5"", |
| ""connecting_passengers"": 84 |
| }, |
| { |
| ""team_id_from"": ""F4"", |
| ""team_id_to"": ""F1"", |
| ""connecting_passengers"": 48 |
| }, |
| { |
| ""team_id_from"": ""F4"", |
| ""team_id_to"": ""F2"", |
| ""connecting_passengers"": 1 |
| }, |
| { |
| ""team_id_from"": ""F4"", |
| ""team_id_to"": ""F3"", |
| ""connecting_passengers"": 51 |
| }, |
| { |
| ""team_id_from"": ""F4"", |
| ""team_id_to"": ""F5"", |
| ""connecting_passengers"": 79 |
| }, |
| { |
| ""team_id_from"": ""F5"", |
| ""team_id_to"": ""F1"", |
| ""connecting_passengers"": 14 |
| }, |
| { |
| ""team_id_from"": ""F5"", |
| ""team_id_to"": ""F2"", |
| ""connecting_passengers"": 91 |
| }, |
| { |
| ""team_id_from"": ""F5"", |
| ""team_id_to"": ""F3"", |
| ""connecting_passengers"": 84 |
| }, |
| { |
| ""team_id_from"": ""F5"", |
| ""team_id_to"": ""F4"", |
| ""connecting_passengers"": 79 |
| } |
| ] |
| } |
| |
| Oh, and when you send back your choice, just stick to a simple JSON layout like this β a single ""solution"" array that lists, in order, which terminal each check-in team should go to. |
| |
| { |
| ""solution"": [ |
| <terminal_id_for_first_team>, |
| <terminal_id_for_second_team>, |
| ..., |
| <terminal_id_for_last_team> |
| ] |
| } |
| |
| This is just a quick sketch of the shape we want: the ""solution"" array holds one identifier per team, in team order (first team, second team, etc.), and each identifier names the terminal assigned to that team. Itβs a template, not the actual assignment. |
| |
| Please make sure you use the exact identifiers from the instance input β donβt rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 2, 66, 16, 91], [2, 0, 84, 0, 16], [66, 84, 0, 75, 56], [16, 0, 75, 0, 85], [91, 16, 56, 85, 0]], 'flow_matrix': [[0, 77, 79, 48, 14], [77, 0, 12, 1, 91], [79, 12, 0, 51, 84], [48, 1, 51, 0, 79], [14, 91, 84, 79, 0]], 'objective': 35838.0}","[2, 4, 0, 3, 1]",35838.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 1, 'to_id': 3, 'distance': 66}, {'from_id': 1, 'to_id': 4, 'distance': 16}, {'from_id': 1, 'to_id': 5, 'distance': 91}, {'from_id': 2, 'to_id': 1, 'distance': 2}, {'from_id': 2, 'to_id': 3, 'distance': 84}, {'from_id': 2, 'to_id': 4, 'distance': 0}, {'from_id': 2, 'to_id': 5, 'distance': 16}, {'from_id': 3, 'to_id': 1, 'distance': 66}, {'from_id': 3, 'to_id': 2, 'distance': 84}, {'from_id': 3, 'to_id': 4, 'distance': 75}, {'from_id': 3, 'to_id': 5, 'distance': 56}, {'from_id': 4, 'to_id': 1, 'distance': 16}, {'from_id': 4, 'to_id': 2, 'distance': 0}, {'from_id': 4, 'to_id': 3, 'distance': 75}, {'from_id': 4, 'to_id': 5, 'distance': 85}, {'from_id': 5, 'to_id': 1, 'distance': 91}, {'from_id': 5, 'to_id': 2, 'distance': 16}, {'from_id': 5, 'to_id': 3, 'distance': 56}, {'from_id': 5, 'to_id': 4, 'distance': 85}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 77}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 79}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 48}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 14}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 77}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 12}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 91}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 79}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 12}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 51}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 84}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 48}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 51}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 79}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 14}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 91}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 84}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 79}]}","[3, 5, 1, 4, 2]",43,json,1 |
| QAP,QAP,"Many people forget that where things live affects how often they have to run back and forth, so the task was set: assign each type of frequently used tool to a single unique bin, and make sure no two tools share a bin. To see which arrangement is best, for every pair of tool types multiply how often those two are used together by the distance between their assigned bins, then add up all those products β smaller sums mean fewer wasted steps. The detailed instance β which tools, their co-usage counts, and bin distances β is given below. |
| |
| There are 5 tool types to place: F1, F2, F3, F4, F5 must be assigned one-to-one into bins 0, 1, 2, 3, 4. |
| From 0 to 1, the bin separation is 0. |
| From 0 to 2, the bin separation is 0. |
| From 0 to 3, the bin separation is 0. |
| From 0 to 4, the bin separation is 0. |
| From 1 to 0, the bin separation is 0. |
| From 1 to 2, the bin separation is 0. |
| From 1 to 3, the bin separation is 10. |
| From 1 to 4, the bin separation is 0. |
| From 2 to 0, the bin separation is 0. |
| From 2 to 1, the bin separation is 0. |
| From 2 to 3, the bin separation is 0. |
| From 2 to 4, the bin separation is 0. |
| From 3 to 0, the bin separation is 0. |
| From 3 to 1, the bin separation is 10. |
| From 3 to 2, the bin separation is 0. |
| From 3 to 4, the bin separation is 0. |
| From 4 to 0, the bin separation is 0. |
| From 4 to 1, the bin separation is 0. |
| From 4 to 2, the bin separation is 0. |
| From 4 to 3, the bin separation is 0. |
| Between F1 and F2, the two tool types are used together 12 times. |
| Between F1 and F3, the two tool types are used together 26 times. |
| Between F1 and F4, the two tool types are used together 14 times. |
| Between F1 and F5, the two tool types are used together 12 times. |
| Between F2 and F1, the two tool types are used together 12 times. |
| Between F2 and F3, the two tool types are used together 50 times. |
| Between F2 and F4, the two tool types are used together 31 times. |
| Between F2 and F5, the two tool types are used together 18 times. |
| Between F3 and F1, the two tool types are used together 26 times. |
| Between F3 and F2, the two tool types are used together 50 times. |
| Between F3 and F4, the two tool types are used together 39 times. |
| Between F3 and F5, the two tool types are used together 70 times. |
| Between F4 and F1, the two tool types are used together 14 times. |
| Between F4 and F2, the two tool types are used together 31 times. |
| Between F4 and F3, the two tool types are used together 39 times. |
| Between F4 and F5, the two tool types are used together 35 times. |
| Between F5 and F1, the two tool types are used together 12 times. |
| Between F5 and F2, the two tool types are used together 18 times. |
| Between F5 and F3, the two tool types are used together 70 times. |
| Between F5 and F4, the two tool types are used together 35 times. |
| Refer to these listings to compute the summed products that indicate which arrangement wastes the fewest steps. |
| |
| Also, when you send back the final arrangement, please use a simple JSON layout like this so itβs easy to read and parse: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of the ""solution"" array as an ordered list: the first entry is the bin (location) assigned to the first tool (facility), the second entry is the bin for the second tool, and so on. Itβs just the shape Iβm expecting here β a sketch, not the filled-in answer. |
| |
| Please make sure you use the exact identifiers from the instance input β donβt rename them or make up new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 0, 0, 0, 0], [0, 0, 0, 10, 0], [0, 0, 0, 0, 0], [0, 10, 0, 0, 0], [0, 0, 0, 0, 0]], 'flow_matrix': [[0, 12, 26, 14, 12], [12, 0, 50, 31, 18], [26, 50, 0, 39, 70], [14, 31, 39, 0, 35], [12, 18, 70, 35, 0]], 'objective': 240.0}","[3, 1, 2, 0, 4]",240.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [0, 1, 2, 3, 4], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 0}, {'from_id': 0, 'to_id': 2, 'distance': 0}, {'from_id': 0, 'to_id': 3, 'distance': 0}, {'from_id': 0, 'to_id': 4, 'distance': 0}, {'from_id': 1, 'to_id': 0, 'distance': 0}, {'from_id': 1, 'to_id': 2, 'distance': 0}, {'from_id': 1, 'to_id': 3, 'distance': 10}, {'from_id': 1, 'to_id': 4, 'distance': 0}, {'from_id': 2, 'to_id': 0, 'distance': 0}, {'from_id': 2, 'to_id': 1, 'distance': 0}, {'from_id': 2, 'to_id': 3, 'distance': 0}, {'from_id': 2, 'to_id': 4, 'distance': 0}, {'from_id': 3, 'to_id': 0, 'distance': 0}, {'from_id': 3, 'to_id': 1, 'distance': 10}, {'from_id': 3, 'to_id': 2, 'distance': 0}, {'from_id': 3, 'to_id': 4, 'distance': 0}, {'from_id': 4, 'to_id': 0, 'distance': 0}, {'from_id': 4, 'to_id': 1, 'distance': 0}, {'from_id': 4, 'to_id': 2, 'distance': 0}, {'from_id': 4, 'to_id': 3, 'distance': 0}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 12}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 26}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 14}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 12}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 12}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 50}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 31}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 18}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 26}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 50}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 39}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 70}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 14}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 31}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 39}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 35}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 12}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 18}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 70}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 35}]}","[3, 1, 2, 0, 4]",44,nl,0 |
| QAP,QAP,"Thereβs a props master juggling dozens of set pieces, trying to pin each kit to one unique storage room and make sure no room stores two kits. What counts as βbetterβ is simply how little overall schlepping the stagehands have to do: look at every pair of kits, note how often they get moved between scenes and how far apart their assigned rooms are, multiply those two for each pair and add everything together β the smaller that total, the nicer the setup. The specific room distances and pair-move counts are shown below. |
| |
| # num_prop_sets=4 |
| # prop_set_ids=F1, F2, F3, F4 |
| # room_ids=1, 2, 3, 4 |
| |
| room_id_from,room_id_to,room_distance |
| 1,2,1 |
| 1,3,1 |
| 1,4,1 |
| 2,1,1 |
| 2,3,1 |
| 2,4,1 |
| 3,1,1 |
| 3,2,1 |
| 3,4,1 |
| 4,1,1 |
| 4,2,1 |
| 4,3,1 |
| |
| prop_set_id_from,prop_set_id_to,move_frequency |
| F1,F2,7 |
| F1,F3,16 |
| F1,F4,9 |
| F2,F1,7 |
| F2,F3,15 |
| F2,F4,15 |
| F3,F1,16 |
| F3,F2,15 |
| F3,F4,6 |
| F4,F1,9 |
| F4,F2,15 |
| F4,F3,6 |
| |
| If you want to hand me an assignment, just drop it in this simple JSON shape so it's easy to read by humans and machines alike: |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| Think of ""solution"" as a list that says which room goes with each kit in order β first entry = where the first kit lives, second = where the second kit lives, and so on. This is just the form I expect, not the actual assignment. |
|
|
| Please use the exact identifiers from the instance β don't rename them or invent new ones. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0]], 'flow_matrix': [[0, 7, 16, 9], [7, 0, 15, 15], [16, 15, 0, 6], [9, 15, 6, 0]], 'objective': 136.0}","[3, 1, 2, 0]",136.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [1, 2, 3, 4], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 1}, {'from_id': 1, 'to_id': 4, 'distance': 1}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 2, 'to_id': 4, 'distance': 1}, {'from_id': 3, 'to_id': 1, 'distance': 1}, {'from_id': 3, 'to_id': 2, 'distance': 1}, {'from_id': 3, 'to_id': 4, 'distance': 1}, {'from_id': 4, 'to_id': 1, 'distance': 1}, {'from_id': 4, 'to_id': 2, 'distance': 1}, {'from_id': 4, 'to_id': 3, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 7}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 16}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 9}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 7}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 15}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 15}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 16}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 15}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 6}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 9}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 15}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 6}]}","[4, 2, 3, 1]",45,csv,1 |
| QAP,QAP,"Many folks on the crew were comparing layouts: one variety per field, one field per variety, no repeats and no empty spots. The clever layouts are those that minimize hauling and coordination β put varieties that share lots of operations nearer to each other so thereβs less back-and-forth. To measure it, for every pair of varieties multiply how often they share operations by the distance between their assigned fields, and then total those products; the layout with the lowest total is preferred. The concrete instance details (distances, shared-operation numbers, field names) are given below. |
| |
| There are 4 varieties/fields: variety IDs F1, F2, F3, F4 and field IDs 0, 1, 2, 3. |
| Fields 0 and 1 are 53 apart. |
| Fields 0 and 2 are 40 apart. |
| Fields 0 and 3 are 45 apart. |
| Fields 1 and 0 are 53 apart. |
| Fields 1 and 2 are 1 apart. |
| Fields 1 and 3 are 2 apart. |
| Fields 2 and 0 are 40 apart. |
| Fields 2 and 1 are 1 apart. |
| Fields 2 and 3 are 1 apart. |
| Fields 3 and 0 are 45 apart. |
| Fields 3 and 1 are 2 apart. |
| Fields 3 and 2 are 1 apart. |
| Varieties F1 and F2 share operations with frequency 0. |
| Varieties F1 and F3 share operations with frequency 0. |
| Varieties F1 and F4 share operations with frequency 0. |
| Varieties F2 and F1 share operations with frequency 0. |
| Varieties F2 and F3 share operations with frequency 11. |
| Varieties F2 and F4 share operations with frequency 10. |
| Varieties F3 and F1 share operations with frequency 0. |
| Varieties F3 and F2 share operations with frequency 11. |
| Varieties F3 and F4 share operations with frequency 0. |
| Varieties F4 and F1 share operations with frequency 0. |
| Varieties F4 and F2 share operations with frequency 10. |
| Varieties F4 and F3 share operations with frequency 0. |
| The crew will use these distances and shared-operation frequencies to total the hauling cost and pick the layout with the lowest sum. |
| |
| If you want to send me a candidate layout, just drop it in a tiny JSON snippet like this β neat and predictable so I can read it straight away. |
| |
| { |
| ""solution"": [ |
| <field_id_for_first_variety>, |
| <field_id_for_second_variety>, |
| ..., |
| <field_id_for_last_variety> |
| ] |
| } |
| |
| This ""solution"" list is just the lineup of which field each variety gets, in order: the first item is the field assigned to the first variety, the second item to the second variety, and so on. Think of it as filling out a simple form β one field choice per variety. |
| |
| This is just the expected shape, not the actual answer β replace those placeholders with the real identifiers from the instance. Please use the identifiers exactly as they appear in the input β no renaming and no invented labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 53, 40, 45], [53, 0, 1, 2], [40, 1, 0, 1], [45, 2, 1, 0]], 'flow_matrix': [[0, 0, 0, 0], [0, 0, 11, 10], [0, 11, 0, 0], [0, 10, 0, 0]], 'objective': 42.0}","[0, 2, 3, 1]",42.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 53}, {'from_id': 0, 'to_id': 2, 'distance': 40}, {'from_id': 0, 'to_id': 3, 'distance': 45}, {'from_id': 1, 'to_id': 0, 'distance': 53}, {'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 2}, {'from_id': 2, 'to_id': 0, 'distance': 40}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 1}, {'from_id': 3, 'to_id': 0, 'distance': 45}, {'from_id': 3, 'to_id': 1, 'distance': 2}, {'from_id': 3, 'to_id': 2, 'distance': 1}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 11}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 10}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 11}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 10}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 0}]}","[0, 2, 3, 1]",46,nl,0 |
| QAP,QAP,"Iβm the exhibit designer laying out a new interactive floor. The job is to put each display on its own floor spot so every spot has exactly one display and no display is doubled up. The trick is that some pairs of displays draw lots of back-and-forth traffic, and others hardly do β so a βgoodβ layout is the one that keeps visitorsβ walking down by putting high-traffic pairs closer together. To figure that out, add up, for every pair of displays, how often people travel between them multiplied by how far apart the two chosen spots are β that total is what the layout should try to keep low. The specific map of spots and the pairwise visitor flows are shown below. |
| |
| { |
| ""num_displays"": 3, |
| ""display_ids"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""spot_ids"": [ |
| 1, |
| 2, |
| 3 |
| ], |
| ""distance"": [ |
| { |
| ""spot_from_id"": 1, |
| ""spot_to_id"": 2, |
| ""walking_distance"": 53 |
| }, |
| { |
| ""spot_from_id"": 1, |
| ""spot_to_id"": 3, |
| ""walking_distance"": 73 |
| }, |
| { |
| ""spot_from_id"": 2, |
| ""spot_to_id"": 1, |
| ""walking_distance"": 53 |
| }, |
| { |
| ""spot_from_id"": 2, |
| ""spot_to_id"": 3, |
| ""walking_distance"": 53 |
| }, |
| { |
| ""spot_from_id"": 3, |
| ""spot_to_id"": 1, |
| ""walking_distance"": 66 |
| }, |
| { |
| ""spot_from_id"": 3, |
| ""spot_to_id"": 2, |
| ""walking_distance"": 53 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""display_from_id"": ""F1"", |
| ""display_to_id"": ""F2"", |
| ""visitor_flow"": 243 |
| }, |
| { |
| ""display_from_id"": ""F1"", |
| ""display_to_id"": ""F3"", |
| ""visitor_flow"": 411 |
| }, |
| { |
| ""display_from_id"": ""F2"", |
| ""display_to_id"": ""F1"", |
| ""visitor_flow"": 374 |
| }, |
| { |
| ""display_from_id"": ""F2"", |
| ""display_to_id"": ""F3"", |
| ""visitor_flow"": 1134 |
| }, |
| { |
| ""display_from_id"": ""F3"", |
| ""display_to_id"": ""F1"", |
| ""visitor_flow"": 1186 |
| }, |
| { |
| ""display_from_id"": ""F3"", |
| ""display_to_id"": ""F2"", |
| ""visitor_flow"": 321 |
| } |
| ] |
| } |
| |
| When you send back a layout, just use this simple JSON shape so I can easily read which spot goes with which display: |
| |
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
| |
| Think of the ""solution"" list like a form: each entry is the spot id for the corresponding display in the same order the displays were listed in the instance. So the first value is the spot for the first display, the second is for the second display, and so on. This is just a sketch of the shape I expect β not the actual assignment. |
| |
| Please use the identifiers exactly as they appear in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[53, 53, 73], [53, 53, 53], [66, 53, 53]], 'flow_matrix': [[196, 243, 411], [374, 408, 1134], [1186, 321, 192]], 'objective': 246367.0}","[0, 2, 1]",246367.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [1, 2, 3], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 53}, {'from_id': 1, 'to_id': 3, 'distance': 73}, {'from_id': 2, 'to_id': 1, 'distance': 53}, {'from_id': 2, 'to_id': 3, 'distance': 53}, {'from_id': 3, 'to_id': 1, 'distance': 66}, {'from_id': 3, 'to_id': 2, 'distance': 53}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 243}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 411}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 374}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1134}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 1186}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 321}]}","[1, 3, 2]",47,json,1 |
| QAP,QAP,"Imagine trying to place food vendors across a row of booths so that no stall sits empty and no vendor claims two spots β each vendor gets one stall, each stall gets one vendor. The whole point is to cut down on unnecessary back-and-forth: if two stands tend to be visited in the same trip, put them close. To evaluate a setup, for every pair multiply how often people go between them by the distance between their assigned booths, then add everything together; the lower that overall number, the less walking for festival-goers. The specific distances and visit-pattern numbers follow below. |
| |
| There are 4 vendors and stalls, listed as F1, F2, F3, F4 for vendors and 0, 1, 2, 3 for stall locations. |
| |
| | stall_from_id | stall_to_id | stall_distance | |
| |---|---|---| |
| | 0 | 1 | 4 | |
| | 0 | 2 | 5 | |
| | 0 | 3 | 2 | |
| | 1 | 0 | 4 | |
| | 1 | 2 | 1 | |
| | 1 | 3 | 6 | |
| | 2 | 0 | 5 | |
| | 2 | 1 | 1 | |
| | 2 | 3 | 5 | |
| | 3 | 0 | 2 | |
| | 3 | 1 | 6 | |
| | 3 | 2 | 5 | |
| |
| | vendor_from_id | vendor_to_id | visit_flow | |
| |---|---|---| |
| | F1 | F2 | 6 | |
| | F1 | F3 | 2 | |
| | F1 | F4 | 0 | |
| | F2 | F1 | 6 | |
| | F2 | F3 | 1 | |
| | F2 | F4 | 0 | |
| | F3 | F1 | 2 | |
| | F3 | F2 | 1 | |
| | F3 | F4 | 3 | |
| | F4 | F1 | 0 | |
| | F4 | F2 | 0 | |
| | F4 | F3 | 3 | |
| |
| Use these numbers to evaluate any assignment of F1, F2, F3, F4 to 0, 1, 2, 3 and compute the total walking cost for the 4 stalls. |
| |
| Also, when you send back your setup, it's easiest for me to read if you use a tiny JSON snippet like this. |
|
|
| { |
| ""solution"": [ |
| <stall_id_for_first_vendor>, |
| <stall_id_for_second_vendor>, |
| ..., |
| <stall_id_for_last_vendor> |
| ] |
| } |
|
|
| This just means the ""solution"" list is read in vendor order: the first slot is the stall identifier you want for the first vendor, the second slot is the stall for the second vendor, and so on β just a simple one-line-per-vendor mapping, like filling out a short form. It's only a sketch of the shape I need, not the actual answer. |
| |
| Please make sure to use the exact identifiers given in the instance input β don't rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 4, 5, 2], [4, 0, 1, 6], [5, 1, 0, 5], [2, 6, 5, 0]], 'flow_matrix': [[0, 6, 2, 0], [6, 0, 1, 0], [2, 1, 0, 3], [0, 0, 3, 0]], 'objective': 50.0}","[1, 2, 0, 3]",50.0,"{'problem_type': 'QAP', 'num_facilities': 4, 'num_locations': 4, 'facilities': ['F1', 'F2', 'F3', 'F4'], 'locations': [0, 1, 2, 3], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 4}, {'from_id': 0, 'to_id': 2, 'distance': 5}, {'from_id': 0, 'to_id': 3, 'distance': 2}, {'from_id': 1, 'to_id': 0, 'distance': 4}, {'from_id': 1, 'to_id': 2, 'distance': 1}, {'from_id': 1, 'to_id': 3, 'distance': 6}, {'from_id': 2, 'to_id': 0, 'distance': 5}, {'from_id': 2, 'to_id': 1, 'distance': 1}, {'from_id': 2, 'to_id': 3, 'distance': 5}, {'from_id': 3, 'to_id': 0, 'distance': 2}, {'from_id': 3, 'to_id': 1, 'distance': 6}, {'from_id': 3, 'to_id': 2, 'distance': 5}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 6}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 2}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 6}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 2}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 3}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 3}]}","[1, 2, 0, 3] |
| QAP,QAP, |
|
|
| There are 5 transformer units (F1, F2, F3, F4, F5) to place across the 1, 2, 3, 4, 5 substation sites. |
|
|
| | site_id_from | site_id_to | distance_between_sites | |
| |---|---|---| |
| | 1 | 2 | 6 | |
| | 1 | 3 | 10 | |
| | 1 | 4 | 8 | |
| | 1 | 5 | 6 | |
| | 2 | 1 | 6 | |
| | 2 | 3 | 4 | |
| | 2 | 4 | 4 | |
| | 2 | 5 | 8 | |
| | 3 | 1 | 10 | |
| | 3 | 2 | 4 | |
| | 3 | 4 | 6 | |
| | 3 | 5 | 10 | |
| | 4 | 1 | 8 | |
| | 4 | 2 | 4 | |
| | 4 | 3 | 6 | |
| | 4 | 5 | 4 | |
| | 5 | 1 | 6 | |
| | 5 | 2 | 8 | |
| | 5 | 3 | 10 | |
| | 5 | 4 | 4 | |
|
|
| | transformer_id_from | transformer_id_to | power_exchange_between_transformers | |
| |---|---|---| |
| | F1 | F2 | 1 | |
| | F1 | F3 | 0 | |
| | F1 | F4 | 0 | |
| | F1 | F5 | 1 | |
| | F2 | F1 | 1 | |
| | F2 | F3 | 5 | |
| | F2 | F4 | 5 | |
| | F2 | F5 | 9 | |
| | F3 | F1 | 0 | |
| | F3 | F2 | 5 | |
| | F3 | F4 | 4 | |
| | F3 | F5 | 8 | |
| | F4 | F1 | 0 | |
| | F4 | F2 | 5 | |
| | F4 | F3 | 4 | |
| | F4 | F5 | 8 | |
| | F5 | F1 | 1 | |
| | F5 | F2 | 9 | |
| | F5 | F3 | 8 | |
| | F5 | F4 | 8 | |
|
|
| These directed site separations and transformer power exchanges are listed below for computing total transmission loss; lower totals indicate better seating plans. |
|
|
| If you want to send back a seating plan, just slip it into this little JSON shape β keeps things neat and machine-friendly without making it feel formal. |
|
|
| { |
| ""solution"": [ |
| <location_id_for_first_facility>, |
| <location_id_for_second_facility>, |
| ..., |
| <location_id_for_last_facility> |
| ] |
| } |
|
|
| Think of that ""solution"" array like a roster: the first entry is the seat ID for the first transformer, the second entry is the seat ID for the second transformer, and so on down the line. It's just a sketch of the shape I need, not the actual answer. |
| |
| Please make sure you use the exact identifiers shown in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β.""","{'distance_matrix': [[0, 6, 10, 8, 6], [6, 0, 4, 4, 8], [10, 4, 0, 6, 10], [8, 4, 6, 0, 4], [6, 8, 10, 4, 0]], 'flow_matrix': [[0, 1, 0, 0, 1], [1, 0, 5, 5, 9], [0, 5, 0, 4, 8], [0, 5, 4, 0, 8], [1, 9, 8, 8, 0]], 'objective': 460.0}","[0, 1, 4, 2, 3]",460.0,"{'problem_type': 'QAP', 'num_facilities': 5, 'num_locations': 5, 'facilities': ['F1', 'F2', 'F3', 'F4', 'F5'], 'locations': [1, 2, 3, 4, 5], 'distance_pairs': [{'from_id': 1, 'to_id': 2, 'distance': 6}, {'from_id': 1, 'to_id': 3, 'distance': 10}, {'from_id': 1, 'to_id': 4, 'distance': 8}, {'from_id': 1, 'to_id': 5, 'distance': 6}, {'from_id': 2, 'to_id': 1, 'distance': 6}, {'from_id': 2, 'to_id': 3, 'distance': 4}, {'from_id': 2, 'to_id': 4, 'distance': 4}, {'from_id': 2, 'to_id': 5, 'distance': 8}, {'from_id': 3, 'to_id': 1, 'distance': 10}, {'from_id': 3, 'to_id': 2, 'distance': 4}, {'from_id': 3, 'to_id': 4, 'distance': 6}, {'from_id': 3, 'to_id': 5, 'distance': 10}, {'from_id': 4, 'to_id': 1, 'distance': 8}, {'from_id': 4, 'to_id': 2, 'distance': 4}, {'from_id': 4, 'to_id': 3, 'distance': 6}, {'from_id': 4, 'to_id': 5, 'distance': 4}, {'from_id': 5, 'to_id': 1, 'distance': 6}, {'from_id': 5, 'to_id': 2, 'distance': 8}, {'from_id': 5, 'to_id': 3, 'distance': 10}, {'from_id': 5, 'to_id': 4, 'distance': 4}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 1}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F4', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F5', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F4', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F5', 'flow': 9}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F4', 'flow': 4}, {'from_id': 'F3', 'to_id': 'F5', 'flow': 8}, {'from_id': 'F4', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F4', 'to_id': 'F2', 'flow': 5}, {'from_id': 'F4', 'to_id': 'F3', 'flow': 4}, {'from_id': 'F4', 'to_id': 'F5', 'flow': 8}, {'from_id': 'F5', 'to_id': 'F1', 'flow': 1}, {'from_id': 'F5', 'to_id': 'F2', 'flow': 9}, {'from_id': 'F5', 'to_id': 'F3', 'flow': 8}, {'from_id': 'F5', 'to_id': 'F4', 'flow': 8}]}","[1, 2, 5, 3, 4]",49,markdown_table,1 |
| QAP,QAP,"Someone in charge of layout must give each book category a single shelf area and make sure each area holds only one category. The job is to pick which category goes where, and the measure of a good plan is the total walk burden: for every pair of categories take how often theyβre checked out together, multiply that by how far apart their shelves are, and sum everything β lower totals mean patrons walk less. Itβs a one-to-one placement: every category gets a spot and every spot gets one category. The concrete numbers for distances and borrowing links are shown below. |
| |
| { |
| ""num_categories_and_areas"": 3, |
| ""book_categories"": [ |
| ""F1"", |
| ""F2"", |
| ""F3"" |
| ], |
| ""shelf_areas"": [ |
| 0, |
| 1, |
| 2 |
| ], |
| ""distance"": [ |
| { |
| ""shelf_area_from_id"": 0, |
| ""shelf_area_to_id"": 1, |
| ""separation_distance"": 2 |
| }, |
| { |
| ""shelf_area_from_id"": 0, |
| ""shelf_area_to_id"": 2, |
| ""separation_distance"": 4 |
| }, |
| { |
| ""shelf_area_from_id"": 1, |
| ""shelf_area_to_id"": 0, |
| ""separation_distance"": 2 |
| }, |
| { |
| ""shelf_area_from_id"": 1, |
| ""shelf_area_to_id"": 2, |
| ""separation_distance"": 2 |
| }, |
| { |
| ""shelf_area_from_id"": 2, |
| ""shelf_area_to_id"": 0, |
| ""separation_distance"": 4 |
| }, |
| { |
| ""shelf_area_from_id"": 2, |
| ""shelf_area_to_id"": 1, |
| ""separation_distance"": 2 |
| } |
| ], |
| ""flow"": [ |
| { |
| ""category_from_id"": ""F1"", |
| ""category_to_id"": ""F2"", |
| ""co_borrow_frequency"": 0 |
| }, |
| { |
| ""category_from_id"": ""F1"", |
| ""category_to_id"": ""F3"", |
| ""co_borrow_frequency"": 5 |
| }, |
| { |
| ""category_from_id"": ""F2"", |
| ""category_to_id"": ""F1"", |
| ""co_borrow_frequency"": 0 |
| }, |
| { |
| ""category_from_id"": ""F2"", |
| ""category_to_id"": ""F3"", |
| ""co_borrow_frequency"": 3 |
| }, |
| { |
| ""category_from_id"": ""F3"", |
| ""category_to_id"": ""F1"", |
| ""co_borrow_frequency"": 5 |
| }, |
| { |
| ""category_from_id"": ""F3"", |
| ""category_to_id"": ""F2"", |
| ""co_borrow_frequency"": 3 |
| } |
| ] |
| } |
| |
| If you want to give the final assignment in a machine-friendly way, just stick to this little JSON shape β it's an easy form: a list where each entry is the shelf (location) id for the corresponding book category. |
|
|
| { |
| ""solution"": [ |
| <shelf_id_for_first_category>, |
| <shelf_id_for_second_category>, |
| ..., |
| <shelf_id_for_last_category> |
| ] |
| } |
|
|
| Pretty straightforward: ""solution"" is the list, and the first item is the shelf id assigned to the first category in the instance, the second item is the shelf id for the second category, and so on. This block is just a sketch of the shape I expect, not the actual answer β replace those placeholders with the exact ids from the instance when you give the final assignment. |
|
|
| Please use the identifiers exactly as they appear in the instance input β do not rename them or invent new labels. |
| - for example: ""Valid identifiers look like plain numbers such as β1β or β23β, single capital letters like βAβ or βBβ, or a capital letter followed by digits like βA1β or βX7β"".","{'distance_matrix': [[0, 2, 4], [2, 0, 2], [4, 2, 0]], 'flow_matrix': [[0, 0, 5], [0, 0, 3], [5, 3, 0]], 'objective': 32.0}","[2, 0, 1]",32.0,"{'problem_type': 'QAP', 'num_facilities': 3, 'num_locations': 3, 'facilities': ['F1', 'F2', 'F3'], 'locations': [0, 1, 2], 'distance_pairs': [{'from_id': 0, 'to_id': 1, 'distance': 2}, {'from_id': 0, 'to_id': 2, 'distance': 4}, {'from_id': 1, 'to_id': 0, 'distance': 2}, {'from_id': 1, 'to_id': 2, 'distance': 2}, {'from_id': 2, 'to_id': 0, 'distance': 4}, {'from_id': 2, 'to_id': 1, 'distance': 2}], 'flow_pairs': [{'from_id': 'F1', 'to_id': 'F2', 'flow': 0}, {'from_id': 'F1', 'to_id': 'F3', 'flow': 5}, {'from_id': 'F2', 'to_id': 'F1', 'flow': 0}, {'from_id': 'F2', 'to_id': 'F3', 'flow': 3}, {'from_id': 'F3', 'to_id': 'F1', 'flow': 5}, {'from_id': 'F3', 'to_id': 'F2', 'flow': 3}]}","[2, 0, 1] |
|
|