Artifact 9e116025614a9d684e4b1afd6bf14a6f2d662eeb3170b74e7e344d9f11a91084:
- File
r34.1/lib/linineq.tst
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 2356) [annotate] [blame] [check-ins using] [more...]
- File
r34/lib/linineq.tst
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 2356) [annotate] [blame] [check-ins using]
- File
r35/lib/linineq.tst
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 2356) [annotate] [blame] [check-ins using]
% Examples taken from G.B. Dantzig. lll := {x1 >= 0, x1+2x2 <= 6, x1 + x2 >= 2, x1 - x2 >= 3, x2 >= 0, -2 x1 -x2 <= z }; sol := linineq(lll,{x1,x2,z=min}); sol := linineq(lll,{x1,x2,z=min},record=t); linineq({z = x1 + 2 x2 + 3 x3 + 4 x4, 4 = x1 + x2 + x3 + x4, -2 = x1 - 2 x2 + 3 x3 - 4 x4, x1>=0, x2>=0, x3>=0,x4>=0}, {z=min}); linineq({z = x1 + 2 x2 + 3 x3 + 4 x4, 4 = x1 + x2 + x3 + x4, -2 = x1 - 2 x2 + 3 x3 - 4 x4, x1>=0, x2>=0, x3>=0,x4>=0}, {z=max}); linineq({ x1 + x2 >= 1, x1 + x2 <= 2, x1 - x2 <= 1, x1 - x2 >=-1, -x2 =z } , {z=min}); linineq({ 5x1 - 4x2 + 13x3 - 2x4 + x5 = 20, x1 - x2 + 5x3 - x4 + x5 = 8, x1 + 6x2 - 7x3 + x4 + 5x5 = z, x1>=0,x2>=0,x3>=0,x4>=0,x5>=0}, {z=min}); % Examples for integer and mixed integer linear programming % (Beightler, Phillips, Wilde, pp. 142 ff) linineq({z= 3x1 + 2x2, 5x1 + 4x2 <= 23.7, x1 >= 0, x2 >= 0}, {z=max}, int={x1,x2}); linineq({z= x1 + x2, -2x1 + 5x2 <= 8, 6x1 + x2 <= 30, x1 >= 0, x2 >= 0}, {z=max}, int={x1,x2}); linineq({z=-7x1 + 106x2, -x1 + 15x2 <= 90, x1 + 2x2 <= 35, -3x1 + 4x2 <= 12, x1 >= 0, x2 >= 0}, {z=max}, int={x1,x2}); linineq({z=9x1 + 6x2 + 5x3, 2x1 + 3x2 + 7x3 <= 35/2, 4x1 + 9x3 <= 15, x1 >= 0, x2 >= 0, x3 >= 0}, {z=max}, int={x1}); % a case where the extremum requirement cannot be resolved sol := linineq(lll,{x1,x2,z=max}); % print the selection from the intervals: on prlinineq; sol := linineq(lll,{x1,x2,z=min}); sol := linineq(lll,{x1,x2,z=max}); % print the full elimination process on trlinineq; sol := linineq(lll,{x1,x2,z=min}); end;