Example usage for org.apache.commons.configuration Configuration getDouble

List of usage examples for org.apache.commons.configuration Configuration getDouble

Introduction

In this page you can find the example usage for org.apache.commons.configuration Configuration getDouble.

Prototype

double getDouble(String key);

Source Link

Document

Get a double associated with the given configuration key.

Usage

From source file:es.udc.gii.common.eaf.benchmark.multiobjective.sch1.Sch1_Objective_1.java

@Override
public void configure(Configuration conf) {
    super.configure(conf);
    if (conf.containsKey("MAX")) {
        this.MAX = conf.getDouble("MAX");
    } else {//w  ww . j  a v a  2  s  .c  om
        (new ConfWarning("Sch1_Objective_1.MAX", MAX)).warn();
    }
}

From source file:es.udc.gii.common.eaf.benchmark.multiobjective.sch1.Sch1_Objective_2.java

@Override
public void configure(Configuration conf) {
    super.configure(conf);
    if (conf.containsKey("MAX")) {
        this.MAX = conf.getDouble("MAX");
    } else {// w ww.j  a v  a  2s  .c o  m
        (new ConfWarning("Sch1_Objective_2.MAX", MAX)).warn();
    }
}

From source file:es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.real_code.BLXCrossOver.java

@Override
public void configure(Configuration conf) {
    super.configure(conf);
    this.alfa = conf.getDouble("Alfa");
}

From source file:es.udc.gii.common.eaf.stoptest.GeneDifferenceConvergence.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("MaxDifference")) {
        this.maxDifference = conf.getDouble("MaxDifference");
    } else {//from  w  w w  .  j  av  a 2 s .c  o m
        (new ConfWarning("MaxDifference", 10e-6)).warn();
    }
}

From source file:es.udc.gii.common.eaf.problem.constraint.EqualityConstraint.java

@Override
public void configure(Configuration conf) {
    super.configure(conf);
    if (conf.containsKey("Threshold")) {
        this.threshold = conf.getDouble("Threshold");
    } else {/*  w w w .j a va 2  s  .  c  om*/
        ConfWarning w = new ConfWarning("Threshold", this.threshold);
        w.warn();
    }
}

From source file:es.udc.gii.common.eaf.plugin.parameter.RandomValue.java

/**
 * Configures this class.//  w  w  w.j av a  2 s .  c  o m
 * @param conf
 */
@Override
public void configure(Configuration conf) {
    if (conf.containsKey("UpperBound")) {
        setUpperBound(conf.getDouble("UpperBound"));
    } else {
        setUpperBound(1);
    }

    if (conf.containsKey("LowerBound")) {
        setLowerBound(conf.getDouble("LowerBound"));
    } else {
        setLowerBound(-1);
    }
}

From source file:es.udc.gii.common.eaf.stoptest.GeneRateConvergence.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("MaxDifference")) {
        this.maxDifference = conf.getDouble("MaxDifference");
    } else {// www .j  a  v a2s  .  c o  m
        (new ConfWarning("MaxDifference", 10e-6)).warn();
    }

    if (conf.containsKey("ConvergenceRate")) {
        this.convergenceRate = conf.getDouble("ConvergenceRate");
    } else {
        (new ConfWarning("ConvergenceRate", 0.9)).warn();
    }
}

From source file:es.udc.gii.common.eaf.log.FEsToReachValueLogTool.java

@Override
public void configure(Configuration conf) {

    super.configure(conf);
    if (conf.containsKey("Value")) {
        this.value = conf.getDouble("Value");
        this.to_compare = new Individual();
        this.to_compare.setFitness(value);
    } else {//from   w w w .j  a v a 2 s .c  om
        ConfWarning w = new ConfWarning("Value", this.value);
        w.warn();
    }
}

From source file:es.udc.gii.common.eaf.algorithm.operator.selection.LinearRankingSelection.java

@Override
public void configure(Configuration conf) {
    super.configure(conf);
    if (conf.containsKey("Max")) {
        this.max = conf.getDouble("Max");
    } else {/*from  w w w . j  a  va2 s . c o  m*/
        ConfWarning w = new ConfWarning("Max", this.max);
    }
}

From source file:es.udc.gii.common.eaf.algorithm.operator.reproduction.crossover.CrossOverOperator.java

@Override
public void configure(Configuration conf) {
    if (conf.containsKey("Probability")) {
        this.probability = conf.getDouble("Probability");
    } else {// www .j a v  a2  s.c o  m
        ConfWarning w = new ConfWarning("Probability", this.probability);
        w.warn();
    }
}