Evaluate() method
177004
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables() ;

    double[] x = new double[numberOfVariables] ;

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    double result = 0.0;
    double a = 10.0;
    double w = 2 * Math.PI;

    for (int i = 0; i < numberOfVariables; i++) {
      result += x[i] * x[i] - a * Math.cos(w * x[i]);
    }
    result += a * numberOfVariables;

    solution.setObjective(0, result);
  }
617308
@Override
	public Object evaluate(Message message) throws JMSException
    {
        Number value = leftOperand.evaluateNumeric(message);
        Number lowerBound = lowerBoundOperand.evaluateNumeric(message);
        Number upperBound = upperBoundOperand.evaluateNumeric(message);
        if (value == null || lowerBound == null || upperBound == null)
            return null;
        
        return ArithmeticUtils.greaterThanOrEquals(value, lowerBound).booleanValue() &&
               ArithmeticUtils.lessThanOrEquals(value, upperBound).booleanValue() ?
               Boolean.TRUE : Boolean.FALSE;
    }
1249911
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables() ;

    double[] x = new double[numberOfVariables] ;

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    double sum = 0.0;
    double mult = 1.0;
    double d = 4000.0;
    for (int var = 0; var < numberOfVariables; var++) {
      sum += x[var] * x[var];
      mult *= Math.cos(x[var] / Math.sqrt(var + 1));
    }

    solution.setObjective(0, 1.0 / d * sum - mult + 1.0);
  }
293542
public void evaluate(DoubleSolution solution) {
    double[] f = new double[getNumberOfObjectives()];

    double g = this.evalG(solution);
    f[0] = (1 + g) * solution.getVariableValue(0) * solution.getVariableValue(1);
    f[1] = (1 + g) * solution.getVariableValue(0) * (1 - solution.getVariableValue(1));
    f[2] = (1 + g) * (1 - solution.getVariableValue(0));

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
    solution.setObjective(2, f[2]);
  }
47434
public Object eval(Scope scope) {
		if (index == null) {
			return assignVariable(scope);
		} else {
			return assignElement(scope);
		}
	}
555261
public Object evaluate()
  {
    if( !isCompileTimeConstant() )
    {
      return super.evaluate();
    }

    return evaluate( getType(), getLHS().evaluate(), getRHS().evaluate(), getLHS().getType(), getRHS().getType(), getOperator().charAt( 0 ), false );
  }
861873
def POST_evaluate(self) -> None:
        
        for name, value in self._inputs.items():
            result = eval(value)
            self._outputs[name] = objecttools.flatten_repr(result)
1079597
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = solution.getNumberOfVariables();
    int numberOfObjectives = solution.getNumberOfObjectives();

    double[] x = new double[numberOfVariables];
    double[] f = new double[numberOfObjectives];

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i);
    }

    double g = 0, subf1 = 1, subf3;
    for (int j = numberOfObjectives - 1; j < numberOfVariables; j++) {
      g += (Math.pow(x[j] - 0.5, 2));
    }
    subf3 = 1 + g;

    f[numberOfObjectives - 1] = x[0] * subf3;
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= x[numberOfObjectives - i - 2];
      f[i] = subf3 * (1 - subf1 * (1 - x[numberOfObjectives - i - 1]));
    }
    f[0] = (1 - subf1 * x[numberOfObjectives - 2]) * subf3;

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
862246
@Override
  public void evaluate(DoubleSolution solution) {

    int numberOfVariables = solution.getNumberOfVariables();
    int numberOfObjectives = solution.getNumberOfObjectives();

    double[] x = new double[numberOfVariables];
    double[] f = new double[numberOfObjectives];

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i);
    }
    // evaluate f
    for (int i = 0; i < numberOfObjectives; i++) {
      f[i] = Math.sqrt(Math.pow(const8[i][0] - x[0], 2) + Math.pow(const8[i][1] - x[1], 2));
    }

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
363394
@Override
	public Object evaluate(Message message) throws JMSException
    {
        Number value = operand.evaluateNumeric(message);
        if (value == null)
            return null;
        
        return ArithmeticUtils.minus(value);
    }
1100067
def evaluate(context, *args, &block)
      self.result = if block
          context.define_singleton_method(:__callback__, &self)
          ret = context.send :__callback__, *args, &block
          context.class_eval { send :remove_method, :__callback__ }
          ret
        else
          context.instance_exec(*args, &self)
        end
    end
913304
public void evaluate(Tree guess, Tree gold, PrintWriter pw) {
    evaluate(guess, gold, pw, 1.0);
  }
463112
@Override
  public void evaluate(DoubleSolution solution) {

    int numberOfVariables = solution.getNumberOfVariables();
    int numberOfObjectives = solution.getNumberOfObjectives();

    double[] x = new double[numberOfVariables];
    double[] f = new double[numberOfObjectives];

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i);
    }
    double g = 0;
    // evaluate g
    for (int i = numberOfObjectives - 1; i < numberOfVariables; i++) {
      g += Math.pow(x[i] - 0.5, 2);
    }
    double subf1 = 1, subf3 = 1 + g;
    // evaluate fm,fm-1,...2,f1
    f[numberOfObjectives - 1] =
        2 * Math.pow(Math.sin(Math.PI * Math.pow(x[0], 100) / 2) * subf3, 1);
    // fi=2^i*(subf1*subf2)*(subf3)
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= Math.cos(Math.PI * Math.pow(x[numberOfObjectives - i - 2], 100) / 2);
      f[i] = const5[numberOfObjectives - i - 1] * Math.pow(
          subf1 * Math.sin(Math.PI * Math.pow(x[numberOfObjectives - i - 1], 100) / 2) * subf3, 1);
    }
    f[0] = const5[numberOfObjectives - 1] * Math
        .pow(subf1 * (Math.cos(Math.PI * Math.pow(x[numberOfObjectives - 2], 100) / 2)) * subf3,
            1);

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }

  }
1329716
@Override
  public void evaluate(DoubleSolution solution) {
    double [] f = new double[getNumberOfObjectives()];
    f[0] = solution.getVariableValue(0) ;
    f[1] = (1.0 + solution.getVariableValue(1))/solution.getVariableValue(0);
    
    solution.setObjective(0,f[0]);
    solution.setObjective(1,f[1]);

    this.evaluateConstraints(solution);
  }
959058
public final void evaluate() {
    final POSEvaluator evaluator = new POSEvaluator(this.posTagger);
    try {
      evaluator.evaluate(this.testSamples);
    } catch (IOException e) {
      e.printStackTrace();
    }
    System.out.println(evaluator.getWordAccuracy());
  }
259412
function(expression){
      var t = this,
          value = null;

      // Evaluate the expression
      try {
        value = eval(expression);
      } catch (e) {
        var err = 'Unable to evaluate expression: "' + expression + '"';
        logger.error('evaluate', err);
        throw new Error(err);
      }

      // Return the value
      return value;
    }
1155330
public void evaluate(DoubleSolution solution) {
    float[] variables = new float[getNumberOfVariables()];
    double[] x = new double[getNumberOfVariables()];

    for (int i = 0; i < getNumberOfVariables(); i++) {
      x[i] = solution.getVariableValue(i);
    }

    for (int i = 0; i < getNumberOfVariables(); i++) {
      variables[i] = (float) x[i] ;
    }

    float[] sol2 = evaluate(variables);

    for (int i = 0; i < sol2.length; i++) {
      solution.setObjective(i, sol2[i]);
    }
  }