Difference between revisions of "ApCoCoA-1:GLPK.LPMin"
Andraschko (talk | contribs) m (added version info) |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1|[[Package glpk/GLPK.LPMin]]}} | ||
<command> | <command> | ||
<title>GLPK.LPMin</title> | <title>GLPK.LPMin</title> | ||
Line 12: | Line 13: | ||
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A <= 0.</item> | <item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A <= 0.</item> | ||
<item>@param <em>Bounds</em>: List of lists with two elements. Each List contains the lower and upper bounds for each variable. You can choose between INT or RAT for the type of each bound, if you type in a (empty) string, then it means minus infinity (first place) or plus infinity (second place).</item> | <item>@param <em>Bounds</em>: List of lists with two elements. Each List contains the lower and upper bounds for each variable. You can choose between INT or RAT for the type of each bound, if you type in a (empty) string, then it means minus infinity (first place) or plus infinity (second place).</item> | ||
− | <item>@param <em>Method</em>: You can choose between the interior-point-method ( | + | <item>@param <em>Method</em>: You can choose between the interior-point-method ("InterP") or the simplex-algorithm ("Simplex"). Usually you should use the simplex-algorithm.</item> |
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is achieved</item> | <item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is achieved</item> | ||
</itemize> | </itemize> | ||
Line 23: | Line 24: | ||
-- Then we compute the solution with | -- Then we compute the solution with | ||
− | GLPK.LPMin(OF, IE, Bounds, | + | GLPK.LPMin(OF, IE, Bounds, "Simplex"); |
-- And we achieve: | -- And we achieve: | ||
Line 37: | Line 38: | ||
<type>linear_programs</type> | <type>linear_programs</type> | ||
</types> | </types> | ||
− | <see>Latte.Minimize</see> | + | <see>ApCoCoA-1:Latte.Minimize|Latte.Minimize</see> |
<key>lpsolve</key> | <key>lpsolve</key> | ||
Line 44: | Line 45: | ||
<key>minimize lp</key> | <key>minimize lp</key> | ||
<key>GLPK.LPSolve</key> | <key>GLPK.LPSolve</key> | ||
− | <wiki-category>Package_glpk</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_glpk</wiki-category> |
</command> | </command> |
Latest revision as of 15:09, 1 November 2020
This article is about a function from ApCoCoA-1. If you are looking for the ApCoCoA-2 version of it, see Package glpk/GLPK.LPMin. |
GLPK.LPMin
Solving linear programmes by minimizing the objective function.
Syntax
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST
Description
Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.
@param Objective_f: A linear polynomial which is equivalent to the linear objective function.
@param Inequations: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A <= 0.
@param Bounds: List of lists with two elements. Each List contains the lower and upper bounds for each variable. You can choose between INT or RAT for the type of each bound, if you type in a (empty) string, then it means minus infinity (first place) or plus infinity (second place).
@param Method: You can choose between the interior-point-method ("InterP") or the simplex-algorithm ("Simplex"). Usually you should use the simplex-algorithm.
@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is achieved
Example
Use S::=QQ[x,y]; OF := 1/2x + y; IE := [3/4x + y - 6, -x - y + 1]; Bounds:=[[0,6], [1/3,4]]; -- Then we compute the solution with GLPK.LPMin(OF, IE, Bounds, "Simplex"); -- And we achieve: ------------------------------------- Solution Status: OPTIMAL Value of objective function: 5333333333/1000000000 [x[1] - 266667/100000, x[2] - 4]