AI-SimulatedAnnealing

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

AI::SimulatedAnnealing version 1.02

DESCRIPTION

    This distribution includes the following modules:

        AI::SimulatedAnnealing - Exports a single public function,
        anneal(), for optimizing a list of numbers according to a
        specified cost function.

REQUIREMENTS

    These modules require Perl 5, version 5.10.1 or later.

INSTALLATION

    To install the modules included in this distribution, simply copy

lib/AI/SimulatedAnnealing.htm  view on Meta::CPAN

    <hr/>
    <h1><a name="synopsis">SYNOPSIS</a></h1>
    <pre>
  <span class="keyword">use</span> <span class="variable">AI::SimulatedAnnealing</span><span class="operator">;</span>
</pre>
    <pre>
  <span class="variable">$optimized_list</span> <span class="operator">=</span> <span class="variable">anneal</span><span class="operator">(</span><span class="variable">$number_specs</span><span class="operator">,</span> <span class="variable">$cost...
</pre>
    <hr/>
    <h1><a name="description">DESCRIPTION</a></h1>
    <p>This module provides a single public function, <a
      href="#anneal"><code>anneal()</code></a>, that optimizes a list of
      numbers according to a specified cost function.</p>
    <p>Each number to be optimized has a lower bound, an upper bound, and a
      precision, where the precision is an integer in the range 0&#8211;4
      that specifies the number of decimal places to which all instances of
      the number will be rounded. The upper bound must be greater than the
      lower bound but not greater than 10 to the power of
      <code>(4&#160;-&#160;p)</code>, where <code>p</code> is the precision.
      The lower bound must be not less than <code>-1</code> times the result
      of taking 10 to the power of <code>(4&#160;-&#160;p)</code>.</p>

lib/AI/SimulatedAnnealing.pm  view on Meta::CPAN

####
# SimulatedAnnealing.pm:  A Perl module that exports a single public
# function, anneal(), for optimizing a list of numbers according to a
# specified cost function.
#
####
#
# Copyright 2010 by Benjamin Fitch.
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
####

lib/AI/SimulatedAnnealing.pm  view on Meta::CPAN


=head1 SYNOPSIS

  use AI::SimulatedAnnealing;

  $optimized_list = anneal(
    $number_specs, $cost_function, $cycles_per_temperature);

=head1 DESCRIPTION

This module provides a single public function, anneal(), that optimizes
a list of numbers according to a specified cost function.

Each number to be optimized has a lower bound, an upper bound, and a
precision, where the precision is an integer in the range 0 to 4 that
specifies the number of decimal places to which all instances of the
number will be rounded.  The upper bound must be greater than the
lower bound but not greater than 10 to the power of (4 - p), where "p"
is the precision.  The lower bound must be not less than -1 times the
result of taking 10 to the power of (4 - p).



( run in 0.291 second using v1.01-cache-2.11-cpan-64827b87656 )