Evaluate() method
760922
public void evaluate(PermutationSolution<Integer> solution){
    double fitness1   ;
    double fitness2   ;

    fitness1 = 0.0 ;
    fitness2 = 0.0 ;

    for (int i = 0; i < (numberOfCities - 1); i++) {
      int x ;
      int y ;

      x = solution.getVariableValue(i) ;
      y = solution.getVariableValue(i+1) ;

      fitness1 += distanceMatrix[x][y] ;
      fitness2 += costMatrix[x][y];
    }
    int firstCity ;
    int lastCity  ;

    firstCity = solution.getVariableValue(0) ;
    lastCity = solution.getVariableValue(numberOfCities - 1) ;

    fitness1 += distanceMatrix[firstCity][lastCity] ;
    fitness2 += costMatrix[firstCity][lastCity];

    solution.setObjective(0, fitness1);
    solution.setObjective(1, fitness2);
  }
1142070
@Override
  public void evaluate(DoubleSolution solution) {
    double x1,x2,x3,x4,x5,x6,x7;
    x1 = solution.getVariableValue(0);
    x2 = solution.getVariableValue(1);
    x3 = solution.getVariableValue(2);
    x4 = solution.getVariableValue(3);
    x5 = solution.getVariableValue(4);
    x6 = solution.getVariableValue(5);
    x7 = solution.getVariableValue(6);

    double f1 = 0.7854 * x1 *x2 *x2 * ((10*x3*x3)/3.0 + 14.933*x3 - 43.0934) -
        1.508*x1*(x6*x6 + x7*x7)+7.477*(x6*x6*x6 + x7*x7*x7) +
        0.7854*(x4*x6*x6 + x5*x7*x7);

    double aux = 745.0 * x4 / (x2 * x3);
    double f2 = Math.sqrt((aux*aux)+1.69e7) / (0.1*x6*x6*x6);

    solution.setObjective(0,f1);
    solution.setObjective(1,f2);

    this.evaluateConstraints(solution);
  }
852588
@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 zi,t1i,t2i,t3i,t4i,yi
    double[] z = new double[numberOfVariables];
    double[] t1 = new double[numberOfVariables];
    double[] t2 = new double[(numberOfVariables + K11) / 2];
    double[] t3 = new double[numberOfObjectives];
    double[] y = new double[numberOfObjectives];
    double sub1 = 0, sub2 = 0;
    int lb = 0, ub = 0;
    for (int i = 0; i < K11; i++) {
      z[i] = x[i] / (2 * i + 2);
      t1[i] = z[i];
      t2[i] = t1[i];
    }
    for (int i = K11; i < numberOfVariables; i++) {
      z[i] = x[i] / (2 * i + 2);
      t1[i] = Math.abs(z[i] - 0.35) / (Math.abs(Math.floor(0.35 - z[i]) + 0.35));
    }
    for (int i = K11; i < t2.length; i++) {
      t2[i] = (t1[2 * i - K11] + t1[2 * i - K11 + 1] + 2 * Math
          .abs(t1[2 * i - K11] - t1[2 * i - K11 + 1])) / 3;
    }
    sub2 = K11 / (numberOfObjectives - 1);
    for (int i = 0; i < numberOfObjectives - 1; i++) {
      sub1 = 0;
      lb = i * K11 / (numberOfObjectives - 1) + 1;
      ub = (i + 1) * K11 / (numberOfObjectives - 1);
      for (int j = lb - 1; j < ub; j++) {
        sub1 += t2[j];
      }
      t3[i] = sub1 / sub2;
    }
    lb = K11 + 1;
    ub = (numberOfVariables + K11) / 2;
    sub1 = 0;
    sub2 = (numberOfVariables - K11) / 2;
    for (int j = lb - 1; j < ub; j++) {
      sub1 += t2[j];
    }
    t3[numberOfObjectives - 1] = sub1 / sub2;
    for (int i = 0; i < numberOfObjectives - 1; i++) {
      y[i] = (t3[i] - 0.5) * Math.max(1, t3[numberOfObjectives - 1]) + 0.5;
    }
    y[numberOfObjectives - 1] = t3[numberOfObjectives - 1];

    // evaluate fm,fm-1,...,2,f1
    double subf1 = 1;
    f[numberOfObjectives - 1] =
        y[numberOfObjectives - 1] + 2 * numberOfObjectives * (1 - y[0] * Math
            .pow(Math.cos(5 * Math.PI * y[0]), 2));
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= (1 - Math.cos(Math.PI * y[numberOfObjectives - i - 2] / 2));
      f[i] = y[numberOfObjectives - 1] + 2 * (i + 1) * subf1 * (1 - Math
          .sin(Math.PI * y[numberOfObjectives - i - 1] / 2));
    }
    f[0] = y[numberOfObjectives - 1] + 2 * subf1 * (1 - Math
        .cos(Math.PI * y[numberOfObjectives - 2] / 2));

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
1291652
def evaluate(context, *args)
      {}.tap do |evaluated|
        each do |k,v|
          evaluated[k] = v.(context, *args)
        end
      end
    end
275823
public boolean evaluate(String sql, Object... objects) throws SQLException{
		return evaluate(Lists.newArrayList(objects), sql);
	}
816103
private Object eval(ExpressionContext expr) {
    Object res = expr;
    while(res instanceof ExpressionContext)
      res = ((ExpressionContext)res).accept(visitor);
    if(res instanceof LValue)
      res = ((LValue) res).get(expr);
    return res;
  }
281699
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables() ;

    double[] f = new double[getNumberOfObjectives()];
    double[] x = new double[numberOfVariables] ;

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

    double sum1 = 0.0;
    for (int i = 0; i < numberOfVariables; i++) {
      sum1 += StrictMath.pow(x[i] - (1.0 / StrictMath.sqrt((double) numberOfVariables)), 2.0);
    }
    double exp1 = StrictMath.exp((-1.0) * sum1);
    f[0] = 1 - exp1;

    double sum2 = 0.0;
    for (int i = 0; i < numberOfVariables; i++) {
      sum2 += StrictMath.pow(x[i] + (1.0 / StrictMath.sqrt((double) numberOfVariables)), 2.0);
    }
    double exp2 = StrictMath.exp((-1.0) * sum2);
    f[1] = 1 - exp2;

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
  }
853966
public Object evaluate(Object pContext,
                           VariableResolver pResolver,
                           Map functions,
                           String defaultPrefix,
                           Logger pLogger)
            throws ELException {
        Object value = mExpression.evaluate(pContext, pResolver, functions,
                defaultPrefix, pLogger);
        for (int i = 0; i < mOperators.size(); i++) {
            BinaryOperator operator = (BinaryOperator) mOperators.get(i);

            // For the And/Or operators, we need to coerce to a boolean
            // before testing if we shouldEvaluate
            if (operator.shouldCoerceToBoolean()) {
                value = Coercions.coerceToBoolean(value, pLogger);
            }

            if (operator.shouldEvaluate(value)) {
                Expression expression = (Expression) mExpressions.get(i);
                Object nextValue = expression.evaluate(pContext, pResolver,
                        functions, defaultPrefix,
                        pLogger);

                value = operator.apply(value, nextValue, pContext, pLogger);
            }
        }
        return value;
    }
145180
private void evaluateExpressions() throws JspException {
        Integer tempInt = null;

        if (dataSourceEL != null) {
            rawDataSource = (Object) ExpressionEvaluatorManager.evaluate(
                    "dataSource", dataSourceEL, Object.class, this, pageContext);
        }

        if (sqlEL != null) {
            sql = (String) ExpressionEvaluatorManager.evaluate("sql", sqlEL,
                    String.class, this, pageContext);
        }

        if (startRowEL != null) {
            tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
                    "startRow", startRowEL, Integer.class, this, pageContext);
            if (tempInt != null) {
                startRow = tempInt.intValue();
            }
        }

        if (maxRowsEL != null) {
            tempInt = (Integer) ExpressionEvaluatorManager.evaluate(
                    "maxRows", maxRowsEL, Integer.class, this, pageContext);
            if (tempInt != null) {
                maxRows = tempInt.intValue();
            }
        }
    }
756047
public Object evaluate()
  {
    if( !isCompileTimeConstant() )
    {
      return super.evaluate();
    }

    return evaluate( getType(), getLHS().evaluate(), getRHS().evaluate(), getLHS().getType(), getRHS().getType(), isAdditive(), false, !getType().equals( JavaTypes.STRING() ) );
  }
386506
public Object eval(String expression) {
    	expression = transform(expression);
    	Object result = calculate(expression);
        return result;
    }
276755
function(expression){
      var t = this,
          value = null;

      // Evaluate the expression
      try {
        value = eval(expression);
      } catch (e) {
        throw new Error('Unable to evaluate: ' + expression);
      }

      // Return the value
      return value;
    }
667527
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables() ;

    double[] f = new double[getNumberOfObjectives()];
    double[] x = new double[numberOfVariables] ;

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i) ;
    }
        
    f[0] = (x[0]-2.0)*(x[0]-2.0)/2.0 + 
             (x[1]+1.0)*(x[1]+1.0)/13.0 + 3.0;
        
    f[1] = (x[0]+ x[1]-3.0)*(x[0]+x[1]-3.0)/175.0 +
             (2.0*x[1]-x[0])*(2.0*x[1]-x[0])/17.0 -13.0;
        
    f[2] = (3.0*x[0]-2.0*x[1]+4.0)*(3.0*x[0]-2.0*x[1]+4.0)/8.0 + 
             (x[0]-x[1]+1.0)*(x[0]-x[1]+1.0)/27.0 + 15.0;
        
        
    for (int i = 0; i < getNumberOfObjectives(); i++) {
      solution.setObjective(i,f[i]);        
    }

    this.evaluateConstraints(solution);
  }
1258675
public void evaluate(BinarySolution solution) {
    double[] f = new double[solution.getNumberOfObjectives()];
    f[0] = 1 + u(solution.getVariableValue(0));
    double g = evalG(solution);
    double h = evalH(f[0], g);
    f[1] = h * g;

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
  }
772706
public final void evaluate() throws IOException {
    final ParserEvaluator evaluator = new ParserEvaluator(this.parser);
    evaluator.evaluate(this.testSamples);
    System.out.println(evaluator.getFMeasure());
  }
125622
def evaluate(self, m):
        """"""

        g = m.groupdict()
        if g["strings"]:
            self.evaluate_strings(g)
            self.line_num += g['strings'].count('\n')
        elif g["code"]:
            self.line_num += g["code"].count('\n')
        else:
            if g['block']:
                self.evaluate_block(g)
            elif g['start'] is None:
                self.evaluate_inline_tail(g)
            else:
                self.evaluate_inline(g)
            self.line_num += g['comments'].count('\n')
958034
public void evaluate(DoubleSolution solution){
    double aux, xi, xj;
    double[] fx = new double[getNumberOfObjectives()];
    double[] x = new double[getNumberOfVariables()];
    for (int i = 0; i < solution.getNumberOfVariables(); i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    fx[0] = 0.0;
    for (int var = 0; var < solution.getNumberOfVariables() - 1; var++) {
      xi = x[var] * x[var];
      xj = x[var + 1] * x[var + 1];
      aux = (-0.2) * Math.sqrt(xi + xj);
      fx[0] += (-10.0) * Math.exp(aux);
    }

    fx[1] = 0.0;

    for (int var = 0; var < solution.getNumberOfVariables(); var++) {
      fx[1] += Math.pow(Math.abs(x[var]), 0.8) +
        5.0 * Math.sin(Math.pow(x[var], 3.0));
    }

    solution.setObjective(0, fx[0]);
    solution.setObjective(1, fx[1]);
  }