Algorithm-Bertsekas

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
   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,    print 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

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
my ( $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

1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
   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 )