package lp-glpk

  1. Overview
  2. Docs
module Dir : sig ... end
module Vt : sig ... end
module Bnd : sig ... end
module Stat : sig ... end
module BoolInt : sig ... end
module Msg : sig ... end
module Smcp : sig ... end
module Iocp : sig ... end
type prob = unit Ctypes.ptr
val prob : prob Ctypes.typ
val create_prob : unit -> prob
val delete_prob : prob -> unit
val set_prob_name : prob -> string -> unit
val get_prob_name : prob -> string
val set_obj_dir : prob -> Dir.t -> unit
val get_obj_dir : prob -> Dir.t
val add_rows : prob -> int -> int
val add_cols : prob -> int -> int
val set_row_name : prob -> int -> string -> unit
val get_row_name : prob -> int -> string
val set_col_name : prob -> int -> string -> unit
val get_col_name : prob -> int -> string
val set_row_bnds : prob -> int -> Bnd.t -> float -> float -> unit

set_row_bnds prob i bnd lb ub sets bounds of i-th row (constraint). * If the row is not lower (upper) bounded, lb (ub) is just ignored. * If the row is equality constraint (Bnd.FX), * only lb is used and ub is ignored.

val set_col_bnds : prob -> int -> Bnd.t -> float -> float -> unit

set_col_bnds prob j bnd lb ub sets bounds of j-th col (variable). * If the col is not lower (upper) bounded, lb (ub) is just ignored. * If the col is equality constraint (Bnd.FX), * only lb is used and ub is ignored.

val set_obj_coef : prob -> int -> float -> unit

set_obj_coef prob j sets the objective coefficient * at j-th col (variable)

val set_mat_row : prob -> int -> int -> unit Ctypes_static.ptr -> unit Ctypes_static.ptr -> unit

set_mat_row prob i len indices vals sets the i-th row of constraint matrix.

val set_mat_col : prob -> int -> int -> unit Ctypes_static.ptr -> unit Ctypes_static.ptr -> unit

set_mat_col prob j len indices vals sets the j-th column of constraint matrix.

val load_matrix : prob -> int -> unit Ctypes_static.ptr -> unit Ctypes_static.ptr -> unit Ctypes_static.ptr -> unit

load_matrix prob ne ia ja ar sets the constraint matrix. * The matrix is represented as an sparce matrix. * for k=1 .. ne, value ark is set at (iak, jak) element.

val set_col_kind : prob -> int -> Vt.t -> unit
val get_col_kind : prob -> int -> Vt.t
val get_num_rows : prob -> int
val get_num_cols : prob -> int
val get_num_nz : prob -> int
val get_num_int : prob -> int
val get_num_bin : prob -> int
val init_smcp : Smcp.t Ctypes.structure Ctypes_static.ptr -> unit
val init_iocp : Iocp.t Ctypes.structure Ctypes_static.ptr -> unit
val get_status : prob -> Stat.t
val mip_status : prob -> Stat.t
val get_obj_val : prob -> float
val mip_obj_val : prob -> float
val get_row_prim : prob -> int -> float
val get_row_dual : prob -> int -> float
val mip_row_val : prob -> int -> float
val get_col_prim : prob -> int -> float
val get_col_dual : prob -> int -> float
val mip_col_val : prob -> int -> float
OCaml

Innovation. Community. Security.