http://apcocoa.uni-passau.de/wiki/api.php?action=feedcontributions&user=Jbrandt&feedformat=atomApCoCoAWiki - User contributions [en]2024-03-29T15:51:13ZUser contributionsMediaWiki 1.35.0http://apcocoa.uni-passau.de/wiki/index.php?title=Test-Suite_Template&diff=10175Test-Suite Template2009-10-12T17:58:45Z<p>Jbrandt: </p>
<hr />
<div>=Testing an ApCoCoA-Package=<br />
This page explains how to create a test-suite for your package. Testing is important to make sure, that your package is still working correctly, when something in ApCoCoA or the ApCoCoALib changes.<br />
<br />
==A template for a test-suite==<br />
Your test should be named like the corresponding package and file ending should be .ts<br />
<br />
-- Test suite for "package name" <br><br />
-------------------------------<br />
-- TEST 01:<br> <br />
Test := Record[Id = "package_01", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br><br />
-------------------------------<br />
-- TEST 02:<br> <br />
Test := Record[Id = "package_02", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br />
-------------------------------<br />
...<br />
<br />
==Adding your test-suite to the file apcocoats.cpkg==<br />
To add your new test to the complete ApCoCoA-test-suite, you have to add some lines to the file apcocoats.cpkg, This file can be found in the /apcocoa/ts directory.<br />
Insert the name of the testet package into the list "RegisteredTests":<br />
<br />
RegisteredTests := ["glpk",<br />
"latte",<br />
"borderbasis",<br />
"linalg",<br />
"linbox",<br />
"iml",<br />
"fglm",<br />
"numabm",<br />
"numbasics",<br />
"numavi",<br />
"yourpackage"];<br />
<br />
==Functions that are useful for testing==<br />
For some packages, especially the numerical packages, the testfunction doesn't work very good, because you have to give the exact output-string, which can vary at different computers. For such packages there are some functions, which are listed below:<br />
<br />
[[TestNumericalNumber]]<br />
<br />
[[TestNumPoly]]<br />
<br />
[[TestListOfNumPoly]]<br />
<br />
[[TestSortedListOfNumPoly]]<br />
<br />
[[TestNumMatrix]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumMatrix&diff=10174TestNumMatrix2009-10-12T17:57:54Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumMatrix</title><br />
<short_description>Compares two matrizes with numerical entries</short_description><br />
<syntax><br />
ApCoCoATest.TestNumMatrix(f: MAT, e: MAT, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two matrizes with numerical entries. Every entry is compared via the function [[TestNumericalNumber]].<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first matrix</item><br />
<item>@param <em>Expected</em>: The second matrix</item><br />
<item>@param <em>Eps</em>: The allowed difference between two entries</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two matrizes.</item><br />
</itemize><br />
<br />
<example><br />
Mat1 := Mat([[2.3,2.1],[2.01,3.1]]); Mat2 := Mat([[2.31,2.09],[1.99,3.01]]);<br />
ApCoCoATest.TestNumMatrix(Mat1,Mat2, 0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumMatrix&diff=10173TestNumMatrix2009-10-12T17:54:05Z<p>Jbrandt: New page: <command> <title>TestNumMatrix</title> <short_description>Compares two matrizes with numerical entries</short_description> <syntax> ApCoCoATest.TestNumMatrix(f: MAT, e: MAT, Eps: RAT):LIST...</p>
<hr />
<div><command><br />
<title>TestNumMatrix</title><br />
<short_description>Compares two matrizes with numerical entries</short_description><br />
<syntax><br />
ApCoCoATest.TestNumMatrix(f: MAT, e: MAT, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two matrizes with numerical entries. Every entry is compared via the function [[TestNumericalNumber]].<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first matrix</item><br />
<item>@param <em>Expected</em>: The second matrix</item><br />
<item>@param <em>Eps</em>: The allowed difference between two entries</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two matrizes.</item><br />
</itemize><br />
<br />
<example><br />
<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestListOfNumPoly&diff=10172TestListOfNumPoly2009-10-12T17:51:07Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestListOfNumPoly</title><br />
<short_description>Compares two lists of numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestListOfNumPoly(f: LIST, e: LIST, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two lists of numerical polynomials. Every polynomial is tested via the function [[TestNumPoly]]. The two lists doesn't have to be sorted, the polynomials may be in any order. <br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first list of numerical polynomials</item><br />
<item>@param <em>Expected</em>: The second list of numerical polynomials</item><br />
<item>@param <em>Eps</em>: The allowed difference between two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two lists.</item><br />
</itemize><br />
<br />
<example><br />
F := [0.212 x + 2.103 xy, 14.12 x + 0.0001 y, 2z - 0.21 x^2]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestListOfNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestSortedListOfNumPoly&diff=10171TestSortedListOfNumPoly2009-10-12T17:50:10Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestSortedListOfNumPoly</title><br />
<short_description>Compares two sorted lists of numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestSortedListOfNumPoly(f: LIST, e: LIST, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two sorted lists of numerical polynomials. Every polynomial is tested via the function [[TestNumPoly]].<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first list of numerical polynomials</item><br />
<item>@param <em>Expected</em>: The second list of numerical polynomials</item><br />
<item>@param <em>Eps</em>: The allowed difference between two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two lists.</item><br />
</itemize><br />
<br />
<example><br />
F := [2z - 0.21 x^2, 0.212 x + 2.103 xy, 14.12 x + 0.0001 y]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestSortedListOfNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := [0.212 x + 2.103 xy, 14.12 x + 0.0001 y, 2z - 0.21 x^2]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestSortedListOfNumPoly(F,E,0.1);<br />
<br />
[FALSE, [2103/1000xy + 53/250x, 353/25x + 1/10000y, -21/100x^2 + 2z], [-6/25x^2 + 2z, 1/100000x^2 + 21/10xy + 107/500x, 71/5x]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestSortedListOfNumPoly&diff=10170TestSortedListOfNumPoly2009-10-12T17:49:12Z<p>Jbrandt: New page: <command> <title>TestListOfNumPoly</title> <short_description>Compares two sorted lists of numerical polynomials</short_description> <syntax> ApCoCoATest.TestNumericalNumber(f: LIST, e: LI...</p>
<hr />
<div><command><br />
<title>TestListOfNumPoly</title><br />
<short_description>Compares two sorted lists of numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(f: LIST, e: LIST, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two sorted lists of numerical polynomials. Every polynomial is tested via the function [[TestNumPoly]].<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first list of numerical polynomials</item><br />
<item>@param <em>Expected</em>: The second list of numerical polynomials</item><br />
<item>@param <em>Eps</em>: The allowed difference between two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two lists.</item><br />
</itemize><br />
<br />
<example><br />
F := [2z - 0.21 x^2, 0.212 x + 2.103 xy, 14.12 x + 0.0001 y]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestSortedListOfNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := [0.212 x + 2.103 xy, 14.12 x + 0.0001 y, 2z - 0.21 x^2]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestSortedListOfNumPoly(F,E,0.1);<br />
<br />
[FALSE, [2103/1000xy + 53/250x, 353/25x + 1/10000y, -21/100x^2 + 2z], [-6/25x^2 + 2z, 1/100000x^2 + 21/10xy + 107/500x, 71/5x]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestListOfNumPoly&diff=10169TestListOfNumPoly2009-10-12T17:39:09Z<p>Jbrandt: New page: <command> <title>TestListOfNumPoly</title> <short_description>Compares two lists of numerical polynomials</short_description> <syntax> ApCoCoATest.TestNumericalNumber(f: LIST, e: LIST, Eps...</p>
<hr />
<div><command><br />
<title>TestListOfNumPoly</title><br />
<short_description>Compares two lists of numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(f: LIST, e: LIST, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two lists of numerical polynomials. Every polynomial is tested via the function [[TestNumPoly]]. The two lists doesn't have to be sorted, the polynomials may be in any order. <br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first list of numerical polynomials</item><br />
<item>@param <em>Expected</em>: The second list of numerical polynomials</item><br />
<item>@param <em>Eps</em>: The allowed difference between two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the two lists.</item><br />
</itemize><br />
<br />
<example><br />
F := [0.212 x + 2.103 xy, 14.12 x + 0.0001 y, 2z - 0.21 x^2]; E := [2z - 0.24x^2, 0.00001 x^2 + 0.214 x + 2.1 xy, 14.2 x];<br />
ApCoCoATest.TestListOfNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumPoly&diff=10168TestNumPoly2009-10-12T17:21:46Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumPoly</title><br />
<short_description>Compares two numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(f: POLY, e: POLY, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical polynomials e and f. The sum over the absolute values of the coefficients of e-f must be smaller than Eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first numerical polynomial</item><br />
<item>@param <em>Expected</em>: The second numerical polynomial</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found polynomial.</item><br />
</itemize><br />
<br />
<example><br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2.1 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.01);<br />
<br />
[FALSE, 2103/1000xy + 53/250x, 1/100000x^2 + 2xy + 107/500x]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumPoly&diff=10167TestNumPoly2009-10-12T17:20:29Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumericalNumber</title><br />
<short_description>Compares two numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(f: POLY, e: POLY, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical polynomials e and f. The sum over the absolute values of the coefficients of e-f must be smaller than Eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first numerical polynomial</item><br />
<item>@param <em>Expected</em>: The second numerical polynomial</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found polynomial.</item><br />
</itemize><br />
<br />
<example><br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2.1 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.01);<br />
<br />
[FALSE, 2103/1000xy + 53/250x, 1/100000x^2 + 2xy + 107/500x]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumPoly&diff=10166TestNumPoly2009-10-12T17:19:53Z<p>Jbrandt: New page: <command> <title>TestNumericalNumber</title> <short_description>Compares two numerical polynomials</short_description> <syntax> ApCoCoATest.TestNumericalNumber(f: POLY, e: POLY, Eps: RAT):...</p>
<hr />
<div><command><br />
<title>TestNumericalNumber</title><br />
<short_description>Compares two numerical polynomials</short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(f: POLY, e: POLY, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical polynomials e and f. The sum over the absolute values of the coefficients of e-f must be smaller than Eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The first numerical polynomial</item><br />
<item>@param <em>Expected</em>: The second numerical polynomial</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two polynomials</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found polynomial.</item><br />
</itemize><br />
<br />
<example><br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2.1 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.1);<br />
<br />
[TRUE]<br />
F := 0.212 x + 2.103 xy; E := 0.00001 x^2 + 0.214 x + 2 xy;<br />
ApCoCoATest.TestNumPoly(F,E,0.01);<br />
<br />
[FALSE, 2103/1000xy + 53/250x, 1/100000x^2 + 2xy + 107/500x]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumericalNumber&diff=10165TestNumericalNumber2009-10-12T17:13:32Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumericalNumber</title><br />
<short_description>Compares two numerical numbers </short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(Found: RAT, Expected: RAT, Eps: RAT):LIST<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical numbers. The difference between the two numbers must be smaller than eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The numerical value that was computed</item><br />
<item>@param <em>Expected</em>: The numerical value that should be computed</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two values</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found number.</item><br />
</itemize><br />
<br />
<example><br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.01);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.0001);<br />
<br />
[FALSE, 62831853/20000000, 3141/1000]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumericalNumber&diff=10164TestNumericalNumber2009-10-12T17:09:40Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumericalNumber</title><br />
<short_description>Compares two numerical numbers </short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(Found: RAT, Expected: RAT, Eps: RAT)<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical numbers and returns "TRUE", if the difference isn't greater than Eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The numerical value that was computed</item><br />
<item>@param <em>Expected</em>: The numerical value that should be computed</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two values</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found number.</item><br />
</itemize><br />
<br />
<example><br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.01);<br />
<br />
[TRUE]<br />
-------------------------------<br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.0001);<br />
<br />
[FALSE, 62831853/20000000, 3141/1000]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=TestNumericalNumber&diff=10163TestNumericalNumber2009-10-12T17:09:08Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>TestNumericalNumber</title><br />
<short_description>Compares two numerical numbers </short_description><br />
<syntax><br />
ApCoCoATest.TestNumericalNumber(Found: RAT, Expected: RAT, Eps: RAT)<br />
</syntax><br />
<br />
<description><br />
This function compares two numerical numbers and returns "TRUE", if the difference isn't greater than Eps.<br />
<br />
<itemize><br />
<item>@param <em>Found</em>: The numerical value that was computed</item><br />
<item>@param <em>Expected</em>: The numerical value that should be computed</item><br />
<item>@param <em>Eps</em>: The allowed difference between the two values</item><br />
<item>@return A list. First entry is a boolean, its value is TRUE, if the test has been passed. If FALSE, the list contains also the expected and the found number.</item><br />
</itemize><br />
<br />
<example><br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.01);<br />
<br />
[TRUE]<br />
-------------------------------<br />
</example><br />
<example><br />
F := 3.14159265; E := 3.141;<br />
ApCoCoATest.TestNumericalNumber(F,E,0.0001);<br />
<br />
[FALSE, 62831853/20000000, 3141/1000]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<key>Testing</key><br />
<key>Numerical</key><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Main_Page&diff=10045Main Page2009-08-06T13:18:01Z<p>Jbrandt: </p>
<hr />
<div>=Welcome to the website of the computer algebra framework ApCoCoA=<br />
<br />
'''ApCoCoA''', which is the acronym of '''Ap'''plied '''Co'''mputations in '''Co'''mputer '''A'''lgebra, is based on the computer algebra system [http://cocoa.dima.unige.it CoCoA]. You can found informations about CoCoA on its official [http://cocoa.dima.unige.it website] and also in the [[CoCoA:Main_Page|CoCoA section]] of this wiki. <br />
<br />
'''Please note:''' There is absolutely NO link to the Apple cocoa interface! <br />
<br />
ApCoCoA is developed by the [[ApCoCoA:Team|ApCoCoA Team]], which is lead by [http://staff.fim.uni-passau.de/~kreuzer/ Martin Kreuzer], and is always looking for new [[ApCoCoA:contribute|contributors]]. <br />
<br />
==What is ApCoCoA?==<br />
<br />
For a short description of what ApCoCoA is please go to [[ApCoCoA:What is ApCoCoA|this page]].<br />
<br />
==ApCoCoA goes eclipse==<br />
<br />
[[Image:GUI_Rearrangement.jpg|thumb|left|top|150px]]<br />
Since the release of ApCoCoA-1.2 on July 15th 2009 the default Graphical User Interface for ApCoCoA is an eclipse based GUI. It provides the full functionality of the old, well-known Qt-GUI of CoCoA and ApCoCoA as well as much more comfort and a lot of nice new features, e.g.<br />
* improved file management<br />
* user-defined colouring<br />
* syntax highlighting<br />
* line numbers<br />
* auto completition <br />
* code templates<br />
and much more. Try and find out all features of the next generation [[ApCoCoA:GraphicalUserInterface|Graphical User Interface for ApCoCoA]]! <br />
<br />
=='''<font color=red>ApCoCoA 1.2 Released!</font>''' (July 15, 2009) ==<br />
<br />
For a list of features, see [http://www.apcocoa.org/forum/viewtopic.php?f=22&t=1090]. <font color=red>It is recommended to use ApCoCoA-1.2 using the beta version of the new eclipse-GUI. For installation please go to the [[HowTo:Install_and_Work_with_the_Eclipse_GUI|eclipse-GUI installation guide]].</font> As soon as possible there will be a standalone version of the eclipse version. Also ApCoCoA-1.2 is still available with the old, well known Qt-GUI.<br />
To download these executables, go to [[ApCoCoA:Downloads|ApCoCoA Downloads]]<br />
<br />
==News and Appointments==<br />
<br />
* 2009/07/15: ApCoCoA goes Eclipse! The [[HowTo:Install_and_Work_with_the_Eclipse_GUI|Eclipse GUI installation guide]] explains how to set up and work with the next generation Graphical User Interface for ApCoCoA.<br />
* 2009/07/15: Release of ApCoCoA-1.2.: [[ApCoCoA:Downloads|ApCoCoA Downloads]]<br />
<br />
<div align="left"><websiteFrame><br />
website=http://www.google.com/calendar/embed?showTitle=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=150&amp;wkst=2&amp;hl=en_GB&amp;bgcolor=%23ffffff&amp;src=info%40apcocoa.org&amp;color=%232952A3&amp;ctz=Europe%2FBerlin<br />
height=150<br />
width=100%<br />
border=0<br />
scroll=no<br />
</websiteFrame><br />
</div><br />
<br />
__NOTOC__</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Test-Suite_Template&diff=9970Test-Suite Template2009-07-27T14:13:00Z<p>Jbrandt: </p>
<hr />
<div>=Testing an ApCoCoA-Package=<br />
This page explains how to create a test-suite for your package. Testing is important to make sure, that your package is still working correctly, when something in ApCoCoA or the ApCoCoALib changes.<br />
<br />
==A template for a test-suite==<br />
Your test should be named like the corresponding package and file ending should be .ts<br />
<br />
-- Test suite for "package name" <br><br />
Alias TSL := $ts/ts_lib;<br />
-------------------------------<br />
-- TEST 01:<br> <br />
Test := Record[Id = "package_01", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br><br />
-------------------------------<br />
-- TEST 02:<br> <br />
Test := Record[Id = "package_02", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br />
-------------------------------<br />
...<br />
<br />
==Adding your test-suite to the file apcocoats.cpkg==<br />
To add your new test to the complete ApCoCoA-test-suite, you have to add some lines to the file apcocoats.cpkg, This file can be found in the /apcocoa/ts directory.<br />
Insert 3 lines like this:<br />
<br />
Print "package_name.ts";<br />
Source CocoaPackagePath()+"/ts/package_name.ts";<br />
TSL.Do();<br />
<br />
to the function RunTests() in the apcocoats package</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Test-Suite_Template&diff=9969Test-Suite Template2009-07-27T14:11:45Z<p>Jbrandt: </p>
<hr />
<div>=Testing an ApCoCoA-Package=<br />
This page explains how to create a test-suite for your package. Testing is important to make sure, that your package is still working correctly, when something in ApCoCoA or the ApCoCoALib changes.<br />
<br />
==A template for a test-suite==<br />
Your test should be named like the corresponding package and file ending should be .ts<br />
<br />
-- Test suite for "package name" <br><br />
Alias TSL := $ts/ts_lib;<br />
-------------------------------<br />
-- TEST 01:<br> <br />
Test := Record[Id = "package_01", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br><br />
-------------------------------<br />
-- TEST 02:<br> <br />
Test := Record[Id = "package_02", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br />
-------------------------------<br />
...<br />
<br />
==Adding your test-suite to the file apcocoats.cpkg==<br />
To add your new test to the complete ApCoCoA-test-suite, you have to add some lines to the file apcocoa.cpkg, This file can be found in the /apcocoa/ts directory.<br />
Insert 3 lines like this:<br />
<br />
Print "package_name.ts";<br />
Source CocoaPackagePath()+"/ts/package_name.ts";<br />
TSL.Do();<br />
<br />
to the function RunTests() in the apcocoats package</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.BPMax&diff=9933ApCoCoA-1:GLPK.BPMax2009-07-14T11:52:27Z<p>Jbrandt: New page: <command> <title>GLPK.BPMax</title> <short_description>Solving binary programmes by maximizing the objective function.</short_description> <syntax> GLPK.BPMax(Objective_f:POLY, Inequations...</p>
<hr />
<div><command><br />
<title>GLPK.BPMax</title><br />
<short_description>Solving binary programmes by maximizing the objective function.</short_description><br />
<syntax><br />
GLPK.BPMax(Objective_f:POLY, Inequations:LIST) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A &lt;= 0.</item><br />
<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><br />
</itemize><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<br />
<key>mipsolve</key><br />
<key>solve binary program</key><br />
<key>solve lp</key><br />
<key>solve linear program</key><br />
<key>maximize lp</key><br />
<key>GLPK.MIPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.BPMin&diff=9932ApCoCoA-1:GLPK.BPMin2009-07-14T11:51:27Z<p>Jbrandt: New page: <command> <title>GLPK.BPMin</title> <short_description>Solving mixed integer linear programmes by minimizing the objective function.</short_description> <syntax> GLPK.BPMin(Objective_f:POL...</p>
<hr />
<div><command><br />
<title>GLPK.BPMin</title><br />
<short_description>Solving mixed integer linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.BPMin(Objective_f:POLY, Inequations:LIST) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A &lt;= 0.</item><br />
<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><br />
</itemize><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<br />
<key>mipsolve</key><br />
<key>solve binary program</key><br />
<key>solve lp</key><br />
<key>solve linear program</key><br />
<key>minimize lp</key><br />
<key>GLPK.MIPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.MIPMax&diff=9929ApCoCoA-1:GLPK.MIPMax2009-07-14T11:38:01Z<p>Jbrandt: New page: <command> <title>GLPK.LPMax</title> <short_description>Solving mixed integer linear programmes by maximizing the objective function.</short_description> <syntax> GLPK.MIPMax(Objective_f:PO...</p>
<hr />
<div><command><br />
<title>GLPK.LPMax</title><br />
<short_description>Solving mixed integer linear programmes by maximizing the objective function.</short_description><br />
<syntax><br />
GLPK.MIPMax(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Integral:LIST, Binary:LIST) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A &lt;= 0.</item><br />
<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><br />
<item>@param <em>Integral</em>: List of variables, which should be integer. <em>Note</em>: For each variable in this list, the borders get rounded (lower bound: up and upper bound: down). In the case that the lower rounded bound becomes greater then the upper rounded bound, glpk returns: Solution Status: INTEGER UNDEFINED - Value of objective function: 0.</item><br />
<item>@param <em>Binary</em>: List of variables, which should be binaries (0 or 1).</item><br />
<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><br />
</itemize><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<br />
<key>mipsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>solve mixed integer program</key><br />
<key>maximize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.MIPMin&diff=9926ApCoCoA-1:GLPK.MIPMin2009-07-14T11:36:37Z<p>Jbrandt: New page: <command> <title>GLPK.LPMin</title> <short_description>Solving mixed integer linear programmes by minimizing the objective function.</short_description> <syntax> GLPK.MIPMin(Objective_f:PO...</p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving mixed integer linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.MIPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Integral:LIST, Binary:LIST) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A &lt;= 0.</item><br />
<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><br />
<item>@param <em>Integral</em>: List of variables, which should be integer. <em>Note</em>: For each variable in this list, the borders get rounded (lower bound: up and upper bound: down). In the case that the lower rounded bound becomes greater then the upper rounded bound, glpk returns: Solution Status: INTEGER UNDEFINED - Value of objective function: 0.</item><br />
<item>@param <em>Binary</em>: List of variables, which should be binaries (0 or 1).</item><br />
<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><br />
</itemize><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<br />
<key>mipsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>solve mixed integer program</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMax&diff=9925ApCoCoA-1:GLPK.LPMax2009-07-14T11:29:11Z<p>Jbrandt: New page: <command> <title>GLPK.LPMax</title> <short_description>Solving linear programmes by maximizing the objective function.</short_description> <syntax> GLPK.LPMax(Objective_f:POLY, Inequations...</p>
<hr />
<div><command><br />
<title>GLPK.LPMax</title><br />
<short_description>Solving linear programmes by maximizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMax(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear program of the form A &lt;= 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<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><br />
</itemize><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Maximize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>maximize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9633ApCoCoA-1:GLPK.LPMin2009-06-30T09:20:47Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form A &lt;= 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9632ApCoCoA-1:GLPK.LPMin2009-06-30T09:00:02Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form A lower equal 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9631ApCoCoA-1:GLPK.LPMin2009-06-30T08:59:08Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form A \< 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9630ApCoCoA-1:GLPK.LPMin2009-06-30T08:58:45Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form A < 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9629ApCoCoA-1:GLPK.LPMin2009-06-30T08:58:14Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form A > 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9628ApCoCoA-1:GLPK.LPMin2009-06-30T08:56:09Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm of the form <math>A \leq 0</math>.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9627ApCoCoA-1:GLPK.LPMin2009-06-30T08:54:49Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm in the form A <math> \leq </math> 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPMin&diff=9626ApCoCoA-1:GLPK.LPMin2009-06-30T08:54:02Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPMin</title><br />
<short_description>Solving linear programmes by minimizing the objective function.</short_description><br />
<syntax><br />
GLPK.LPMin(Objective_f:POLY, Inequations:LIST, Bounds:LIST, Method:STRING) :LIST<br />
</syntax><br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>Inequations</em>: List of linear polynomials, which are equivalent to the conditions of the linear programm in the form A <math> \le </math> 0.</item><br />
<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><br />
<item>@param <em>Method</em>: You can choose between the interior-point-method (<quotes>InterP</quotes>) or the simplex-algorithm (<quotes>Simplex</quotes>). Usually you should use the simplex-algorithm.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
Use S::=QQ[x,y];<br />
OF := 1/2x + y;<br />
IE := [3/4x + y - 6, -x - y + 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
GLPK.LPMin(OF, IE, Bounds, <quotes>Simplex</quotes>);<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
<type>linear_programs</type><br />
</types><br />
<see>Latte.Minimize</see><br />
<br />
<key>lpsolve</key><br />
<key>solve linear program</key><br />
<key>solve lp</key><br />
<key>minimize lp</key><br />
<key>GLPK.LPSolve</key><br />
<wiki-category>Package_glpk</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Test-Suite_Template&diff=9602Test-Suite Template2009-06-18T18:39:40Z<p>Jbrandt: </p>
<hr />
<div>=Testing an ApCoCoA-Package=<br />
This page explains how to create a test-suite for your package. Testing is important to make sure, that your package is still working correctly, when something in ApCoCoA or the ApCoCoALib changes.<br />
<br />
==A template for a test-suite==<br />
Your test should be named like the corresponding package and file ending should be .ts<br />
<br />
-- Test suite for "package name" <br><br />
Alias TSL := $ts/ts_lib;<br />
TSL.Initialize();<br><br />
-------------------------------<br />
-- TEST 01:<br> <br />
Test := Record[Id = "package_01", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br><br />
-------------------------------<br />
-- TEST 02:<br> <br />
Test := Record[Id = "package_02", Descr = "your description"];<br><br />
Test.Input :="<br />
''CoCoAL-code to test'' <br />
";<br><br />
Test.ExpectedOutput :="<br />
''Output of ApCoCoA after executing the code above''<br />
";<br><br />
TSL.RegisterTest(Test);<br />
-------------------------------<br />
...<br />
<br />
==Adding your test-suite to the file all.ts==<br />
To add your new test to the complete ApCoCoA-test-suite, you have to add some lines to the file all.ts, This file can be found in the modified-cocoa-files directory.<br />
<br />
Print "package_name.ts";<br />
Source CocoaPackagePath()+"/ts/package_name.ts";<br />
TSL.Do();</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Team&diff=9561Team2009-04-30T11:48:53Z<p>Jbrandt: </p>
<hr />
<div>=ApCoCoA Team Members=<br />
* Organisation<br />
** Team leader: [http://staff.fim.uni-passau.de/~kreuzer/ Martin Kreuzer]<br />
** Project Manager: [[User:stadler|Thomas Stadler]]<br />
* Code Contributors<br />
** Rashid Ali<br />
** [[User:Jbrandt|Jan Brandt]]<br />
** Tobias Eichinger<br />
** [[User:Philipp jovanovic|Philipp Jovanovic]]<br />
** [http://www.apcocoa.org/~skaspar/ Stefan Kaspar]<br />
** [http://staff.fim.uni-passau.de/~kreuzer/ Martin Kreuzer] (Border basis)<br />
** [[User:Jan|Jan Limbeck]]<br />
** Matthias Machnik (Matlab Interface)<br />
** [[User:S schuster|Stefan Schuster]]<br />
** [[User: E Ullah|Ehsan Ullah]]<br />
** Xingqiang Xiu<br />
*Support<br />
** [[User:stadler|Thomas Stadler]]<br />
** Manuel Danisch<br />
<br />
For contact details have a look at the website of the [http://www.fim.uni-passau.de/de/fim/fakultaet/lehrstuehle/symbolic-computation/mitarbeiter.html chair for symbolic computation] at the University of Passau.<br />
<br />
=Former members=<br />
* [[User:Mabshoff|Michael Abshoff]] (make system, BLAS / Lapack bindings, GUI)<br />
* [http://math.tu-berlin.de/~dheldt/ Daniel Heldt] (ABM, Weyl Algebras, RingFloat, PPMonoidModSquares, RingF2, ..., RingF4096)<br />
* [[User:KHiddemann|Karsten Hiddemann]] (non commutative Polynomials)<br />
* Stefan K&uuml;hling<br />
<br />
=Close collaborators=<br />
The CoCoA Team ([http://cocoa.dima.unige.it/research/ http://cocoa.dima.unige.it/research/])<br />
<br />
=Thanks=<br />
* Shell International Exploration & Production (Rijswijk/NL)<br />
* The GMP team<br />
* The LinBox team<br />
* The Atlas and BLAS/LAPACK teams<br />
* The GLPK team<br />
* The LattE and LattE macchiato teams<br />
<br />
[[Category:ApCoCoA|{{PAGENAME}}]]<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Minimize&diff=9559ApCoCoA-1:Latte.Minimize2009-04-29T15:32:54Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Minimize</title><br />
<short_description>Minimizes the objective function over a polyhedral P given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Minimize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):LIST<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return A list: [[Optimal coordinates], Optimal solution, [Coeffs of objective function]] </item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [-x-2, x-y-24];<br />
GreaterEq := [-x,-y];<br />
ObjectiveF := x-2y;<br />
Latte.Minimize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
<br />
[[-2, 0], -2, [1, -2]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Minimize</key><br />
<key>Latte.Minimize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Maximize&diff=9558ApCoCoA-1:Latte.Maximize2009-04-29T15:31:48Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Maximize</title><br />
<short_description>Maximizes the objective function over a polyhedral P given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Maximize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):LIST<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return A list [[Optimal coordinates], Optimal solution, [Coeffs of objective function]]</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
ObjectiveF := x + y;<br />
Latte.Maximize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
<br />
[[1, 0], 1, [1, 1]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<see>GLPK.LPSolve</see><br />
<br />
<key>Latte</key><br />
<key>Maximize</key><br />
<key>Latte.Maximize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_glpk&diff=9557Category:ApCoCoA-1:Package glpk2009-04-29T15:12:11Z<p>Jbrandt: </p>
<hr />
<div>The basic idea behind this package is to make the linear optimization program GLPK usable in/with ApCoCoA.<br />
<br />
The package GLPK contains various functions that let you make use of the GLPK library, rather the stand-alone LP/MIP Solver glpsol.<br />
<br />
{{ApCoCoAServer}}<br />
<br />
<em>Important</em>: The GLPK-Program glpsol must be in the ApCoCoA directory/Glpk/bin and you must have the permissions to read and write in this directory.<br />
<br />
The source code of GLPK can be downloaded at [http://www.gnu.org/software/glpk/]<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_latte&diff=9556Category:ApCoCoA-1:Package latte2009-04-29T15:07:42Z<p>Jbrandt: </p>
<hr />
<div>{{ApCoCoAServer}}<br />
<br />
'''Important''': The LattE-binaries must be inside the ApCoCoA directory in the directory /Latte/dest/bin and you must have the permissions to read and write in this directory.<br />
<br />
The source code of "LattE for tea too" can be downloaded at [http://www.math.ucdavis.edu/~mkoeppe/latte/].<br />
This package uses the version 1.2-mk-0.9.3.<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_latte&diff=9555Category:ApCoCoA-1:Package latte2009-04-29T15:07:08Z<p>Jbrandt: </p>
<hr />
<div>{{ApCoCoAServer}}<br />
<br />
'''Important''': The LattE-binaries must be inside the ApCoCoA directory in the directory /Latte/dest/bin and you must have the permissions to read and write in this directory.<br />
<br />
The source code of "LattE for tea too" can be downloaded at [http://www.math.ucdavis.edu/~mkoeppe/latte/].<br />
This packages uses the version 1.2-mk-0.9.3.<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_latte&diff=9554Category:ApCoCoA-1:Package latte2009-04-29T15:05:58Z<p>Jbrandt: </p>
<hr />
<div>{{ApCoCoAServer}}<br />
<br />
'''Important''': The LattE-binaries must be inside the ApCoCoA directory in the directory /Latte/dest/bin and you must have the permissions to read and write in this directory.<br />
<br />
The source code of "LattE for tea too" can be downloaded at [http://www.math.ucdavis.edu/~mkoeppe/latte/].<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Minimize&diff=9553ApCoCoA-1:Latte.Minimize2009-04-29T15:02:43Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Minimize</title><br />
<short_description>Minimizes the objective function over a polyhedral P given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Minimize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return The optimal value of the objective function</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [-x-2, x-y-24];<br />
GreaterEq := [-x,-y];<br />
ObjectiveF := x-2y;<br />
Latte.Minimize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
<br />
[[-2, 0], -2, [1, -2]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Minimize</key><br />
<key>Latte.Minimize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Maximize&diff=9552ApCoCoA-1:Latte.Maximize2009-04-29T14:58:18Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Maximize</title><br />
<short_description>Maximizes the objective function over a polyhedral P given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Maximize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return A list [[Optimal coordinates], Optimal solution, [Coeffs of objective function]]</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
ObjectiveF := x + y;<br />
Latte.Maximize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
<br />
[[1, 0], 1, [1, 1]]<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<see>GLPK.LPSolve</see><br />
<br />
<key>Latte</key><br />
<key>Maximize</key><br />
<key>Latte.Maximize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Count&diff=9551ApCoCoA-1:Latte.Count2009-04-29T14:53:42Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Count</title><br />
<short_description>Counts the lattice points of a polyhedral given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):INT<br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Dil: INT):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Dil</em>: Integer > 0, factor for dilation of the polyhedral P, to count the lattice points of the polyhedral n*P</item><br />
<item>@return The number of lattice points in the given polyhedral P </item><br />
</itemize><br />
<br />
<em> IMPORTANT: </em> If the given polyhedral is unbound, the output of LattE is zero, as for an empty polyhedral.<br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [1/2*x-1, x+1/3y-1];<br />
GreaterEq := [x,y];<br />
Latte.Count(Equations, LesserEq, GreaterEq);<br />
<br />
5<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Count</key><br />
<key>Latte.Count</key><br />
<key>latte.Count</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Maximize&diff=9550ApCoCoA-1:Latte.Maximize2009-04-29T14:33:32Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Maximize</title><br />
<short_description>Maximizes the objective function over a polyhedral P given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Maximize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return The optimal value of the objective function</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
ObjectiveF := x + y;<br />
Latte.Maximize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<see>GLPK.LPSolve</see><br />
<br />
<key>Latte</key><br />
<key>Maximize</key><br />
<key>Latte.Maximize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Count&diff=9549ApCoCoA-1:Latte.Count2009-04-29T14:32:16Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Count</title><br />
<short_description>Counts the lattice points of a polyhedral given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):INT<br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Dil: INT):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Dil</em>: Integer > 0, factor for dilation of the polyhedral P, to count the lattice points of the polyhedral n*P</item><br />
<item>@return The number of lattice points in the given polyhedral P </item><br />
</itemize><br />
<br />
<em> IMPORTANT: </em> If the given polyhedral is unbound, the output of LattE is zero, as for an empty polyhedral.<br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [1/2*x-1, x+1/3y-1];<br />
GreaterEq := [x,y];<br />
Latte.Count(Equations, LesserEq, GreaterEq);<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Count</key><br />
<key>Latte.Count</key><br />
<key>latte.Count</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Count&diff=9548ApCoCoA-1:Latte.Count2009-04-29T14:31:20Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Count</title><br />
<short_description>Counts the lattice points of a polyhedral given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):INT<br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Dil: INT):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Dil</em>: Integer > 0, factor for dilation of the polyhedral P, to count the lattice points of the polyhedral n*P</item><br />
<item>@return The number of lattice points in the given polyhedral P </item><br />
</itemize><br />
<br />
<em> IMPORTANT: </em> If the given polyhedral is unbound, the output of LattE is zero, as for an empty polyhedral.<br />
<br />
<example><br />
-- To count the lattice points in the polyhedral P = {x &gt;= 0, y &gt;= 0, x &lt;= 1, x + y &lt;= 1}:<br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
Latte.Ehrhart(Equations, LesserEq, GreaterEq);<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Count</key><br />
<key>Latte.Count</key><br />
<key>latte.Count</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Count&diff=9545ApCoCoA-1:Latte.Count2009-04-29T11:12:05Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Count</title><br />
<short_description>Counts the lattice points of a polyhedral given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):INT<br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Dil: INT):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Dil</em>: Integer > 0, factor for dilation of the polyhedral P, to count the lattice points of the polyhedral n*P</item><br />
<item>@return The number of lattice points in the given polyhedral P </item><br />
</itemize><br />
<br />
<em> IMPORTANT: </em> If the given polyhedral is unbound, the output of LattE is zero, as for an empty polyhedral.<br />
<br />
<example><br />
-- To count the lattice points in the polyhedral P = {x &gt;= 0, y &gt;= 0, x &lt;= 1, x + y &lt;= 1}:<br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
Latte.Count(Equations, LesserEq, GreaterEq);<br />
<br />
3<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Count</key><br />
<key>Latte.Count</key><br />
<key>latte.Count</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Count&diff=9544ApCoCoA-1:Latte.Count2009-04-29T11:11:25Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Count</title><br />
<short_description>Counts the lattice points of a polyhedral given by a number of linear constraints.</short_description><br />
<syntax><br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):INT<br />
Latte.Count(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Dil: INT):INT<br />
</syntax><br />
<br />
<description><br />
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Dil</em>: Integer > 0, factor for dilation of the polyhedral P, to count the lattice points of the polyhedral n*P</item><br />
<item>@return The number of lattice points in the given polyhedral P </item><br />
</itemize><br />
<br />
<em> IMPORTANT: </em> If the given polyhedral is unbound, the output of LattE is zero, as for an empty polyhedral.<br />
<br />
-- To count the lattice points in the polyhedral P = {x &gt;= 0, y &gt;= 0, x &lt;= 1, x + y &lt;= 1}:<br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
Latte.Count(Equations, LesserEq, GreaterEq);<br />
<br />
3<br />
-------------------------------<br />
</example><br />
<br />
</description><br />
<types><br />
<type>apcocoaserver</type><br />
</types><br />
<key>Latte</key><br />
<key>Count</key><br />
<key>Latte.Count</key><br />
<key>latte.Count</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.MIPSolve&diff=8390ApCoCoA-1:GLPK.MIPSolve2009-04-21T11:37:32Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>MIPSolve</title><br />
<short_description>solve linear programms</short_description><br />
<syntax><br />
GLPK.MIPSolve(Objective_f:POLYNOM, EQ_Poly:LIST, LE_Poly:LIST, GE_Poly:LIST, Bounds:LIST, IntNum:LIST, Binaries:LIST, MinMax:STRING)<br />
</syntax><br />
<description><br />
{{ApCoCoAServer}}<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>EQ_Poly</em>: List of linear polynomials, which are equivalent to the equality-part in the list of conditions.</item><br />
<item>@param <em>LE_Poly</em>: List of linear polynomials, which are equivalent to the lower or equal-part in the list of conditions.</item><br />
<item>@param <em>GE_Poly</em>: List of linear polynomials, which are equivalent to the greater or equal-part in the list of conditions.</item><br />
<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><br />
<item>@param <em>IntNum</em>: List of variables, which should be integer. <em>Note</em>: For each variable in this list, the borders get rounded (lower bound: up and upper bound: down). In the case that the lower rounded bound becomes greater then the upper rounded bound, glpk returns: Solution Status: INTEGER UNDEFINED - Value of objective function: 0.</item><br />
<item>@param <em>Binaries</em>: List of variables, which should be binaries (0 or 1).</item><br />
<item>@param <em>MinMax</em>: Minimization ("Min") or maximization ("Max"), that's the question.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
First we want to discuss a rather easy example. <br />
<example><br />
We want to maximize the Function y = - 1/2x, <br />
with the two conditions y ≤ 6 - 3/4x and y ≥ 1 - x and the bounds 0 ≤ x ≤ 6 and 1/3 ≤ y ≤ 4.<br />
<br />
We prename the input of GLPK.MIPSolve-function.<br />
Use S::=Q[x,y];<br />
OF := 1/2x + y;<br />
LE := [3/4x + y - 6];<br />
GE := [x + y - 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
IntNum:=[x,y];<br />
<br />
Then we compute the solution with<br />
$GLPK.MIPSolve(OF, [], LE, GE, Bounds, IntNum, [], "Max");<br />
<br />
<br />
And we achieve:<br />
Solution Status: INTEGER OPTIMAL<br />
Value of objective function: 5<br />
[x[1] - 2, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>cocoaserver</type><br />
</types><br />
<key>lpsolve</key><br />
<key>solve linear programm</key><br />
<key>solve lp</key><br />
<key>GLPK.MIPSolve</key><br />
<wiki-category>Package_GLPK</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPSolve&diff=8389ApCoCoA-1:GLPK.LPSolve2009-04-21T11:33:42Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPSolve</title><br />
<short_description>solve linear programms</short_description><br />
<syntax><br />
GLPK.LPSolve(Objective_f:POLYNOM, EQ_Poly:LIST, LE_Poly:LIST, GE_Poly:LIST, Bounds:LIST, Method:STRING, MinMax:STRING):LIST<br />
</syntax><br />
<description><br />
{{ApCoCoAServer}}<br />
<br />
<itemize><br />
<item>@param <em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item>@param <em>EQ_Poly</em>: List of linear polynomials, which are equivalent to the equality-part in the list of conditions.</item><br />
<item>@param <em>LE_Poly</em>: List of linear polynomials, which are equivalent to the lower or equal-part in the list of conditions.</item><br />
<item>@param <em>GE_Poly</em>: List of linear polynomials, which are equivalent to the greater or equal-part in the list of conditions.</item><br />
<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><br />
<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><br />
<item>@param <em>MinMax</em>: Minimization ("Min") or maximization ("Max"), that's the question.</item><br />
<item>@return List of linear polynomials, the zeros of the polynomials are the points where the optimal value of the objective function is archieved</item><br />
</itemize><br />
<br />
<example><br />
-- We want to maximize the Function y = - 1/2x, <br />
-- with the two conditions y ≤ 6 - 3/4x and y ≥ 1 - x and the bounds 0 ≤ x ≤ 6 and 1/3 ≤ y ≤ 4.<br />
<br />
-- We prename the input of GLPK.LPSol-function.<br />
Use S::=Q[x,y];<br />
OF := 1/2x + y;<br />
LE := [3/4x + y - 6];<br />
GE := [x + y - 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
$GLPK.LPSolve(OF, [], LE, GE, Bounds, "Simplex", "Max");<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>cocoaserver</type><br />
</types><br />
<see>latte.Minimize</see><br />
<see>latte.Maximize</see><br />
<key>lpsolve</key><br />
<key>solve linear programm</key><br />
<key>solve lp</key><br />
<key>GLPK.LPSolve</key><br />
<key>glpk.LPSolve</key><br />
<wiki-category>Package_GLPK</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:GLPK.LPSolve&diff=8388ApCoCoA-1:GLPK.LPSolve2009-04-21T11:26:10Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>GLPK.LPSolve</title><br />
<short_description>solve linear programms</short_description><br />
<syntax><br />
GLPK.LPSolve(Objective_f:POLYNOM, EQ_Poly:LIST, LE_Poly:LIST, GE_Poly:LIST, Bounds:LIST, Method:STRING, MinMax:STRING)<br />
</syntax><br />
<description><br />
{{ApCoCoAServer}}<br />
<br />
<itemize><br />
<item><em>Objective_f</em>: A linear polynomial which is equivalent to the linear objective function.</item><br />
<item><em>EQ_Poly</em>: List of linear polynomials, which are equivalent to the equality-part in the list of conditions.</item><br />
<item><em>LE_Poly</em>: List of linear polynomials, which are equivalent to the lower or equal-part in the list of conditions.</item><br />
<item><em>GE_Poly</em>: List of linear polynomials, which are equivalent to the greater or equal-part in the list of conditions.</item><br />
<item><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><br />
<item><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><br />
<item><em>MinMax</em>: Minimization ("Min") or maximization ("Max"), that's the question.</item><br />
</itemize><br />
<br />
<example><br />
-- We want to maximize the Function y = - 1/2x, <br />
-- with the two conditions y ≤ 6 - 3/4x and y ≥ 1 - x and the bounds 0 ≤ x ≤ 6 and 1/3 ≤ y ≤ 4.<br />
<br />
-- We prename the input of GLPK.LPSol-function.<br />
Use S::=Q[x,y];<br />
OF := 1/2x + y;<br />
LE := [3/4x + y - 6];<br />
GE := [x + y - 1];<br />
Bounds:=[[0,6], [1/3,4]];<br />
<br />
-- Then we compute the solution with<br />
$GLPK.LPSolve(OF, [], LE, GE, Bounds, "Simplex", "Max");<br />
<br />
-- And we achieve:<br />
------------------------------------- <br />
Solution Status: OPTIMAL<br />
Value of objective function: 5333333333/1000000000<br />
[x[1] - 266667/100000, x[2] - 4]<br />
</example><br />
<br />
</description><br />
<types><br />
<type>cocoaserver</type><br />
</types><br />
<see>latte.Minimize</see><br />
<see>latte.Maximize</see><br />
<key>lpsolve</key><br />
<key>solve linear programm</key><br />
<key>solve lp</key><br />
<key>GLPK.LPSolve</key><br />
<key>glpk.LPSolve</key><br />
<wiki-category>Package_GLPK</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Maximize&diff=8386ApCoCoA-1:Latte.Maximize2009-04-21T11:24:25Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Maximize</title><br />
<short_description> Maximizes the objective function over a polyhedral P given by a number of linear constraints</short_description><br />
<syntax><br />
Latte.Maximize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):INT<br />
</syntax><br />
<br />
<description><br />
{{ApCoCoAServer}}<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>ObjectiveF</em>: A linear Polynomial</item><br />
<item>@return The optimal value of the objective function</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
ObjectiveF := x + z;<br />
Latte.Maximize(Equations, LesserEq, GreaterEq, ObjectiveF);<br />
</example><br />
<br />
</description><br />
<types><br />
<type>cocoaserver</type><br />
</types><br />
<see>GLPK.LPSolve</see><br />
<key>LattE</key><br />
<key>Maximize</key><br />
<key>Latte.Maximize</key><br />
<key>latte.Maximize</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandthttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:Latte.Ehrhart&diff=8383ApCoCoA-1:Latte.Ehrhart2009-04-21T09:35:59Z<p>Jbrandt: </p>
<hr />
<div><command><br />
<title>Latte.Ehrhart</title><br />
<short_description> Computes the ehrhart series as a rational funktion for a polyhedral P given by a number of linear constraints</short_description><br />
<syntax><br />
Latte.Ehrhart(Equations: LIST, LesserEq: LIST, GreaterEq: LIST):RATFUN<br />
</syntax><br />
<br />
<syntax><br />
Latte.Ehrhart(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, Degree: INT):RATFUN<br />
</syntax><br />
<br />
<description><br />
{{ApCoCoAServer}}<br />
<br />
<itemize><br />
<item>@param <em>Equations</em>: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints</item><br />
<item>@param <em>LesserEq</em>: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints</item><br />
<item>@param <em>GreaterEq</em>: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints</item><br />
<item>@param <em>Degree</em>: Integer n > 0, when using this parameter, the function computes the Taylor series expansion of the Ehrhart series to degree n</item><br />
<item>@return The Ehrhart-series (or the Taylor series expansion to degree n of the Ehrhart series) of the polyhedral P</item><br />
</itemize><br />
<br />
<example><br />
Use S ::= QQ[x,y];<br />
Equations := [];<br />
LesserEq := [x-1, x+y-1];<br />
GreaterEq := [x,y];<br />
Latte.Ehrhart(Equations, LesserEq, GreaterEq);<br />
</example><br />
<br />
</description><br />
<types><br />
<type>cocoaserver</type><br />
</types><br />
<key>LattE</key><br />
<key>Ehrhart</key><br />
<key>Ehrhart-series</key><br />
<key>Latte.Ehrhart</key><br />
<key>latte.Ehrhart</key><br />
<wiki-category>Package_latte</wiki-category><br />
</command></div>Jbrandt