Skip to content

Commit

Permalink
1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jlrisco committed May 27, 2021
1 parent 909a973 commit 67b91b9
Show file tree
Hide file tree
Showing 66 changed files with 419 additions and 298 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:buster

RUN apt-get clean
RUN apt-get update --fix-missing
RUN apt-get update
#RUN sed -i 's:^path-exclude=/usr/share/man:#path-exclude=/usr/share/man:' /etc/dpkg/dpkg.cfg.d/excludes
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales bash-completion whois time wget git maven default-jdk

# LOCALE
RUN sed -i '/es_ES.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG es_ES.UTF-8
ENV LANGUAGE es_ES:es
ENV LC_ALL es_ES.UTF-8

# USUARIO
RUN useradd -m usuario -p sa5u2O0Xjsufg
#RUN usermod -aG sudo usuario

USER usuario
WORKDIR /home/usuario
16 changes: 16 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "eco-rwa",
"dockerFile": "Dockerfile",
"settings": {
"workbench.colorTheme": "Cobalt2",
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"vscjava.vscode-java-pack",
"redhat.vscode-xml",
"redhat.fabric8-analytics",
"esbenp.prettier-vscode",
"wesbos.theme-cobalt2"
]
}

22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Board",
"request": "launch",
"mainClass": "eco.lib.examples.floorplan.Board",
"projectName": "eco-rwa"
},
{
"type": "java",
"name": "Launch Current File",
"request": "launch",
"mainClass": "${file}",
"projectName": "eco-rwa"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "verify",
"type": "shell",
"command": "mvn -B verify",
"group": "build"
},
{
"label": "test",
"type": "shell",
"command": "mvn -B test",
"group": "test"
}
]
}
43 changes: 33 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hero-rwa</groupId>
<artifactId>hero-rwa</artifactId>
<version>1.20201205</version>
<groupId>eco-rwa</groupId>
<artifactId>eco-rwa</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<repositories>
<!-- To download GITHUB releases as dependencies -->
<repository>
Expand All @@ -14,11 +14,11 @@
</repository>
</repositories>
<dependencies>
<!-- xDEVS -->
<!-- ECO -->
<dependency>
<groupId>com.github.iscar-ucm</groupId>
<artifactId>hero</artifactId>
<version>1.20191121</version>
<artifactId>eco</artifactId>
<version>1.1.0</version>
</dependency>
<!-- JGRAPHX -->
<dependency>
Expand All @@ -29,7 +29,30 @@
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>15</maven.compiler.source>
<maven.compiler.target>15</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</project>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import com.mxgraph.model.mxCell;
import com.mxgraph.model.mxGeometry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import java.io.File;
import java.util.ArrayList;
Expand All @@ -31,7 +31,7 @@ public class CodifSP {
protected ArrayList<Sequence> arrayGammaN = new ArrayList<Sequence>();
protected ArrayList<Sequence> arrayGammaP = new ArrayList<Sequence>();

public void CodifSP(){
public CodifSP(){
/* Constructor de la clase
* El resultado son dos 'arraylist'. Uno para la GammaN y otro para la P
* 1.Se lee el archivo de la variable 'nombre_archivo' y se genera una
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Logger;

import hero.core.algorithm.metaheuristic.moga.NSGAII;
import hero.core.operator.mutation.SwapMutationDouble;
import hero.core.problem.Solution;
import hero.core.problem.Solutions;
import hero.core.problem.Variable;
import hero.lib.examples.floorplan.util.CycleCrossoverDouble;
import hero.lib.examples.floorplan.util.EliteSelectorOperator;
import eco.core.algorithm.metaheuristic.moga.NSGAII;
import eco.core.operator.mutation.SwapMutationDouble;
import eco.core.problem.Solution;
import eco.core.problem.Solutions;
import eco.core.problem.Variable;
import eco.lib.examples.floorplan.util.CycleCrossoverDouble;
import eco.lib.examples.floorplan.util.EliteSelectorOperator;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import hero.core.problem.Problem;
import hero.core.problem.Solution;
import hero.core.problem.Solutions;
import hero.core.problem.Variable;
import java.util.ArrayList;
import java.util.Collections;

import eco.core.problem.Problem;
import eco.core.problem.Solution;
import eco.core.problem.Solutions;
import eco.core.problem.Variable;


/**
*
Expand All @@ -40,8 +41,8 @@ public class CodifSPGAproblem extends Problem<Variable<Integer>> {
protected ArrayList<Integer> idPos;

//-----------------------------------------------------------Constructor
public CodifSPGAproblem(FloorplanConfiguration cfgOK,
FloorplanConfiguration cfgTest,
public CodifSPGAproblem(FloorplanConfiguration cfgArgOK,
FloorplanConfiguration cfgArgTest,
int layer,
ArrayList<Integer> idNeg,
ArrayList<Integer> idPos) {
Expand All @@ -56,8 +57,8 @@ public CodifSPGAproblem(FloorplanConfiguration cfgOK,
* Each match should add the component's id to the arraylist 'ids'
*/
//Después ya podemos inicializar los miembros de esta clase
this.cfgOK = cfgOK;
this.cfgTest = cfgTest;
cfgOK = cfgArgOK;
cfgTest = cfgArgTest;
this.layer = layer;
this.idNeg = idNeg; //for 'newRandomSetOfSolutions'
this.idPos = idPos; //for 'newRandomSetOfSolutions'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import java.util.Comparator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import hero.core.operator.mutation.MutationOperator;
import hero.core.problem.Solution;
import hero.core.problem.Variable;
import hero.core.util.random.RandomGenerator;
import eco.core.operator.mutation.MutationOperator;
import eco.core.problem.Solution;
import eco.core.problem.Variable;
import eco.core.util.random.RandomGenerator;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import hero.core.algorithm.metaheuristic.moga.NSGAII;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;

import hero.core.operator.crossover.CycleCrossover;
import hero.core.operator.selection.BinaryTournamentNSGAII;
import hero.core.problem.Problem;
import hero.core.problem.Solution;
import hero.core.problem.Solutions;
import hero.core.util.logger.HeroLogger;
import hero.core.util.random.RandomGenerator;
import eco.core.algorithm.metaheuristic.moga.NSGAII;
import eco.core.operator.crossover.CycleCrossover;
import eco.core.operator.selection.BinaryTournamentNSGAII;
import eco.core.problem.Problem;
import eco.core.problem.Solution;
import eco.core.problem.Solutions;
import eco.core.util.logger.HeroLogger;
import eco.core.util.random.RandomGenerator;

public class FloorplanAirChannel extends Problem<ComponentVariable> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import java.io.File;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import java.io.BufferedWriter;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import hero.core.algorithm.metaheuristic.moga.NSGAII;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -32,10 +31,12 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import hero.core.operator.crossover.CycleCrossover;
import hero.core.operator.selection.BinaryTournamentNSGAII;
import hero.lib.examples.floorplan.util.MultiwayTree;
import hero.lib.examples.floorplan.util.Solution;
import eco.core.algorithm.metaheuristic.moga.NSGAII;
import eco.core.operator.crossover.CycleCrossover;
import eco.core.operator.selection.BinaryTournamentNSGAII;
import eco.lib.examples.floorplan.util.MultiwayTree;
import eco.lib.examples.floorplan.util.Solution;

import java.util.Collection;

/**
Expand Down Expand Up @@ -299,7 +300,7 @@ private void randomEncoding() {
NSGAII<ComponentVariable> algorithm = new NSGAII<ComponentVariable>(problem, 1, 0, new ComponentVariable.ComponentMutation(1.0 / problem.getNumberOfVariables()), new CycleCrossover<>(), new BinaryTournamentNSGAII<ComponentVariable>());
algorithm.initialize();
// Take one individual from population where coordinates have been established.
hero.core.problem.Solution<ComponentVariable> indiv = algorithm.getPopulation().get(0);
eco.core.problem.Solution<ComponentVariable> indiv = algorithm.getPopulation().get(0);

// Modify cfg coordinates:
ArrayList<ComponentVariable> variables = indiv.getVariables();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
* Contributors:
* - José Luis Risco Martín
*/
package hero.lib.examples.floorplan;
package eco.lib.examples.floorplan;

import hero.lib.examples.floorplan.util.SimulatedAnnealingSolver;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
Expand All @@ -28,6 +27,8 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import eco.lib.examples.floorplan.util.SimulatedAnnealingSolver;

/**
* Class implementing the simulated annealing technique for problem
* solving.
Expand Down
Loading

0 comments on commit 67b91b9

Please sign in to comment.