diff --git a/simu/Scripts/Main.gd b/simu/Scripts/Main.gd index d2251eb..aaa2c62 100644 --- a/simu/Scripts/Main.gd +++ b/simu/Scripts/Main.gd @@ -257,11 +257,15 @@ func load_scenario(file_path : String): output_machines.append(machine) else: machines.append(machine) + + if !is_jobshop && scenario.has("jobshop"): + jobshop_path = scenario["jobshop"] + if jobshop_path != "": + is_jobshop = true if is_jobshop: #in that case load from the jobshop file specified load_jobshop(machines, input_machines) - else: diff --git a/simu/environments/env_6_machines.json b/simu/environments/env_6_machines.json index b6ec0f1..b187120 100644 --- a/simu/environments/env_6_machines.json +++ b/simu/environments/env_6_machines.json @@ -1 +1,33 @@ -{"data":[[8,8,8,8,8,8,8,12,8,8,8,8,8,8,8,8,8,8,8],[8,3,3,3,3,3,3,11,11,11,11,11,11,3,3,3,3,3,8],[8,3,3,3,3,3,3,5,5,5,5,5,5,3,3,3,3,3,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,8],[8,3,3,10,5,3,3,3,3,3,3,3,3,3,3,4,4,4,8],[8,3,3,10,5,3,3,3,3,3,5,5,3,3,3,4,4,4,8],[8,3,3,10,5,3,3,3,3,3,5,10,3,3,3,4,4,4,8],[8,3,3,9,3,3,3,3,3,3,5,10,3,3,3,4,4,4,8],[8,3,3,11,5,3,3,3,3,3,3,9,3,3,3,4,4,4,8],[8,3,3,11,5,3,3,3,3,11,11,11,3,3,3,4,4,4,8],[8,3,3,11,5,3,3,3,3,5,5,5,3,3,3,3,3,3,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,5,10,5,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,5,10,5,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,3,9,3,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,5,11,5,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,5,11,5,3,3,3,3,3,10,10,3,3,3,8],[8,3,3,3,3,5,11,5,3,3,3,3,3,10,5,3,3,3,8],[8,3,3,3,3,5,5,5,3,3,3,3,3,10,5,3,3,3,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,9,3,3,3,3,8],[8,3,3,3,3,3,3,3,5,5,5,3,3,11,5,3,3,3,8],[8,3,10,10,5,3,3,3,5,10,5,3,3,11,5,3,5,5,8],[8,3,3,10,5,3,3,3,5,10,5,3,3,11,5,3,5,10,8],[8,3,3,10,5,3,3,3,5,10,5,3,3,3,3,3,5,10,8],[8,3,3,9,3,3,3,3,3,9,3,3,3,3,3,3,5,10,8],[8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,10,8],[8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,10,13],[8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,5,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8],[8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8],[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]],"offset":[0,0]} \ No newline at end of file +{"data":[[8,8,8,8,8,8,8,12,8,8,8,8,8,8,8,8,8,8,8], + [8,3,3,3,3,3,3,11,11,11,11,11,11,3,3,3,3,3,8], + [8,3,3,3,3,3,3,5,5,5,5,5,5,3,3,3,3,3,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,8], + [8,3,3,10,5,3,3,3,3,3,3,3,3,3,3,4,4,4,8], + [8,3,3,10,5,3,3,3,3,3,5,5,3,3,3,4,4,4,8], + [8,3,3,10,5,3,3,3,3,3,5,10,3,3,3,4,4,4,8], + [8,3,3,9,3,3,3,3,3,3,5,10,3,3,3,4,4,4,8], + [8,3,3,11,5,3,3,3,3,3,3,9,3,3,3,4,4,4,8], + [8,3,3,11,5,3,3,3,3,11,11,11,3,3,3,4,4,4,8], + [8,3,3,11,5,3,3,3,3,5,5,5,3,3,3,3,3,3,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,5,10,5,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,5,10,5,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,3,9,3,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,5,11,5,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,5,11,5,3,3,3,3,3,10,10,3,3,3,8], + [8,3,3,3,3,5,11,5,3,3,3,3,3,10,5,3,3,3,8], + [8,3,3,3,3,5,5,5,3,3,3,3,3,10,5,3,3,3,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,9,3,3,3,3,8], + [8,3,3,3,3,3,3,3,5,5,5,3,3,11,5,3,3,3,8], + [8,3,10,10,5,3,3,3,5,10,5,3,3,11,5,3,5,5,8], + [8,3,3,10,5,3,3,3,5,10,5,3,3,11,5,3,5,10,8], + [8,3,3,10,5,3,3,3,5,10,5,3,3,3,3,3,5,10,8], + [8,3,3,9,3,3,3,3,3,9,3,3,3,3,3,3,5,10,8], + [8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,10,8], + [8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,10,13], + [8,3,3,11,5,3,3,3,3,11,5,3,3,3,3,3,5,5,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8], + [8,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8], + [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]], + "offset":[0,0]} \ No newline at end of file diff --git a/simu/environments/new_environment.json b/simu/environments/new_environment.json index faee8e7..4d01fc0 100644 --- a/simu/environments/new_environment.json +++ b/simu/environments/new_environment.json @@ -14,8 +14,8 @@ [8, 3, 3, 3, 3, 10, 5, 3, 3, 3, 3, 10, 10, 10, 3, 3, 3, 3, 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, 3, 3, 3, 3, 3, 3, 3, 3, 8], [8, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8], diff --git a/simu/scenarios/new_scenario.json b/simu/scenarios/new_scenario.json index 6b283ea..1195445 100644 --- a/simu/scenarios/new_scenario.json +++ b/simu/scenarios/new_scenario.json @@ -3,8 +3,8 @@ {"position":[7.8,16.5]} ], "machines": [ - {"position":[14,5],"possible_processes":[0,1,2]}, - {"position":[17,10],"possible_processes": [2,3,4,5]} + {"possible_processes":[0,1,2]}, + {"possible_processes": [2,3,4,5]} ], "packages":[ [[0,10],[1,5]], diff --git a/simu/scenarios/new_scenario_multirobots.json b/simu/scenarios/new_scenario_multirobots.json index 9958161..b07109b 100644 --- a/simu/scenarios/new_scenario_multirobots.json +++ b/simu/scenarios/new_scenario_multirobots.json @@ -3,7 +3,12 @@ {"position":[7.8,16.5]}, {"position":[6.8,16.5]} ], - "environment": "res://environments/env_6_machines.json", - - + "packages":[ + [[0,10],[1,5]], + [[0,1],[1,8],[2,6]], + [[2,3],[1,9]], + [[2,7],[0,12], + [5,4]] + ], + "environment": "res://environments/env_6_machines.json" } \ No newline at end of file diff --git a/simu/scenarios/new_scenario_with_environment.json b/simu/scenarios/new_scenario_with_environment.json index 5178f5f..8139ced 100644 --- a/simu/scenarios/new_scenario_with_environment.json +++ b/simu/scenarios/new_scenario_with_environment.json @@ -3,13 +3,17 @@ {"position":[7.8,16.5]} ], "machines": [ - {"position":[14,5],"possible_processes":[0,1,2]}, - {"position":[17,10],"possible_processes": [2,3,4,5]} + {"possible_processes":[0,1,2]}, + {"possible_processes": [2,3,4,5]}, + {"possible_processes":[0,1,2]}, + {"possible_processes": [2,3,4,5]}, + {"possible_processes":[0,1,2]}, + {"possible_processes": [2,3,4,5]} ], "packages":[ [[0,10],[1,5]], [[0,1],[1,8],[2,6]], - [[2,3],[1,9]], + [[2,3],[1,9]], [[2,7],[0,12], [5,4]] ], diff --git a/simu/scenarios/new_scenario_with_two_robots.json b/simu/scenarios/new_scenario_with_two_robots.json index 660a36e..92b6056 100644 --- a/simu/scenarios/new_scenario_with_two_robots.json +++ b/simu/scenarios/new_scenario_with_two_robots.json @@ -5,7 +5,7 @@ ], "machines": [ {"position":[14,5],"possible_processes":[0,1,2]}, - {"position":[17,10],"possible_processes": [2,3,4,5]} + {"position":[16,11],"possible_processes": [2,3,4,5]} ], "packages":[ [[0,10],[1,5]], @@ -13,5 +13,6 @@ [[2,3],[1,9]], [[2,7],[0,12], [5,4]] - ] + ], + "environment": "res://environments/new_environment.json" } \ No newline at end of file