Algorithm-Simplex
view release on metacpan or search on metacpan
Name
Algorithm::Simplex - Simplex Algorithm Implementation using Tucker
Tableaux
Synopsis
Given a linear program formulated as a Tucker tableau, a 2D matrix or
ArrayRef[ArrayRef] in Perl, seek an optimal solution.
use Algorithm::Simplex::Rational;
my $matrix = [
[ 5, 2, 30],
[ 3, 4, 20],
[10, 8, 0],
];
my $tableau = Algorithm::Simplex::Rational->new( tableau => $matrix );
$tableau->solve;
lib/Algorithm/Simplex.pm view on Meta::CPAN
is => 'lazy',
isa => ArrayRef [ HashRef [Str] ],
);
=head1 Name
Algorithm::Simplex - Simplex Algorithm Implementation using Tucker Tableaux
=head1 Synopsis
Given a linear program formulated as a Tucker tableau, a 2D matrix or
ArrayRef[ArrayRef] in Perl, seek an optimal solution.
use Algorithm::Simplex::Rational;
my $matrix = [
[ 5, 2, 30],
[ 3, 4, 20],
[10, 8, 0],
];
my $tableau = Algorithm::Simplex::Rational->new( tableau => $matrix );
$tableau->solve;
t/basic_feasible.t view on Meta::CPAN
use strict;
use warnings FATAL => 'all';
use Test::More;
use Algorithm::Simplex::Float;
# Basic Feasible Solution: BFS
# Test a formulation (initial matrix) that is NOT BFS.
my $not_bfs_matrix = [
[ 1, -0.411, 0.313, 0.429, -3424.5 ],
[ -1.851, 1, -0.422, -0.692, -8911.9 ],
[ 2.819, -0.884, 1, 1.295, -6763.1 ],
[ 1.93, -0.692, 0.648, 1, -5403 ],
[ 1, 0, 0, 0, 100 ],
[ 0, 1, 0, 0, 1000 ],
[ 0, 0, 1, 0, 500 ],
[ 292, 11.3674, 242.707, 61.7215, 0 ],
];
( run in 0.800 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )