File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Supports / linear_programming.ads (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:28 2000 UTC (23 years, 10 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD Changes since 1.1: +0 -0
lines
Import the second public release of PHCpack.
OKed by Jan Verschelde.
|
with Standard_Floating_Numbers; use Standard_Floating_Numbers;
with Standard_Floating_Matrices; use Standard_Floating_Matrices;
with Standard_Integer_Vectors;
package Linear_Programming is
-- DESCRIPTION :
-- This package contains some routines for solving the standard primal and
-- dual linear-optimization problems, by means of the simplex algorithm.
procedure Primal_Simplex
( dic : in out Matrix; eps : in double_float;
in_bas,out_bas : in out Standard_Integer_Vectors.Vector;
nit : in out natural; unbounded : out boolean );
generic
with procedure Report ( dic : in Matrix;
in_bas,out_bas : Standard_Integer_Vectors.Vector );
procedure Generic_Primal_Simplex
( dic : in out Matrix; eps : in double_float;
in_bas,out_bas : in out Standard_Integer_Vectors.Vector;
nit : in out natural; unbounded : out boolean );
-- DESCRIPTION :
-- This is a very simple implementation of the simplex procedure
-- for solving the following problem:
--
-- max <c,x>
-- <a,x> <= 0
--
-- where x = (1,x1,x2,..,xn).
-- The generic procedure allows to report on intermediate dictionaries.
-- REQUIRED : The primal dictionary is already initialized.
-- ON ENTRY :
-- dic the matrix for the initial dictionary;
-- eps constant float to determine wether number is zero;
-- in_bas initial unknowns in the basis;
-- out_bas initial unknowns out the basis;
-- nit counter for number of iterations.
-- ON RETURN :
-- dic the modified matrix for the dictionary;
-- in_bas unknowns in the basis;
-- out_bas unknowns out the basis;
-- nit augmented with number of iterations made;
-- unbounded true when it is detected that the solution is unbounded.
procedure Dual_Simplex
( dic : in out Matrix; eps : in double_float;
in_bas,out_bas : in out Standard_Integer_Vectors.Vector;
nit : in out natural; feasible : out boolean );
generic
with procedure Report ( dic : in Matrix;
in_bas,out_bas : Standard_Integer_Vectors.Vector );
procedure Generic_Dual_Simplex
( dic : in out Matrix; eps : in double_float;
in_bas,out_bas : in out Standard_Integer_Vectors.Vector;
nit : in out natural; feasible : out boolean );
-- DESCRIPTION :
-- This is a very simple implementation of the simplex procedure
-- for solving the following problem:
--
-- min <c,x>
-- <a,x> >= 0
--
-- where x = (1,x1,x2,..,xn).
-- The generic procedure allows to report on intermediate dictionaries.
-- REQUIRED : The dual dictionary is already initialized.
-- ON ENTRY :
-- dic the matrix for the initial dictionary;
-- eps constant float to determine wether number is zero;
-- in_bas initial unknowns in the basis;
-- out_bas initial unknowns out the basis;
-- nit counter for number of iterations.
-- ON RETURN :
-- dic the modified matrix for the dictionary;
-- in_bas unknowns in the basis;
-- out_bas unknowns out the basis;
-- nit augmented with number of iterations made;
-- feasible is true when the problem is detected to be infeasible.
end Linear_Programming;