Algorithm-Bertsekas
view release on metacpan or search on metacpan
254255256257258259260261262263264265266267268269270271272273
indexes ( 5, 6 ), matrix value = 99 ; sum of
values
= 694
indexes ( 6, 2 ), matrix value = 99 ; sum of
values
= 793
indexes ( 2, 1 ), matrix value = 100 ; sum of
values
= 893
OPTIONS
matrix_ref
=> \
@input_matrix
, reference to array: matrix N x M.
maximize_total_benefit
=> 0, 0: minimize the total benefit ; 1: maximize the total benefit.
inicial_stepsize
=> 1, auction algorithm terminates
with
a feasible assignment
if
the problem data are integer and stepsize < 1/min(N,M).
inicial_price
=> 0,
verbose
=> 3,
messages on the screen, level of verbosity, 0: quiet; 1, 2, 3, 4, 5, 8, 9, 10: debug information.
EXPORT
"auction"
function by
default
.
INPUT
The input matrix should be in a two dimensional array (array of array)
and the
'auction'
subroutine expects a reference to this array.
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
171819202122232425262728293031323334353637my
(
$need_transpose
,
$inicial_price
,
$iter_count_global
,
$iter_count_local
);
my
(
$epsilon_scaling
,
$max_epsilon_scaling
,
$max_matrix_value
,
$target
,
$output
);
my
(
%index_correlation
,
%assignned_object
,
%assignned_person
,
%price_object
);
my
(
%objects_desired_by_this
,
%locked_list
,
%seen_person
,
%seen_assignned_objects
);
sub
auction {
# => default values
my
%args
= (
matrix_ref
=>
undef
,
# reference to array: matrix N x M
maximize_total_benefit
=> 0,
# 0: minimize_total_benefit ; 1: maximize_total_benefit
inicial_stepsize
=>
undef
,
# auction algorithm terminates with a feasible assignment if the problem data are integer and stepsize < 1/min(N,M)
inicial_price
=> 0,
verbose
=> 3,
# level of verbosity, 0: quiet; 1, 2, 3, 4, 5, 8, 9, 10: debug information.
@_
,
# argument pair list goes here
);
$max_matrix_value
= 0;
$iter_count_global
= 0;
$epsilon_scaling
= 0;
$need_transpose
= 0;
%index_correlation
= ();
%assignned_object
= ();
%assignned_person
= ();
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
10261027102810291030103110321033103410351036103710381039104010411042104310441045
indexes ( 5, 6 ), matrix value = 99 ; sum of
values
= 694
indexes ( 6, 2 ), matrix value = 99 ; sum of
values
= 793
indexes ( 2, 1 ), matrix value = 100 ; sum of
values
= 893
=head1 OPTIONS
matrix_ref => \@input_matrix, reference to array: matrix N x M.
maximize_total_benefit => 0, 0: minimize the total benefit ; 1: maximize the total benefit.
inicial_stepsize => 1, auction algorithm terminates with a feasible assignment if the problem data are integer and stepsize < 1/min(N,M).
inicial_price => 0,
verbose => 3, print messages on the screen, level of verbosity, 0: quiet; 1, 2, 3, 4, 5, 8, 9, 10: debug information.
=head1 EXPORT
"auction" function by default.
=head1 INPUT
The input matrix should be in a two dimensional array (array of array)
and the 'auction' subroutine expects a reference to this array.
( run in 0.579 second using v1.01-cache-2.11-cpan-95122f20152 )