diff options
author | Koen van der Heijden <koen.vd.heijden1@gmail.com> | 2016-12-11 18:45:16 +0100 |
---|---|---|
committer | Koen van der Heijden <koen.vd.heijden1@gmail.com> | 2016-12-11 18:45:16 +0100 |
commit | 0533d962bc83630cb80af2b60ecfd4083811f0fb (patch) | |
tree | a4aea256cd3398d23d8eb6e169d288ee4b6b2be9 | |
parent | 8c3efd1ed40f51115a3766248dcff62cf9e3f12d (diff) | |
download | 2IMF25-AR-0533d962bc83630cb80af2b60ecfd4083811f0fb.tar.gz |
Removed package for easier compiling
-rw-r--r-- | packing_pallets_in_trucks/src/PackingPallets.java (renamed from packing_pallets_in_trucks/src/nl/tue/PackingPallets.java) | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/packing_pallets_in_trucks/src/nl/tue/PackingPallets.java b/packing_pallets_in_trucks/src/PackingPallets.java index 0d2afc1..baf850a 100644 --- a/packing_pallets_in_trucks/src/nl/tue/PackingPallets.java +++ b/packing_pallets_in_trucks/src/PackingPallets.java @@ -1,4 +1,3 @@ -package nl.tue; public class PackingPallets { @@ -10,8 +9,8 @@ public class PackingPallets { private static final int NR_OF_NUZZLES = 4; private static final int NUZZLES_WEIGHT = 700; - private static final int NR_OF_PRITTLES_A = 5; - private static final int NR_OF_PRITTLES_B = 5; + private static final int NR_OF_PRITTLES_A = 14; + private static final int NR_OF_PRITTLES_B = 15; private static final int PRITTLES_WEIGHT = 400; private static final int NR_OF_SKIPPLES = 8; @@ -97,23 +96,23 @@ public class PackingPallets { for(int j = 1; j <= NR_OF_TRUCKS; j++) { System.out.println("(< (+ "); for(int i = 1; i <= NR_OF_NUZZLES; i++) { - System.out.print("(ite (= n" + i + " " + j + ") (" + NUZZLES_WEIGHT + ") (0))" ); + System.out.print("(ite (= n" + i + " " + j + ") " + NUZZLES_WEIGHT + " 0)" ); } System.out.println(); for(int i = 1; i <= prittles; i++) { - System.out.print("(ite (= p" + i + " " + j + ") (" + PRITTLES_WEIGHT + ") (0)) "); + System.out.print("(ite (= p" + i + " " + j + ") " + PRITTLES_WEIGHT + " 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_SKIPPLES; i++) { - System.out.print("(ite (= s" + i + " " + j + ") (" + SKIPPLES_WEIGHT + ") (0)) "); + System.out.print("(ite (= s" + i + " " + j + ") " + SKIPPLES_WEIGHT + " 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_CROTTLES; i++) { - System.out.print("(ite (= c" + i + " " + j + ") (" + CROTTLES_WEIGHT + ") (0)) "); + System.out.print("(ite (= c" + i + " " + j + ") " + CROTTLES_WEIGHT + " 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_DUPPLES; i++) { - System.out.print("(ite (= d" + i + " " + j + ") (" + DUPPLES_WEIGHT + ") (0)) "); + System.out.print("(ite (= d" + i + " " + j + ") " + DUPPLES_WEIGHT + " 0) "); } System.out.println(") " + TRUCK_CAPACITY + ")"); } @@ -121,23 +120,23 @@ public class PackingPallets { for(int j = 1; j <= NR_OF_TRUCKS; j++) { System.out.println("(< (+ "); for(int i = 1; i <= NR_OF_NUZZLES; i++) { - System.out.print("(ite (= n" + i + " " + j + ") (1) (0)) "); + System.out.print("(ite (= n" + i + " " + j + ") 1 0) "); } System.out.println(); for(int i = 1; i <= prittles; i++) { - System.out.print("(ite (= p" + i + " " + j + ") (1) (0)) "); + System.out.print("(ite (= p" + i + " " + j + ") 1 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_SKIPPLES; i++) { - System.out.print("(ite (= s" + i + " " + j + ") (1) (0)) "); + System.out.print("(ite (= s" + i + " " + j + ") 1 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_CROTTLES; i++) { - System.out.print("(ite (= c" + i + " " + j + ") (1) (0)) "); + System.out.print("(ite (= c" + i + " " + j + ") 1 0) "); } System.out.println(); for(int i = 1; i <= NR_OF_DUPPLES; i++) { - System.out.print("(ite (= d" + i + " " + j + ") (1) (0)) "); + System.out.print("(ite (= d" + i + " " + j + ") 1 0) "); } System.out.println(") " + TRUCK_PALLET_CAPACITY + ")"); } @@ -160,6 +159,16 @@ public class PackingPallets { System.out.print("(= c" + j + " " + i + ") "); } System.out.println(")))"); + + System.out.print("(=> (or "); + for(int j = 1; j <= NR_OF_CROTTLES; j++) { + System.out.print("(= c" + j + " " + i + ") "); + } + System.out.print(") (not (or "); + for(int j = 1; j <= prittles; j++) { + System.out.print("(= p" + j + " " + i + ") "); + } + System.out.println(")))"); } } |