Current version
This project was created to automate the Multi-Objective Optimization Approach for PLA Design (MOA4PLA).
Before to compile the code, you need to install the following softwares on your PC:
This section show the step-by-step that you should follow to build the OPLA-Tool.
mkdir opla-tool
cd opla-tool
git clone https://github.com/otimizes/OPLA-Tool.git
mvn clean install Obs: If it is the first run, execute **mvn clean** first to install local dependencies
java -jar modules/opla-api/target/opla-api-1.0.0-SNAPSHOT.jar
<Click here to see how using the tool>
mvn eclipse:clean
Import into eclipse IDE using Maven Project Type
File > Import > Maven > Exists Maven Project > Select the directory created for build OPLA-Tool
Make Fork this project and create a Pull Request with your changes
<Click here to see how to contribute>.
<Click here to access the backend documentation>
<Click here to access the frontend documentation>
@Entity
@Table(name = "myobj_obj")
public class MYOBJObjectiveFunction extends ObjectiveFunctionDomain {
private static final long serialVersionUID = 1L;
@Column(name = "value1")
private Double value1;
@Column(name = "value2")
private Double value2;
public MyObjectiveFunction(String idSolution, Execution execution, Experiment experiment) {
super(idSolution, execution, experiment);
}
// GETTERS AND SETTERS
}
Create the resource inside the opla-api > resource > objectivefunctions.
public class MYOBJ extends ObjectiveFunctionImplementation {
public MYOBJ(Architecture architecture) {
super(architecture);
//Code as Example...
double aclassFitness = 0.0;
ClassDependencyIn CDepIN = new ClassDependencyIn(architecture);
ClassDependencyOut CDepOUT = new ClassDependencyOut(architecture);
aclassFitness = CDepIN.getResults() + CDepOUT.getResults();
//Always set the results and access using the getResults();
this.setResults(aclassFitness);
}
}
public enum ObjectiveFunctions implements ObjectiveFunctionsLink {
// ...
MYOBJ {
@Override
public Double evaluate(Architecture architecture) {
return new MYOBJ(architecture).getResults();
}
@Override
public ACLASSObjectiveFunction build(String idSolution, Execution Execution, Experiment experiment,
Architecture arch) {
MYOBJObjectiveFunction myobj = new MYOBJObjectiveFunction(idSolution, Execution, experiment);
myobj.setSumClassesDepIn(Metrics.SumClassDepIn.evaluate(arch));
myobj.setSumClassesDepOut(Metrics.SumClassDepOut.evaluate(arch));
return aclass;
}
}
}