package lp
Library
Module
Module type
Parameter
Class
Class type
top module of package Lp
module Var : sig ... end
module Term : sig ... end
module Poly : sig ... end
Module for polynomial expression type
module Cnstr : sig ... end
module Obj : sig ... end
module Problem : sig ... end
module Pclass = Problem.Pclass
val c : float -> Poly.t
Make monomial of a constant value
val var : ?integer:bool -> ?lb:float -> ?ub:float -> string -> Poly.t
Make monomial of a variable
val binary : string -> Poly.t
Make monomial of a binary variable
val range :
?integer:bool ->
?lb:float ->
?ub:float ->
?start:int ->
int ->
string ->
Poly.t array
Make an array of monomials of a variable
val range2 :
?integer:bool ->
?lb:float ->
?ub:float ->
?start0:int ->
?start1:int ->
int ->
int ->
string ->
Poly.t array array
Make 2D array of monomials of a variable
val range3 :
?integer:bool ->
?lb:float ->
?ub:float ->
?start0:int ->
?start1:int ->
?start2:int ->
int ->
int ->
int ->
string ->
Poly.t array array array
Make 3D array of monomials of a variable
val rangeb : ?start:int -> int -> string -> Poly.t array
Make an array of monomials of a binary variable
val range2b :
?start0:int ->
?start1:int ->
int ->
int ->
string ->
Poly.t array array
Make 2D array of monomials of a binary variable
val range3b :
?start0:int ->
?start1:int ->
?start2:int ->
int ->
int ->
int ->
string ->
Poly.t array array array
Make 3D array of monomials of a binary variable
val rangev :
?integer:bool ->
?lb:float array ->
?ub:float array ->
?start:int ->
int ->
string ->
Poly.t array
Make 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 array
Make 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 array
Make 3D array of monomials of a variable with different bounds
val of_float_array : float array -> Poly.t
Convert a float array into a polynomial
val zero : Poly.t
Constant zero
val one : Poly.t
Constant one
Subtract two polynomials (concatenate left with negated right )
Multiply two polynomials. specifically, performs polynomial expansion.
Multiply two polynomials. specifically, performs polynomial expansion.
Divide polynomial by a univariate polynomial. Be careful as this function raises exception in following cases.
Build an equality constraint. Optinal name can be given. Polynomials are simplified on build.
Build an unnamed equality constraint. Polynomials are simplified on build.
Build an inequality constraint. Optinal name can be given. Polynomials are simplified on build.
Build an unnamed inequality constraint. Polynomials are simplified on build.
Build an inequality constraint. Optinal name can be given. Polynomials are simplified on build.
Build an unnamed inequality constraint. Polynomials are simplified on build.
val maximize : Poly.t -> Lp__.Objective.t
Build an objective to maximize a polynomial. The polynomial is simplified on build.
val minimize : Poly.t -> Lp__.Objective.t
Build an objective to minimize a polynomial. The polynomial is simplified on build.
val validate : Problem.t -> bool
Validate the problem
val vname_list : Problem.t -> string list
Make (unique and sorted) list of the variables in a problem.
val to_string : ?short:bool -> Problem.t -> string
Express the problem in LP file format string
val of_string : string -> Problem.t
Parse an LP file format string to build the problem
val write : ?short:bool -> string -> Problem.t -> unit
write fname
problem
writes out problem
to an LP file fname
val read : string -> Problem.t
Parse an LP file to build the problem