/*
* File name: AgePlugin.java (package eas.users.sabrina.age)
* Author(s): sme
* Java version: 7.0
* Generation date: 23.08.2012 (15:00:08)
*
* (c) This file and the EAS (Easy Agent Simulation) framework containing it
* is protected by Creative Commons by-nc-sa license. Any altered or
* further developed versions of this file have to meet the agreements
* stated by the license conditions.
*
* In a nutshell
* -------------
* You are free:
* - to Share -- to copy, distribute and transmit the work
* - to Remix -- to adapt the work
*
* Under the following conditions:
* - Attribution -- You must attribute the work in the manner specified by the
* author or licensor (but not in any way that suggests that they endorse
* you or your use of the work).
* - Noncommercial -- You may not use this work for commercial purposes.
* - Share Alike -- If you alter, transform, or build upon this work, you may
* distribute the resulting work only under the same or a similar license to
* this one.
*
* + Detailed license conditions (Germany):
* http://creativecommons.org/licenses/by-nc-sa/3.0/de/
* + Detailed license conditions (unported):
* http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en
*
* This header must be placed in the beginning of any version of this file.
*/
package eas.users.other.sabrina.age;
import java.util.ArrayList;
import java.util.List;
import eas.plugins.AbstractDefaultPlugin;
import eas.plugins.PluginProperties;
import eas.simulation.Wink;
import eas.simulation.event.EASEvent;
import eas.simulation.spatial.sim2D.marbSimulation.EnvironmentEA;
import eas.startSetup.ParCollection;
import eas.startSetup.SingleParameter;
import eas.startSetup.parameterDatatypes.Datatypes;
/**
* Plugin, das die für die Verwendung der Age-based Stabilization notwendigen Parameter
* einführt und Statistiken schreibt
* @author sme
*/
@PluginProperties(pluginIsHidden = true)
public class AgePlugin extends AbstractDefaultPlugin<EnvironmentEA> {
/**
*
*/
private static final long serialVersionUID = -6658368722072542944L;
/**
* Die generischen Parameter beziehen sich auf Dateinamen und
* Bildwiederholraten der Videos, die im GIF- bzw. AVI-Format gespeichert
* werden.
*
* @return Liste der Parameter.
*/
@Override
public List<SingleParameter> getParameters() {
ArrayList<SingleParameter> liste = new ArrayList<SingleParameter>();
liste.add(new SingleParameter(
"ageMutFunction",
Datatypes.STRING,
"LinearAgeMut",
"How the probability for mutation decreases with increasing age.",
this.id().toUpperCase()));
liste.add(new SingleParameter(
"ageDecrement",
Datatypes.BOOLEAN,
true,
"If the age is decremented after a semantic mutation (or reset)",
this.id().toUpperCase()));
liste.add(new SingleParameter(
"reachProb",
Datatypes.DOUBLE,
0.2,
"Probability with which a condition has to be fullfilled to be reachable",
this.id().toUpperCase()));
return liste;
}
@Override
public String id() {
// TODO Auto-generated method stub
return "agePlugin";
}
@Override
public List<String> getRequiredPlugins() {
// TODO Auto-generated method stub
return null;
}
@Override
public List<String> getSupportedPlugins() {
// TODO Auto-generated method stub
return null;
}
@Override
public void runBeforeSimulation(EnvironmentEA env, ParCollection params) {
// TODO Auto-generated method stub
}
@Override
public void runAfterSimulation(EnvironmentEA env, ParCollection params) {
// TODO Auto-generated method stub
}
@Override
public void runDuringSimulation(EnvironmentEA env, Wink currentSimTime,
ParCollection params) {
// TODO Auto-generated method stub
}
@Override
public void handleEvent(EASEvent event, EnvironmentEA env,
Wink lastSimTime, ParCollection params) {
// TODO Auto-generated method stub
}
@Override
public void onSimulationResumed(EnvironmentEA env, Wink resumeTime,
ParCollection params) {
}
}