Name
Algorithm::Simplex::Role::Solve - solve() method implemented as Moose role.
Synposis
use
Data::Dumper;
my
$matrix
= [
[ 5, 2, 30],
[ 3, 4, 20],
[10, 8, 0],
];
my
$tableau_object
= Algorithm::Simplex::Rational->new(
tableau
=>
$matrix
);
$tableau_object
->solve;
Dumper
$tableau_object
->display_tableau;
my
(
$primal_solution
,
$dual_solution
) =
$tableau_object
->current_solution;
Dumper
$primal_solution
;
Dumper
$dual_solution
;