Evaluate() method
430885
@Override
    public void evaluate(BinarySolution solution) {
    int counterOnes;
    int counterZeroes;

    counterOnes = 0;
    counterZeroes = 0;

    BitSet bitset = solution.getVariableValue(0) ;

    for (int i = 0; i < bitset.length(); i++) {
      if (bitset.get(i)) {
        counterOnes++;
      } else {
        counterZeroes++;
      }
    }

    // OneZeroMax is a maximization problem: multiply by -1 to minimize
    solution.setObjective(0, -1.0 * counterOnes);
    solution.setObjective(1, -1.0 * counterZeroes);
  }
732532
@Override
	public Object evaluate(Message message) throws JMSException
    {
        Object operandValue = operand.evaluate(message);
        return operandValue == null ? Boolean.TRUE : Boolean.FALSE;
    }
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]);
    }
  }
607108
private void evaluateExpressions() throws JspException {
        Object obj = null;

        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        // 'value' attribute
        if (value_ != null) {
            value = (String) ExpressionEvaluatorManager.evaluate(
                    "value", value_, String.class, this, pageContext);
        }

        // 'type' attribute
        if (type_ != null) {
            type = (String) ExpressionEvaluatorManager.evaluate(
                    "type", type_, String.class, this, pageContext);
        }

        // 'pattern' attribute
        if (pattern_ != null) {
            pattern = (String) ExpressionEvaluatorManager.evaluate(
                    "pattern", pattern_, String.class, this, pageContext);
        }

        // 'parseLocale' attribute
        if (parseLocale_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "parseLocale", parseLocale_, Object.class, this, pageContext);
            Locale locale = LocaleUtil.parseLocaleAttributeValue(obj);
            if (locale != null) {
                this.parseLocale = locale;
            }
        }

        // 'integerOnly' attribute
        if (integerOnly_ != null) {
            obj = ExpressionEvaluatorManager.evaluate(
                    "integerOnly", integerOnly_, Boolean.class, this, pageContext);
            if (obj != null) {
                isIntegerOnly = ((Boolean) obj).booleanValue();
            }
        }
    }
1266869
public void evaluate(DoubleSolution solution) {
    double[] f = new double[getNumberOfObjectives()];

    f[0] = solution.getVariableValue(0);
    double g = this.evalG(solution);
    double h = this.evalH(f[0], g);
    f[1] = h * g;

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
  }
646824
@Override
	public Object evaluate( Message message ) throws JMSException
    {
        Boolean operandValue = operand.evaluateBoolean(message);
        if (operandValue == null)
            return null;
        
        return operandValue.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
    }
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]);
  }
47434
public Object eval(Scope scope) {
		if (index == null) {
			return assignVariable(scope);
		} else {
			return assignElement(scope);
		}
	}
245125
@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 = new double[numberOfObjectives];
    double[] thet = new double[numberOfObjectives - 1];
    int lb, ub;
    // evaluate g, thet
    for (int i = 0; i < numberOfObjectives - 1; i++) {
      g[i] = 0;
      lb = numberOfObjectives + i * const2;
      ub = numberOfObjectives + (i + 1) * const2 - 1;
      for (int j = lb - 1; j < ub; j++) {
        g[i] += Math.pow(x[j] / 2 - 0.25, 2);
      }
      thet[i] = Math.PI / 2 * (x[i] / 2 + 0.25);
    }
    lb = numberOfObjectives + (numberOfObjectives - 1) * const2;
    ub = numberOfVariables;
    for (int j = lb - 1; j < ub; j++) {
      g[numberOfObjectives - 1] += Math.pow(x[j] / 2 - 0.25, 2);
    }
    // evaluate fm,fm-1,...,2,f1
    f[numberOfObjectives - 1] = Math.sin(thet[0]) * (1 + g[numberOfObjectives - 1]);
    double subf1 = 1;
    // fi=cos(thet1)cos(thet2)...cos(thet[m-i])*sin(thet(m-i+1))*(1+g[i]),fi=subf1*subf2*subf3
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= Math.cos(thet[numberOfObjectives - i - 2]);
      f[i] = subf1 * Math.sin(thet[numberOfObjectives - i - 1]) * (1 + g[i]);
    }
    f[0] = subf1 * Math.cos(thet[numberOfObjectives - 2]) * (1 + g[0]);

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
444210
@Override
    public Object evaluate() throws ActivityException {
        try {
            scriptLanguage = getAttributeValue(SCRIPT_LANGUAGE);
            expression = getAttributeValue(EXPRESSION);
            if (StringHelper.isEmpty(expression)){
                throw new ActivityException("Expression content has not been defined");
            }

            String name = ScriptNaming.getValidName(getProcessDefinition().getLabel() + "_"
                    + getActivityName() + "_" + getActivityId());
            name = Character.toUpperCase(name.charAt(0)) + name.substring(1);
            Object obj = evaluateExpression(name, scriptLanguage, expression);
            if ((obj == null || obj.toString().isEmpty()) && isBooleanExpression(scriptLanguage, expression))
                obj = Boolean.FALSE;
            return obj;
        }
        catch (ExecutionException ex) {
            logger.severeException(ex.getMessage(), ex);
            throw new ActivityException(-1, ex.getMessage(), ex);
        }
    }
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);
  }
407375
private void evaluateExpressions() throws JspException {
        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

        value = (String) ExpressionUtil.evalNotNull(
                "url", "value", value_, String.class, this, pageContext);
        context = (String) ExpressionUtil.evalNotNull(
                "url", "context", context_, String.class, this, pageContext);
    }
1015877
@Override
	public Object evaluate(Message message) throws JMSException
    {
        Object leftValue = leftOperand.evaluate(message);
        Object rightValue = rightOperand.evaluate(message);
        if (leftValue == null || rightValue == null)
            return null;
        
        int leftType = getNodeType(leftValue);
        int rightType = getNodeType(rightValue);
        if (leftType != rightType)
            return Boolean.FALSE;
        
        switch (leftType)
        {
        	case SelectorNodeType.STRING :
        	case SelectorNodeType.BOOLEAN :
        		return leftValue.equals(rightValue) ? Boolean.TRUE : Boolean.FALSE;
        	default :
        		return ArithmeticUtils.equals((Number)leftValue,(Number)rightValue);
        }
    }
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;
    }
1020099
def evaluate_expression(expression, vars):
    ''''''
    try:
        v = eval(expression, globals(), vars)
    except NameError:
        return None
    except ZeroDivisionError:
        return None
    return v
772706
public final void evaluate() throws IOException {
    final ParserEvaluator evaluator = new ParserEvaluator(this.parser);
    evaluator.evaluate(this.testSamples);
    System.out.println(evaluator.getFMeasure());
  }
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]);
    }
  }