Search in sources :

Example 21 with BtrpOperand

use of org.btrplace.btrpsl.element.BtrpOperand in project scheduler by btrplace.

the class PowerOperator method go.

@Override
public BtrpOperand go(BtrPlaceTree parent) {
    BtrpOperand l = getChild(0).go(this);
    BtrpOperand r = getChild(1).go(this);
    return l.power(r);
}
Also used : BtrpOperand(org.btrplace.btrpsl.element.BtrpOperand)

Example 22 with BtrpOperand

use of org.btrplace.btrpsl.element.BtrpOperand in project scheduler by btrplace.

the class RemainderOperator method go.

@Override
public BtrpOperand go(BtrPlaceTree parent) {
    BtrpOperand l = getChild(0).go(this);
    if (l == IgnorableOperand.getInstance()) {
        return l;
    }
    BtrpOperand r = getChild(1).go(this);
    if (r == IgnorableOperand.getInstance()) {
        return r;
    }
    return l.remainder(r);
}
Also used : BtrpOperand(org.btrplace.btrpsl.element.BtrpOperand)

Aggregations

BtrpOperand (org.btrplace.btrpsl.element.BtrpOperand)22 BtrpSet (org.btrplace.btrpsl.element.BtrpSet)8 HashSet (java.util.HashSet)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 BtrpString (org.btrplace.btrpsl.element.BtrpString)2 DefaultBtrpOperand (org.btrplace.btrpsl.element.DefaultBtrpOperand)2 Script (org.btrplace.btrpsl.Script)1 ScriptBuilderException (org.btrplace.btrpsl.ScriptBuilderException)1 SatConstraintBuilder (org.btrplace.btrpsl.constraint.SatConstraintBuilder)1 BtrpElement (org.btrplace.btrpsl.element.BtrpElement)1 BtrpNumber (org.btrplace.btrpsl.element.BtrpNumber)1 DefaultModel (org.btrplace.model.DefaultModel)1 Model (org.btrplace.model.Model)1 SatConstraint (org.btrplace.model.constraint.SatConstraint)1