This is the linear-programming Reference Manual, version 2.3.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:37:28 2024 GMT+0.
linear-programming
linear-programming/all
linear-programming/problem
linear-programming/conditions
linear-programming/expressions
linear-programming/utils
linear-programming/system-info
linear-programming/solver
linear-programming/simplex
linear-programming/external-formats
linear-programming/linear-programming.asd
linear-programming/all/file-type.lisp
linear-programming/problem/file-type.lisp
linear-programming/conditions/file-type.lisp
linear-programming/expressions/file-type.lisp
linear-programming/utils/file-type.lisp
linear-programming/system-info/file-type.lisp
linear-programming/solver/file-type.lisp
linear-programming/simplex/file-type.lisp
linear-programming/external-formats/file-type.lisp
The main system appears first, followed by any subsystem dependency.
linear-programming
linear-programming/all
linear-programming/problem
linear-programming/conditions
linear-programming/expressions
linear-programming/utils
linear-programming/system-info
linear-programming/solver
linear-programming/simplex
linear-programming/external-formats
linear-programming
A library for solving linear programming problems
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
2.3.0
asdf
(system)., at least version "3.1.6"
linear-programming/all
(system).
linear-programming/all
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
linear-programming/problem
(system).
linear-programming/solver
(system).
linear-programming/conditions
(system).
linear-programming/external-formats
(system).
linear-programming/simplex
(system).
linear-programming/problem
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
linear-programming/conditions
(system).
linear-programming/expressions
(system).
alexandria
(system).
linear-programming/utils
(system).
linear-programming/conditions
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
linear-programming/expressions
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
linear-programming/conditions
(system).
alexandria
(system).
linear-programming/utils
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
alexandria
(system).
linear-programming/conditions
(system).
linear-programming/system-info
(system).
linear-programming/system-info
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
alexandria
(system).
linear-programming/solver
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
alexandria
(system).
linear-programming/problem
(system).
linear-programming/simplex
(system).
linear-programming/simplex
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
linear-programming/conditions
(system).
linear-programming/problem
(system).
linear-programming/utils
(system).
alexandria
(system).
linear-programming/external-formats
Neil Lindquist <NeilLindquist5@gmail.com>
(GIT https://github.com/neil-lindquist/linear-programming.git)
MIT
iterate
(system).
linear-programming/problem
(system).
alexandria
(system).
linear-programming/expressions
(system).
linear-programming/utils
(system).
Files are sorted by type and then listed depth-first from the systems components trees.
linear-programming/linear-programming.asd
linear-programming/all/file-type.lisp
linear-programming/problem/file-type.lisp
linear-programming/conditions/file-type.lisp
linear-programming/expressions/file-type.lisp
linear-programming/utils/file-type.lisp
linear-programming/system-info/file-type.lisp
linear-programming/solver/file-type.lisp
linear-programming/simplex/file-type.lisp
linear-programming/external-formats/file-type.lisp
linear-programming/linear-programming.asd
linear-programming
(system).
linear-programming/all/file-type.lisp
linear-programming/all
(system).
linear-programming/problem/file-type.lisp
linear-programming/problem
(system).
make-linear-problem
(macro).
parse-linear-problem
(function).
problem
(structure).
problem-constraints
(reader).
problem-integer-vars
(reader).
problem-objective-func
(reader).
problem-objective-var
(reader).
problem-type
(reader).
problem-var-bounds
(reader).
problem-vars
(reader).
copy-problem
(function).
make-problem
(function).
parse-linear-constraints
(function).
problem-p
(function).
linear-programming/conditions/file-type.lisp
linear-programming/conditions
(system).
infeasible-integer-constraints-error
(condition).
infeasible-problem-error
(condition).
invalid-bounds-error
(condition).
nonlinear-error
(condition).
parsing-error
(condition).
solver-error
(condition).
unbounded-problem-error
(condition).
unsupported-constraint-error
(condition).
constraint
(reader method).
description
(reader method).
lb
(reader method).
nonlinear-expression
(reader method).
solver-name
(reader method).
ub
(reader method).
var
(reader method).
linear-programming/expressions/file-type.lisp
linear-programming/expressions
(system).
format-linear-expression
(function).
parse-linear-expression
(function).
scale-linear-expression
(function).
sum-linear-expressions
(function).
linear-constant-p
(function).
linear-programming/utils/file-type.lisp
linear-programming/utils
(system).
fp-inequality
(macro).
lb
(type).
ub
(type).
linear-programming/system-info/file-type.lisp
linear-programming/system-info
(system).
+supported-floats+
(constant).
float-contagion
(function).
optimization-type
(function).
linear-programming/solver/file-type.lisp
linear-programming/solver
(system).
*solver*
(special variable).
solution-objective-value
(generic function).
solution-problem
(generic function).
solution-reduced-cost
(generic function).
solution-variable
(generic function).
solve-problem
(function).
with-solution-variables
(macro).
with-solved-problem
(macro).
linear-programming/simplex/file-type.lisp
linear-programming/simplex
(system).
build-tableau
(function).
copy-tableau
(function).
n-pivot-row
(function).
n-solve-tableau
(function).
pivot-row
(function).
simplex-solver
(function).
solve-tableau
(function).
tableau
(structure).
tableau-basis-columns
(reader).
tableau-constraint-count
(reader).
tableau-instance-problem
(reader).
tableau-matrix
(reader).
tableau-objective-value
(function).
tableau-p
(function).
tableau-problem
(reader).
tableau-reduced-cost
(function).
tableau-var-count
(reader).
tableau-variable
(function).
with-tableau-variables
(macro).
build-and-solve
(function).
find-entering-column
(function).
find-pivoting-row
(function).
gen-entries
(function).
make-tableau
(function).
tableau-fp-tolerance-factor
(reader).
tableau-var-mapping
(reader).
var-mapping-entry
(type).
violated-integer-constraint
(function).
linear-programming/external-formats/file-type.lisp
linear-programming/external-formats
(system).
read-mps
(function).
read-sexp
(function).
write-sexp
(function).
write-standard-format
(function).
newlinep
(function).
print-linear-expression
(function).
read-until
(function).
Packages are listed by definition order.
linear-programming/problem
linear-programming/external-formats
linear-programming/expressions
linear-programming/utils
linear-programming/simplex
linear-programming/conditions
linear-programming/all
linear-programming/system-info
linear-programming/solver
linear-programming/problem
Handles the representation of linear programming problems.
common-lisp
.
iterate
.
linear-programming/conditions
.
linear-programming/expressions
.
make-linear-problem
(macro).
parse-linear-problem
(function).
problem
(structure).
problem
(slot).
problem-constraints
(reader).
problem-integer-vars
(reader).
problem-objective-func
(reader).
problem-objective-var
(reader).
problem-type
(reader).
problem-var-bounds
(reader).
problem-vars
(reader).
copy-problem
(function).
make-problem
(function).
parse-linear-constraints
(function).
problem-p
(function).
linear-programming/external-formats
Handles reading and writing problems to external formats.
common-lisp
.
iterate
.
linear-programming/problem
.
read-mps
(function).
read-sexp
(function).
write-sexp
(function).
write-standard-format
(function).
newlinep
(function).
print-linear-expression
(function).
read-until
(function).
linear-programming/expressions
Contains functions for processing linear expressions.
common-lisp
.
iterate
.
linear-programming/conditions
.
format-linear-expression
(function).
parse-linear-expression
(function).
scale-linear-expression
(function).
sum-linear-expressions
(function).
linear-constant-p
(function).
linear-programming/utils
Various internal utilities
common-lisp
.
fp-inequality
(macro).
lb
(type).
ub
(type).
linear-programming/simplex
The actual simplex solver implementation for the default solver backend. This package should be used through the interface provided by the ‘linear-programming/solver‘ package.
common-lisp
.
iterate
.
linear-programming/conditions
.
linear-programming/problem
.
linear-programming/utils
.
build-tableau
(function).
copy-tableau
(function).
n-pivot-row
(function).
n-solve-tableau
(function).
pivot-row
(function).
simplex-solver
(function).
solve-tableau
(function).
tableau
(structure).
tableau-basis-columns
(reader).
tableau-constraint-count
(reader).
tableau-instance-problem
(reader).
tableau-matrix
(reader).
tableau-objective-value
(function).
tableau-p
(function).
tableau-problem
(reader).
tableau-reduced-cost
(function).
tableau-var-count
(reader).
tableau-variable
(function).
with-tableau-variables
(macro).
build-and-solve
(function).
find-entering-column
(function).
find-pivoting-row
(function).
gen-entries
(function).
make-tableau
(function).
tableau-fp-tolerance-factor
(reader).
tableau-var-mapping
(reader).
var-mapping-entry
(type).
violated-integer-constraint
(function).
linear-programming/conditions
Contains the various conditions used by this library.
common-lisp
.
infeasible-integer-constraints-error
(condition).
infeasible-problem-error
(condition).
invalid-bounds-error
(condition).
nonlinear-error
(condition).
parsing-error
(condition).
solver-error
(condition).
unbounded-problem-error
(condition).
unsupported-constraint-error
(condition).
constraint
(generic reader).
description
(generic reader).
lb
(generic reader).
nonlinear-expression
(generic reader).
solver-name
(generic reader).
ub
(generic reader).
var
(generic reader).
linear-programming/all
The overall package for the linear programming library. It contains only the reexported symbols of ‘linear-programming/problem‘, ‘linear-programming/solver‘, ‘linear-programming/conditioner‘, and ‘linear-programming/external-formats‘, plus ‘simplex-solver‘ from ‘linear-programming/simplex‘.
linear-programming
linear-programming/system-info
Utilities for inspecting how certain implmenetation-dependant features behave.
common-lisp
.
iterate
.
+supported-floats+
(constant).
float-contagion
(function).
optimization-type
(function).
linear-programming/solver
The high level linear programming solver interface. This interface is able to wrap multiple backends. The backend can be adjusted by setting the ‘*solver*‘ variable. The default backend is the ‘simplex-solver‘ in the ‘linear-programming/simplex‘ package.
common-lisp
.
iterate
.
*solver*
(special variable).
solution-objective-value
(generic function).
solution-problem
(generic function).
solution-reduced-cost
(generic function).
solution-variable
(generic function).
solve-problem
(function).
with-solution-variables
(macro).
with-solved-problem
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Contains the distinct floating point representations supported.
The function that should be used by solve-problem (defaults to ‘linear-programming/simplex:simplex-solver‘). The function should take a problem, and any backend specific keyword arguments and returns some form of solution object. The solution object should support the following methods ‘solution-problem‘, ‘solution-objective-value‘, ‘solution-variable‘, and ‘solution-reduced-cost‘.
Creates a linear problem from the expressions in the body
Evaluates the body with the variables in ‘var-list‘ bound to their values in the solution. Additionally, the macro ‘reduced-cost‘ is locally bound that takes a variable name and provides it’s reduced cost.
Takes the problem description, and evaluates ‘body‘ with the variables of the problem bound to their solution values. Additionally, the macro ‘reduced-cost‘ is locally bound that takes a variable name and provides it’s reduced cost.
Evaluates the body with the variables in ‘var-list‘ bound to their values from the tableau.
Creates the tableau from the given linear problem. If the trivial basis is not feasible, instead a list is returned containing the two tableaus for a two-phase simplex method.
Copies the given tableau and it’s matrix.
Computes the representation type using the rules for float contagion.
Formats a linear expression as a sexp.
Tests for inequality taking into account floating point error. ‘factor‘ is the acceptable multiple of unit round off that the two values can differ by.
Tests for inequality taking into account floating point error. ‘factor‘ is the acceptable multiple of unit round off that the two values can differ by.
Tests for equality taking into account floating point error. ‘factor‘ is the acceptable multiple of unit round off that the two values can differ by.
Tests for inequality taking into account floating point error. ‘factor‘ is the acceptable multiple of unit round off that the two values can differ by.
Tests for inequality taking into account floating point error. ‘factor‘ is the acceptable multiple of unit round off that the two values can differ by.
Computes the maximum value where nil is negative infinity
Computes the minimum value where nil is negative infinity
Destructively applies a single pivot to the table.
A non-consing version of [‘solve-tableau‘](#function-linear-programming/simplex:solve-tableau).
Gets the type of ‘x‘ to optimize for. If ‘x‘ is a rational, returns ‘rational‘. Otherwise, returns the type of ‘x‘.
Parses the expression into a alist mapping variables to coefficients. Any constant values are mapped to ‘+constant+‘.
Parses the expressions into a linear programming problem
Non-destructively applies a single pivot to the table.
A list of (in)equality constraints.
A list of variables with integer constraints.
The objective function as a linear expression alist.
The name of the objective function.
Whether the problem is a ‘min‘ or ‘max‘ problem.
type
.
A list of variable bounds, of the form ‘(var . (lower-bound . upper-bound))‘.
An array of the variables specified in the problem.
vars
.
Reads a problem in MPS format from the given stream. Note that a line starting with ‘ENDATA‘ ends the problem, so MPS files can be embedded in streams of other data. Only the fixed width version of the format is supported, but both the ‘OBJSENCE‘ and ‘OBJNAME‘ headers are supported and the ‘BV‘, ‘LI‘, and ‘UI‘ boundaries are supported.
Loads a problem stored in sexp format. This is a single sexp with the first element being the objective function and the rest of the elements being the constraints. Note that normally ‘*read-eval*‘ is bound to ‘nil‘, but can be enabled with ‘allow-read-eval‘; however, this should only be done when parsing trusted data.
Multiplies the linear expression by the given scalar.
The solver interface function for the simplex backend. The ‘fp-tolerance‘ keyword argument can be used to indicate the tolerance for error on floating point comparisons (defaults to 1024).
Solves the given problem using the function stored by ‘*solver*‘. Any keyword arguments are passed to the solver function.
Attempts to solve the tableau using the simplex method. If a list of two tableaus is given, then a two-phase version is used. The original tableau(s) are unchanged.
Takes linear expressions and reduces it into a single expression.
Gets the objective function value in the tableau.
Gets the reduced cost (i.e. the shadow price for the lower bound) for the given variable from the tableau.
Gets the value of the given variable from the tableau
Computes the maximum value where nil is positive infinity
Computes the minimum value where nil is positive infinity
Checks that the bounds represent a non empty range
Writes the problem as a sexp. The first element is the objective function and the rest of the elements are the constraints.
Writes a problem to the given stream in human readable, standard notation. The ‘unicodep‘ argument controls whether to print comparisons as unicode or ascii. The ‘aesthetic-variable-names-p‘ argument controls whether variable names are printed aesthetically.
Gets the value of the objective function.
Gets the original problem for the solution.
Gets the reduced cost of the specified variable. This is the
amount that the objective coefficient for the variable must increase or
decrease, for maximization and minimization problems respectively, before the
given variable appears in an optimal solution.
Gets the value of the specified variable.
Indicates that there is no feasible region due to the integer constraints.
Indicates the there is no feasible region.
Indicates a problem with a variable’s bounds.
Indicates a form was not a linear expression. This includes the use of nonlinear functions and taking the product of multiple variables
Contains the problematic expression
:expression
This slot is read-only.
Indicates an error occured while parsing a linear problem. Includes a textual description of the issue.
error
.
:description
This slot is read-only.
The base class for errors that occur with the solving algorithm.
error
.
Indicates the feasible region is unbounded such that the optimal objective value is infinite.
Indicates there are unsupported constraints or properties in the given problem.
The representation of a linear programming problem.
structure-object
.
common-lisp
.
(member max min)
(quote max)
This slot is read-only.
(simple-array symbol (*))
#()
This slot is read-only.
symbol
(quote #:z)
This slot is read-only.
list
This slot is read-only.
list
This slot is read-only.
list
This slot is read-only.
list
This slot is read-only.
Contains the necessary information for a simplex tableau.
structure-object
.
linear-programming/problem:problem
This slot is read-only.
linear-programming/problem:problem
This slot is read-only.
(simple-array real 2)
#2a()
This slot is read-only.
(simple-array fixnum (*))
#()
This slot is read-only.
(and fixnum unsigned-byte)
0
This slot is read-only.
(and fixnum unsigned-byte)
0
This slot is read-only.
hash-table
(make-hash-table :test (function eq))
This slot is read-only.
real
1024
This slot is read-only.
Builds and solves a tableau with the extra constrains added to the problem.
Gets the column to add to the basis.
Gets the column that will leave the basis.
Generates new entries to correct one of the integer constraints.
A predicate for whether a linear expression is constant.
Predicate if the given character is a newline or return
Parses the list of constraints and returns a list containing a list of simple inequalities and a list of integer variables.
Reads the given stream until the condition is true. ‘test‘ can either be a predicate that takes one argument, or a character to be tested using ‘char=‘.
Gets a variable that is required to be an integer but is currently violating that constraint.
unsupported-constraint-error
)) ¶parsing-error
)) ¶invalid-bounds-error
)) ¶lb
.
nonlinear-error
)) ¶unsupported-constraint-error
)) ¶invalid-bounds-error
)) ¶ub
.
invalid-bounds-error
)) ¶var
.
Jump to: | B C D F G L M N O P R S T U V W |
---|
Jump to: | B C D F G L M N O P R S T U V W |
---|
Jump to: | *
+
B C D E F I L M O P S T U V |
---|
Jump to: | *
+
B C D E F I L M O P S T U V |
---|
Jump to: | C F I L N P S T U V |
---|
Jump to: | C F I L N P S T U V |
---|