We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52b6f96 commit 86c6e80Copy full SHA for 86c6e80
create_dataset.py
@@ -6,8 +6,8 @@ class DatasetCreator:
6
"""
7
A class to create a dataset for the box packing problem, including truck dimensions and box parameters.
8
9
- def __init__(self, min_boxes=10, max_boxes=36, min_value=50, max_value=500,
10
- max_truck_dim=(600, 600, 600), min_truck_dim=(50, 50, 50)):
+ def __init__(self, min_boxes=10, max_boxes=100, min_value=50, max_value=500,
+ max_truck_dim=(1000, 1000, 1000), min_truck_dim=(50, 50, 50)):
11
12
Initializes the DatasetCreator with parameters for box and truck dimension ranges.
13
@@ -59,3 +59,10 @@ def generate_dataset(self):
59
def save_to_file(self, dataset, filename='input.json'):
60
with open(filename, 'w') as outfile:
61
json.dump(dataset, outfile)
62
+
63
64
+if __name__ == "__main__":
65
+ creator = DatasetCreator()
66
+ dataset = creator.generate_dataset()
67
+ creator.save_to_file(dataset)
68
+ print("New dataset has been generated")
0 commit comments