14package com.google.ortools.sat;
16import com.google.ortools.sat.ReservoirConstraintProto;
24public class ReservoirConstraint
extends Constraint {
37 ReservoirConstraintProto.Builder reservoir =
getBuilder().getReservoirBuilder();
38 reservoir.addTimeExprs(
39 model.getLinearExpressionProtoBuilderFromLinearArgument(time,
false));
40 reservoir.addLevelChanges(model.getLinearExpressionProtoBuilderFromLong(levelChange));
51 ReservoirConstraintProto.Builder reservoir =
getBuilder().getReservoirBuilder();
52 reservoir.addTimeExprs(model.getLinearExpressionProtoBuilderFromLong(time));
53 reservoir.addLevelChanges(model.getLinearExpressionProtoBuilderFromLong(levelChange));
65 ReservoirConstraintProto.Builder reservoir =
getBuilder().getReservoirBuilder();
66 reservoir.addTimeExprs(
67 model.getLinearExpressionProtoBuilderFromLinearArgument(time,
false));
68 reservoir.addLevelChanges(model.getLinearExpressionProtoBuilderFromLong(levelChange));
69 reservoir.addActiveLiterals(isActive.
getIndex());
79 ReservoirConstraintProto.Builder reservoir =
getBuilder().getReservoirBuilder();
80 reservoir.addTimeExprs(model.getLinearExpressionProtoBuilderFromLong(time));
81 reservoir.addLevelChanges(model.getLinearExpressionProtoBuilderFromLong(levelChange));
82 reservoir.addActiveLiterals(isActive.
getIndex());