package lp

  1. Overview
  2. Docs

Module Lp.ProblemSource

Module for the optimization problem (model).

Sourcemodule Pclass : sig ... end

Module for the optimization problem class.

Sourcemodule Vars : sig ... end
Sourcetype t

Type for an optimization problem (model).

Sourceval make : ?name:string -> Objective.t -> Cnstr.t list -> t

Make problem from an Objective.t and a constraint (Cnstr.t) list. String name can be given optionally.

Sourceval name : t -> string option

Get name of the problem.

Sourceval objective : t -> Objective.t

Take Objective.t of the problem.

Sourceval cnstrs : t -> Cnstr.t list

Take constraint (Cnstr.t) list of the problem.

Sourceval obj_cnstrs : t -> Objective.t * Cnstr.t list

Get problem content as a pair of Objective.t and constraint (Cnstr.t) list.

Sourceval take_vars : t -> Var.t list

Make list of the variables in the problem.

Sourceval uniq_vars : t -> Var.t list

Make list of variables with unique names in the problem.

Sourceval uniq_vars_struct : t -> Var.t list

Make list of variables with unique structure (name and attributes) in the problem.

Sourceval collision : t -> bool

Check whether a collision (a variable with same name but different attributes) exists in the problem.

Sourceval vname_list : t -> string list

Make list of (unique) variable names in the problem.

Sourceval classify : t -> Pclass.t

Classify the problem into Pclass.t.

Sourceval validate : t -> bool

Validate the problem. true (false) means the problem is valid (invalid).

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

Express the problem in LP file format string.

OCaml

Innovation. Community. Security.