Sat.LinearExprLinear expressions are used in linear constraints and to specify objectives.
A linear expression. An integer offset is maintainted in addition to a list of coefficients and variables. This allows both to normalize boolean literals into positive form and to represent constants (see of_int).
val zero : tAn empty linear expression.
val of_int : int -> tA constant expression.
module L : sig ... endOperators for building linear expressions. They are also available directly in the Sat module.
val to_string : t -> stringReturn a string representing the linear expression.
val pp : Stdlib.Format.formatter -> t -> unitPretty-printer for linear expressions.
val to_proto : t -> Cp_model.linear_expression_protoReturn the protocol buffer representation of a linear expression.
val to_objective_proto : t -> Cp_model.cp_objective_protoReturn the protocol buffer representation of a linear expression for use as an objective.