package lp

  1. Overview
  2. Docs

Module Lp.ObjectiveSource

Module for the objective.

Sourcetype t

Type for a maximize or minimize objective.

Sourceval maximize : ?eps:float -> Poly.t -> t

Build an objective to maximize a polynomial. The polynomial is simplified (Poly.simplify) on build. eps specifies the threshold of near-zero, defaulting to 10. *. epsilon_float.

Sourceval minimize : ?eps:float -> Poly.t -> t

Build an objective to minimize a polynomial. The polynomial is simplified (Poly.simplify) on build. eps specifies the threshold of near-zero, defaulting to 10. *. epsilon_float.

Sourceval take_vars : t -> Var.t list

Make list of the variables in the objective.

Sourceval to_poly : t -> Poly.t

Get polynomial expression of the objective function.

Sourceval to_string : ?short:bool -> t -> string

Get string expression (LP file format) of the objective.

Sourceval with_bound : string -> float -> float -> t -> t

with_bound name lb ub transforms the bounds of the variable name with lb and ub.

Sourceval to_integer : string -> t -> t

to_integer name transforms the variable name into general integer variable.

Sourceval to_binary : string -> t -> t

to_binary name transforms the variable name into binary variable.

Sourceval degree : t -> int

Get degree of the objective.

Sourceval is_max : t -> bool

True (false) if the objective is of maximize (minimize).

OCaml

Innovation. Community. Security.