diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14c62e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +**/.settings +**/.classpath +**/.project diff --git a/es.optsicom.lib.analysis/.gitignore b/es.optsicom.lib.analysis/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/es.optsicom.lib.analysis/.gitignore @@ -0,0 +1 @@ +/target diff --git a/es.optsicom.lib.analysis/pom.xml b/es.optsicom.lib.analysis/pom.xml index e5813f7..7eb7488 100644 --- a/es.optsicom.lib.analysis/pom.xml +++ b/es.optsicom.lib.analysis/pom.xml @@ -2,7 +2,7 @@ es.optsicom.lib.parent es.optsicom.lib - 0.11.0-SNAPSHOT + 0.13.0-SNAPSHOT ../es.optsicom.lib.parent 4.0.0 @@ -73,10 +73,12 @@ org.eclipse.persistence eclipselink + 2.5.1 org.eclipse.persistence javax.persistence + 2.1.0 mysql @@ -119,9 +121,7 @@ es.optsicom.lib es.optsicom.lib.util - 0.11.0-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT junit diff --git a/es.optsicom.lib.approx/.gitignore b/es.optsicom.lib.approx/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/es.optsicom.lib.approx/.gitignore @@ -0,0 +1 @@ +/target diff --git a/es.optsicom.lib.approx/pom.xml b/es.optsicom.lib.approx/pom.xml index bb70191..ea3ce62 100644 --- a/es.optsicom.lib.approx/pom.xml +++ b/es.optsicom.lib.approx/pom.xml @@ -2,7 +2,7 @@ es.optsicom.lib.parent es.optsicom.lib - 0.11.0-SNAPSHOT + 0.13.0-SNAPSHOT ../es.optsicom.lib.parent 4.0.0 @@ -11,23 +11,15 @@ jar - - org.eclipse.persistence - javax.persistence - es.optsicom.lib es.optsicom.lib.analysis - 0.11.0-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT es.optsicom.lib es.optsicom.lib - 0.11.0-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT \ No newline at end of file diff --git a/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/algorithm/mo/AbstractApproxMOMethod.java b/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/algorithm/mo/AbstractApproxMOMethod.java index 3d94775..ffe6b9c 100644 --- a/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/algorithm/mo/AbstractApproxMOMethod.java +++ b/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/algorithm/mo/AbstractApproxMOMethod.java @@ -11,6 +11,7 @@ package es.optsicom.lib.approx.algorithm.mo; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import es.optsicom.lib.AbstractMethod; @@ -79,4 +80,7 @@ public void newBestSolutionFound(es.optsicom.lib.approx.improvement.ImprovementM this.setIfNonDominated(newBestSolution); }; + public List getBestSolutions() { + return Collections.unmodifiableList(bestSolutions); + } } diff --git a/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/improvement/AbstractImprovementMethod.java b/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/improvement/AbstractImprovementMethod.java index fa1c234..ca4b923 100644 --- a/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/improvement/AbstractImprovementMethod.java +++ b/es.optsicom.lib.approx/src/main/java/es/optsicom/lib/approx/improvement/AbstractImprovementMethod.java @@ -37,7 +37,10 @@ public boolean improveSolution(S solution) { } public final boolean improveSolution(S solution, long duration) { - + + double value = solution.getWeight(); +// System.out.print("Value=" + value); + lastImprovVisitedSolutions = 0; this.improveApplied = false; @@ -50,6 +53,12 @@ public final boolean improveSolution(S solution, long duration) { try { this.improveApplied = internalImproveSolution(solution, duration); } catch(TimeLimitException e){} + +// if(solution.getWeight() > value) { +// throw new Error("WTF, empeora...."); +// } + +// System.out.println(" New value=" + solution.getWeight()); return this.improveApplied; } diff --git a/es.optsicom.lib.exact/.gitignore b/es.optsicom.lib.exact/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/es.optsicom.lib.exact/.gitignore @@ -0,0 +1 @@ +/target diff --git a/es.optsicom.lib.exact/pom.xml b/es.optsicom.lib.exact/pom.xml index 8ab0df5..ce83c68 100644 --- a/es.optsicom.lib.exact/pom.xml +++ b/es.optsicom.lib.exact/pom.xml @@ -3,7 +3,7 @@ es.optsicom.lib.parent es.optsicom.lib - 0.10.1-SNAPSHOT + 0.13.0-SNAPSHOT ../es.optsicom.lib.parent 4.0.0 @@ -14,16 +14,12 @@ es.optsicom.lib es.optsicom.lib - 0.10.1-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT es.optsicom.lib es.optsicom.lib.analysis - 0.10.1-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT @@ -38,18 +34,14 @@ es.optsicom.lib es.optsicom.lib.util - 0.10.1-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT es.optsicom.lib es.optsicom.lib.approx - 0.10.1-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT \ No newline at end of file diff --git a/es.optsicom.lib.parent/pom.xml b/es.optsicom.lib.parent/pom.xml index 0b5da62..a92ad1b 100644 --- a/es.optsicom.lib.parent/pom.xml +++ b/es.optsicom.lib.parent/pom.xml @@ -3,7 +3,7 @@ 4.0.0 es.optsicom.lib es.optsicom.lib.parent - 0.12.0-SNAPSHOT + 0.13.0-SNAPSHOT pom @@ -33,18 +33,18 @@ www.optsicom.es - - - releases - Sidelab Releases - http://build.sidelab.es:8080/archiva/repository/releases/ - - - snapshots - Sidelab Snapshots - http://build.sidelab.es:8080/archiva/repository/snapshots/ - - + + + + + + + + + + + + @@ -59,16 +59,6 @@ - - org.eclipse.persistence - javax.persistence - 2.0.3 - - - org.eclipse.persistence - eclipselink - 2.1.0 - junit junit diff --git a/es.optsicom.lib.util/.gitignore b/es.optsicom.lib.util/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/es.optsicom.lib.util/.gitignore @@ -0,0 +1 @@ +/target diff --git a/es.optsicom.lib.util/pom.xml b/es.optsicom.lib.util/pom.xml index 3e59b78..e8f32ad 100644 --- a/es.optsicom.lib.util/pom.xml +++ b/es.optsicom.lib.util/pom.xml @@ -2,7 +2,7 @@ es.optsicom.lib.parent es.optsicom.lib - 0.11.0-SNAPSHOT + 0.13.0-SNAPSHOT ../es.optsicom.lib.parent 4.0.0 diff --git a/es.optsicom.lib/.gitignore b/es.optsicom.lib/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/es.optsicom.lib/.gitignore @@ -0,0 +1 @@ +/target diff --git a/es.optsicom.lib/pom.xml b/es.optsicom.lib/pom.xml index a9db22c..39e7511 100644 --- a/es.optsicom.lib/pom.xml +++ b/es.optsicom.lib/pom.xml @@ -3,7 +3,7 @@ es.optsicom.lib.parent es.optsicom.lib - 0.11.0-SNAPSHOT + 0.13.0-SNAPSHOT ../es.optsicom.lib.parent 4.0.0 @@ -14,9 +14,7 @@ es.optsicom.lib es.optsicom.lib.analysis - 0.11.0-SNAPSHOT - jar - compile + 0.13.0-SNAPSHOT com.google.guava diff --git a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MOAbstractMethod.java b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MOAbstractMethod.java index dd4af87..75de7b7 100644 --- a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MOAbstractMethod.java +++ b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MOAbstractMethod.java @@ -1,14 +1,12 @@ package es.optsicom.lib.multiobjective; -import es.optsicom.lib.AbstractMethod; import es.optsicom.lib.Instance; -import es.optsicom.lib.Solution; import es.optsicom.lib.SolutionFactory; import es.optsicom.lib.util.Id; import es.optsicom.lib.util.description.DescriptiveHelper; import es.optsicom.lib.util.description.Properties; -public abstract class MOAbstractMethod implements MultiObjectiveMethod { +public abstract class MOAbstractMethod, I extends Instance> implements MultiObjectiveMethod { protected SolutionFactory factory; diff --git a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveMethod.java b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveMethod.java index e2ef2d7..285b5e4 100644 --- a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveMethod.java +++ b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveMethod.java @@ -2,12 +2,10 @@ import es.optsicom.lib.Instance; import es.optsicom.lib.Method; -import es.optsicom.lib.Solution; -import es.optsicom.lib.experiment.ExecutionResult; import es.optsicom.lib.multiobjective.experiment.MOExecutionResult; -public interface MultiObjectiveMethod extends Method { +public interface MultiObjectiveMethod, I extends Instance> extends Method { public boolean isMultiObjective(); diff --git a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveSolution.java b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveSolution.java index 139ebf3..49be785 100644 --- a/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveSolution.java +++ b/es.optsicom.lib/src/main/java/es/optsicom/lib/multiobjective/MultiObjectiveSolution.java @@ -1,12 +1,5 @@ package es.optsicom.lib.multiobjective; -import java.util.ArrayList; -import java.util.List; - -import com.google.common.base.Function; - -import es.optsicom.lib.Instance; -import es.optsicom.lib.Solution; import es.optsicom.lib.util.BestMode; public interface MultiObjectiveSolution {