solve_lin - fabiankindermann/ce-fortran GitHub Wiki
subroutine solve_lin(x, c, A, b, numle, numge, numeq)
This subroutine applies the simplex algorithm to solve a linear programming problem of the form
-
real*8 :: c(:)
The coefficientsof the linear program. Note that this one-dimensional array needs to have exactly the same length as the array
x
. -
real*8 :: A(:, :)
The stacked coefficient matrix for the total set of constraints. Note that this two-dimensional array needs to have the lengthin the first dimension and the same length as the array
x
in the second dimension. -
real*8 :: b(:)
The stacked vector for the total set of constraints. Note that this one-dimensional array needs to have the length.
-
integer :: numle
This integer scalar tells the subroutine how many lower than or equality constraintsthe linear program has.
-
integer :: numge
This integer scalar tells the subroutine how many greater than or equality constraintsthe linear program has.
-
integer :: numeq
This integer scalar tells the subroutine how many strict equality constraintsthe linear program has.
-
real*8 :: x(:)
A one-dimensional array into which the subroutine stores the solution vector of the linear program.
- For further reading refer to:
- Dantzig, G.B. & Thapa, M. N. (1997). Linear Programming 1: Introduction. New York: Springer Series in Operations Research and Financial Engineering.
- This routine is used in the following programs:
prog02_20.f90