This commit is contained in:
Saturneric 2021-04-20 21:17:02 +08:00
parent c1a8cdedcd
commit 1028dfed30
4 changed files with 10 additions and 9 deletions

2
.idea/misc.xml generated
View File

@ -3,5 +3,5 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (Scheduling)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (scheduling)" project-jdk-type="Python SDK" />
</project> </project>

2
.idea/scheduling.iml generated
View File

@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.7 (Scheduling)" jdkType="Python SDK" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
</module> </module>

View File

@ -51,7 +51,7 @@ def import_process(res, products: Dict[str, model.Product]) -> Dict[str, model.P
for record in res: for record in res:
process: model.Process = model.Process(record[0], record[1], products[record[2]], record[9]) process: model.Process = model.Process(record[0], record[1], products[record[2]], record[9])
process.set_mode_quantity(record[5], record[6], record[7]) process.set_mode_quantity(record[5], record[7], record[6])
process.set_product_time(record[8]) process.set_product_time(record[8])
products[record[2]].add_process(process) products[record[2]].add_process(process)
processes[process.pcs_id] = process processes[process.pcs_id] = process

View File

@ -38,15 +38,16 @@ def search_semi_products(floor, produce_tree, produce_list, runtime_product):
produce_tree.append({"runtime_product": runtime_product, "runtime_semi_products": runtime_semi_products}) produce_tree.append({"runtime_product": runtime_product, "runtime_semi_products": runtime_semi_products})
# print("F", runtime_product.product.product_id, runtime_product.ddl) # print("F", runtime_product.product.product_id, runtime_product.ddl)
if len(runtime_product.product.semi_products) > 0: if len(runtime_product.product.semi_products) > 0:
for i in range(runtime_product.amount):
for item in runtime_product.product.semi_products:
for item in runtime_product.product.semi_products: runtime_semi_product = runtime.RuntimeProduct(item["semi_product"], item["amount"])
runtime_semi_product.set_ddl_start(runtime_product.ddl, runtime_product.start)
runtime_semi_product = runtime.RuntimeProduct(item["semi_product"], item["amount"]) # print("C", runtime_semi_product.product.product_id, runtime_semi_product.ddl)
runtime_semi_product.set_ddl_start(runtime_product.ddl, runtime_product.start)
# print("C", runtime_semi_product.product.product_id, runtime_semi_product.ddl) for k in range(runtime_semi_product.amount):
search_semi_products(floor+1, runtime_semi_products, produce_list, runtime_semi_product)
search_semi_products(floor+1, runtime_semi_products, produce_list, runtime_semi_product)
print("L", floor, runtime_product.product.product_id, runtime_product.ddl) print("L", floor, runtime_product.product.product_id, runtime_product.ddl)
produce_list.append(runtime_product) produce_list.append(runtime_product)