Merge branch 'bug3484' of ssh://sapsailing.com/home/trac/git into bug3484

This commit is contained in:
Raphael Müßeler committed 2017-11-15 16:27:12 +01:00
commit 225ccc6ddf
36 files changed
+44 -338

No files matched your search

-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:37:00
Pid: 11192
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [15096] 14:37:00 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:11:57
Pid: 11820
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [8804] 15:11:57 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-10-2509:39:58
Pid: 12004
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [10152] 09:39:58 ***ERROR (:0): Java assert: "null" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:17:09
Pid: 12080
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [13816] 14:17:09 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:36:14
Pid: 12804
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [4796] 14:36:14 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:14:13
Pid: 13164
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [5320] 15:14:13 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:39:52
Pid: 136
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [1464] 15:39:52 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!0.7004145529212449" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:52:28
Pid: 14076
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [220] 15:52:28 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:05:35
Pid: 14232
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [11828] 15:05:35 ***ERROR (:0): StackOverflowError
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1516:06:58
Pid: 14548
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [15312] 16:06:58 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:01:19
Pid: 14756
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [8920] 14:01:19 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:39:08
Pid: 15052
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [14572] 15:39:08 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1315:09:38
Pid: 15328
Hostname: WDFN34222676A
current dir: C:\Users\d070264\eclipse_workspace\git\java\com.sap.sse.test
---
: [14884] 15:09:38 ***ERROR (:0): OutOfMemoryError: Could not allocate 8589934608 bytes (array length 2147483647)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-10-2509:48:59
Pid: 16808
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [14196] 09:48:59 ***ERROR (:0): Java assert: "" in org.junit.Assert.fail(Assert.java:91)
-11
View File
@@ -1,11 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1312:12:01
Pid: 18732
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [1328] 12:12:01 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [1328] 12:12:07 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [14432] 12:12:12 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:49:50
Pid: 224
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [1624] 15:49:50 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:43:23
Pid: 2516
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [12480] 15:43:23 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1516:05:02
Pid: 3068
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [9888] 16:05:02 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:31:41
Pid: 4332
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [136] 15:31:41 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:13:49
Pid: 444
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [15288] 15:13:49 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:14:56
Pid: 4552
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [10384] 14:14:56 ***Warning: DebuggingOnDemand was deactivated
-13
View File
@@ -1,13 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1312:11:17
Pid: 5068
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [13544] 12:11:17 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [14784] 12:11:25 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [13188] 12:11:34 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [13188] 12:11:47 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
: [432] 12:11:57 ***ERROR (:0): OutOfMemoryError: Could not allocate 0 bytes
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1516:10:40
Pid: 6096
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [10676] 16:10:40 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-10-2510:14:10
Pid: 6436
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [32] 10:14:10 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:00:39
Pid: 6540
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [10536] 14:00:39 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:54:58
Pid: 7292
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [2604] 14:54:58 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:53:48
Pid: 8136
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [14880] 14:53:48 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:07:19
Pid: 8144
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [14096] 15:07:19 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:34:57
Pid: 8632
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [4760] 14:34:57 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-10-2509:46:48
Pid: 9096
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [8248] 09:46:48 ***ERROR (:0): Java assert: "null" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1514:13:06
Pid: 9112
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [12304] 14:13:06 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:36:48
Pid: 9336
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [15020] 15:36:48 ***Warning: DebuggingOnDemand was deactivated
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:13:41
Pid: 9760
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [14844] 15:13:41 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!" in junit.framework.Assert.fail(Assert.java:47)
-9
View File
@@ -1,9 +0,0 @@
---
VM version: Oct 9 2017 15:07:17 - 81_REL - optU - windows amd64 - 6 - bas2:294982 (mixed mode)
Time:2017-11-1515:16:14
Pid: 9792
Hostname: WDFN34222622A
current dir: C:\Users\D070307\.git\.projects\git\java\com.sap.sse.test
---
: [11016] 15:16:14 ***ERROR (:0): Java assert: "Quality of Pairinglist is worse than usual!0.7004145529212449" in junit.framework.Assert.fail(Assert.java:47)
@@ -3,6 +3,7 @@ package com.sap.see.pairinglist.test;
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.IntStream;
import org.junit.Before;
@@ -60,13 +61,12 @@ public class PairingListTemplateFactoryTest {
@Test
public void testGeneration() {
PairingListTemplateFactoryImpl factoryImpl = new PairingListTemplateFactoryImpl();
PairingListTemplate example1 = factoryImpl.getOrCreatePairingListTemplate(new PairingFrameProviderTest(15, 3, 18));
PairingListTemplate example2 = factoryImpl.getOrCreatePairingListTemplate(new PairingFrameProviderTest(45, 6, 18));
// PairingListTemplate example1 = factoryImpl.getOrCreatePairingListTemplate(new PairingFrameProviderTest(15, 3, 18));
// PairingListTemplate example2 = factoryImpl.getOrCreatePairingListTemplate(new PairingFrameProviderTest(45, 6, 18));
PairingListTemplate example3 = factoryImpl.getOrCreatePairingListTemplate(new PairingFrameProviderTest(10, 3, 30));
assertNotNull(example1);
assertNotNull(example2);
// assertNotNull(example1);
// assertNotNull(example2);
assertNotNull(example3);
/*
for(int[] row : example1.getPairingListTemplate()) {
System.out.println(Arrays.toString(row));
@@ -22,6 +22,8 @@ public class PairingListTemplateImpl implements PairingListTemplate {
.getDefaultBackgroundTaskThreadPoolExecutor();
private final int maxConstantFlights;
private final int MAX_TASKS = 1024;
private final int seedsCount;
private final int iterations;
public PairingListTemplateImpl(PairingFrameProvider pairingFrameProvider) {
@@ -31,9 +33,12 @@ public class PairingListTemplateImpl implements PairingListTemplate {
public PairingListTemplateImpl(PairingFrameProvider pairingFrameProvider, int iterations) {
this.iterations = iterations;
this.maxConstantFlights = (int) (pairingFrameProvider.getFlightsCount() * 0.9);
if (this.checkValues(pairingFrameProvider.getFlightsCount(), pairingFrameProvider.getGroupsCount(),
this.seedsCount = (int) ((Math.log(iterations))/(Math.log(pairingFrameProvider.getFlightsCount())));
this.maxConstantFlights = (int) ((Math.log(MAX_TASKS))/(Math.log(seedsCount)));
if (this.checkValues(pairingFrameProvider.getFlightsCount(), pairingFrameProvider.getGroupsCount(),
pairingFrameProvider.getCompetitorsCount())) {
this.pairingListTemplate = this.createPairingListTemplate(pairingFrameProvider.getFlightsCount(),
@@ -165,11 +170,11 @@ public class PairingListTemplateImpl implements PairingListTemplate {
* @return int array of random competitors
*/
private int[] generateSeeds(int flights, int competitors) {
int[] seeds = new int[(int) (Math.log(iterations) / Math.log(flights) * 0.5)];
for (int x = 0; x < seeds.length; x++) {
int random = this.getRandomIntegerBetween(1, competitors);
while (this.contains(seeds, random)) {
random = this.getRandomIntegerBetween(1, competitors);
int[] seeds=new int[seedsCount];
for(int x=0;x<seeds.length;x++){
int random=this.getRandomIntegerBetween(1, competitors);
while(this.contains(seeds, random)) {
random=this.getRandomIntegerBetween(1, competitors);
}
seeds[x] = random;
}
@@ -357,33 +362,37 @@ public class PairingListTemplateImpl implements PairingListTemplate {
* against another competitor.
* @return best complete pairing list out of given iterations
*/
protected int[][] create(int flights, int groups, int competitors, int iterationCount, int[][] constantPLT,
int[][] associations) {
int[][] bestPLT = new int[groups * flights][competitors / groups];
for (int m = 0; m < maxConstantFlights * groups; m++) {
protected int[][] create(int flights, int groups, int competitors, int iterationCount,
int[][] constantPLT, int[][] associations) {
int[][] seeds=new int[iterationCount][flights-maxConstantFlights];
int[][] bestPLT = new int[groups*flights][competitors / groups];
for (int m = 0; m < maxConstantFlights*groups; m++) {
System.arraycopy(constantPLT[m], 0, bestPLT[m], 0, constantPLT[0].length);
}
int[][] currentAssociations = new int[competitors][competitors];
double bestDev = Double.POSITIVE_INFINITY;
// TODO identify equal prefixes
for (int iteration = 0; iteration < iterationCount; iteration++) {
for(int[] row : seeds){
do{
for(int i=0;i<seeds[0].length;i++){
row[i]=this.getRandomIntegerBetween(1, competitors);
}
}while(!this.containsRow(seeds, row));
}
//TODO identify equal prefixes
for(int[] row : seeds){
for (int m = 0; m < associations.length; m++) {
System.arraycopy(associations[m], 0, currentAssociations[m], 0, associations[0].length);
}
int[][] currentPLT = new int[groups * flights][competitors / groups];
for (int flightIndex = maxConstantFlights; flightIndex < flights; flightIndex++) {
// TODO: change competitor number
int[][] flightColumn = this.createFlight(flights, groups, competitors, currentAssociations,
this.getRandomIntegerBetween(1, competitors));
for (int i=maxConstantFlights;i<maxConstantFlights+seeds[0].length;i++) {
//TODO: change competitor number
int[][] flightColumn = this.createFlight(flights, groups, competitors, currentAssociations, row[i-maxConstantFlights]);
currentAssociations = this.incrementAssociations(flightColumn, currentAssociations);
for (int m = 0; m < groups; m++) {
System.arraycopy(flightColumn[m], 0, currentPLT[(flightIndex * groups) + m], 0,
competitors / groups);
System.arraycopy(flightColumn[m], 0, currentPLT[(i * groups) + m], 0, competitors / groups);
}
}
for (int j = 0; j < currentAssociations.length; j++) {
@@ -399,6 +408,15 @@ public class PairingListTemplateImpl implements PairingListTemplate {
return bestPLT;
}
private boolean containsRow(int[][] seeds, int[] row) {
for(int[] line : seeds){
if(Arrays.toString(row).equals(Arrays.toString(line))){
return true;
}
}
return false;
}
/**
* Returns a matrix that describes how often the competitors competed on a boat. The matrix has the following
* dimension: <code>assignmentAssociations[competitors][boats]</code>.