Lptop module of package Lp
module Var : sig ... endModule for LP variable. Typically, users don't need to use this module directly. See higher-level module for polynomials (Poly) instead.
module Term : sig ... endModule for a term in the polynomial. Typically, users don't need to use this module directly. See higher-level module for polynomials (Poly) instead.
module Poly : sig ... endModule for polynomial expression.
module Cnstr : sig ... endModule for the constraint.
module Objective : sig ... endModule for the objective.
module Problem : sig ... endModule for the optimization problem (model).
module Pclass = Problem.PclassModule for the optimization problem class.
Map with Poly.t key. It can be used to pack optimization result.
val c : float -> Poly.tMake monomial of a constant value.
val var : ?integer:bool -> ?lb:float -> ?ub:float -> string -> Poly.tMake monomial of a variable. You can optionally set its bounds (lb and ub) and whether it is an integer. By default, it becomes continuous and non-negative (integer = false, lb = Float.zero, and ub = Float.infinity).
val binary : string -> Poly.tMake monomial of a binary variable.
val range :
?integer:bool ->
?lb:float ->
?ub:float ->
?start:int ->
int ->
string ->
Poly.t arrayMake an array of monomials of a variable with uniform bounds.
val range2 :
?integer:bool ->
?lb:float ->
?ub:float ->
?start0:int ->
?start1:int ->
int ->
int ->
string ->
Poly.t array arrayMake 2D array of monomials of a variable with uniform bounds.
val range3 :
?integer:bool ->
?lb:float ->
?ub:float ->
?start0:int ->
?start1:int ->
?start2:int ->
int ->
int ->
int ->
string ->
Poly.t array array arrayMake 3D array of monomials of a variable with uniform bounds.
val rangeb : ?start:int -> int -> string -> Poly.t arrayMake an array of monomials of a binary variable.
val range2b :
?start0:int ->
?start1:int ->
int ->
int ->
string ->
Poly.t array arrayMake 2D array of monomials of a binary variable.
val range3b :
?start0:int ->
?start1:int ->
?start2:int ->
int ->
int ->
int ->
string ->
Poly.t array array arrayMake 3D array of monomials of a binary variable.
val rangev :
?integer:bool ->
?lb:float array ->
?ub:float array ->
?start:int ->
int ->
string ->
Poly.t arrayMake an array of monomials of a variable with different bounds.
val range2v :
?integer:bool ->
?lb:float array array ->
?ub:float array array ->
?start0:int ->
?start1:int ->
int ->
int ->
string ->
Poly.t array arrayMake 2D array of monomials of a variable with different bounds.
val range3v :
?integer:bool ->
?lb:float array array array ->
?ub:float array array array ->
?start0:int ->
?start1:int ->
?start2:int ->
int ->
int ->
int ->
string ->
Poly.t array array arrayMake 3D array of monomials of a variable with different bounds.
val of_float_array : float array -> Poly.tConvert a float array into a polynomial.
val zero : Poly.tThe monomial of constant zero.
val one : Poly.tThe monomial of constant one.
Subtract two polynomials (concatenate left with negated right).
Multiply two polynomials. Specifically, performs polynomial expansion.
Divide polynomial by a univariate polynomial. Be careful as this function raises exception in some cases.
Build an equality constraint. Optional name can be given. Polynomials are simplified (Poly.simplify) on build. eps specifies the threshold of near-zero, defaulting to 10. *. epsilon_float.
Build an unnamed equality constraint. Polynomials are simplified on build.
Build an inequality constraint. Optional name can be given. Polynomials are simplified (Poly.simplify) on build. eps specifies the threshold of near-zero, defaulting to 10. *. epsilon_float.
Build an unnamed inequality constraint. Polynomials are simplified on build.
Build an inequality constraint. Optional name can be given. Polynomials are simplified (Poly.simplify) on build. eps specifies the threshold of near-zero, defaulting to 10. *. epsilon_float.
Build an unnamed inequality constraint. Polynomials are simplified on build.
val maximize : ?eps:float -> Poly.t -> Objective.tBuild 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.
val minimize : ?eps:float -> Poly.t -> Objective.tBuild 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.
val make : ?name:string -> Objective.t -> Cnstr.t list -> Problem.tMake problem from an Objective.t and a constraint (Cnstr.t) list. String name can be given optionally.
val validate : Problem.t -> boolValidate the problem. true (false) means the problem is valid (invalid).
val vname_list : Problem.t -> string listMake (unique and sorted) list of the variables in a problem.
val to_string : ?short:bool -> Problem.t -> stringExpress the problem in LP file format string.
val of_string : string -> Problem.tParse an LP file format string to build the problem.
val write : ?short:bool -> string -> Problem.t -> unitwrite fname problem writes out problem to an LP file fname.
val read : string -> Problem.tParse an LP file to build the problem.
val compute_term : float PMap.t -> Term.t -> floatCompute the value of a term.
val compute_poly : float PMap.t -> Poly.t -> floatCompute the value of a polynom.