Search in sources :

Example 1 with Printer

use of org.ojalgo.netio.BasicLogger.Printer in project ojAlgo by optimatika.

the class ExpressionsBasedModel method validate.

public boolean validate(final NumberContext context) {
    final Result solution = this.getVariableValues(context);
    final Printer appender = (options.logger_detailed && (options.logger_appender != null)) ? options.logger_appender : BasicLogger.NULL;
    return this.validate(solution, context, appender);
}
Also used : Printer(org.ojalgo.netio.BasicLogger.Printer)

Example 2 with Printer

use of org.ojalgo.netio.BasicLogger.Printer in project ojAlgo by optimatika.

the class ExpressionsBasedModel method validate.

public boolean validate(final Access1D<BigDecimal> solution) {
    final NumberContext context = options.feasibility;
    final Printer appender = (options.logger_detailed && (options.logger_appender != null)) ? options.logger_appender : BasicLogger.NULL;
    return this.validate(solution, context, appender);
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) Printer(org.ojalgo.netio.BasicLogger.Printer)

Example 3 with Printer

use of org.ojalgo.netio.BasicLogger.Printer in project ojAlgo by optimatika.

the class ExpressionsBasedModel method validate.

/**
 * This methods validtes model construction only. All the other validate(...) method validates the
 * solution (one way or another).
 *
 * @see org.ojalgo.optimisation.Optimisation.Model#validate()
 */
public boolean validate() {
    final Printer appender = options.logger_detailed ? options.logger_appender : BasicLogger.NULL;
    boolean retVal = true;
    for (final Variable tmpVariable : myVariables) {
        retVal &= tmpVariable.validate(appender);
    }
    for (final Expression tmpExpression : myExpressions.values()) {
        retVal &= tmpExpression.validate(appender);
    }
    return retVal;
}
Also used : Printer(org.ojalgo.netio.BasicLogger.Printer)

Aggregations

Printer (org.ojalgo.netio.BasicLogger.Printer)3 NumberContext (org.ojalgo.type.context.NumberContext)1