OSDN Git Service

implemented parsing optimization
[bin-packing-3d/or_project_inform.git] / src / inform-or / inform_or_experiments / split_model.py
index a81773b..e8d0255 100644 (file)
@@ -1,12 +1,13 @@
 # Copyright (c) 2020 Janos Piddubnij 
 # Copyright (c) 2020 Moritz Dedderichs
 
+
 from inform_or_models.assign_items_by_volume import assign_items_by_volume
 from inform_or_parser.parse_generated_csv import parse_generated_csv
 from inform_or_models.place_items_in_box import place_items_in_box
 from inform_or_parser.parse_boxes import parse_boxes
 from typing import Dict, Tuple
-
+import sys
 
 class SplitModel:
     def __init__(self, input_file: str, boxes_file: str):
@@ -17,7 +18,7 @@ class SplitModel:
         input_file: str
             The CSV file created by the INFORM-Generator to be processed.
         """
-        self.orders, self.length_items, self.width_items, self.height_items, self.weight_items = parse_generated_csv(input_file)
+        self.orders, self.length_items, self.width_items, self.height_items, self.weight_items = parse_generated_csv(input_file, ";", "utf-16", 0, sys.maxsize)
         boxes_dict = parse_boxes(boxes_file)
         self.boxes = list(boxes_dict.keys())
         self.length_boxes = {k: v[0] for k, v in boxes_dict.items()}