Skip to main content

Simmulated Annealing

Project description

Simmulated Annealing package for Python

Installation

pip install frigidum

Example Usage

import frigidum

import random

def random_start():
    return 50 + random.random()

def random_small_step(x):
    return x + 0.1 * (random.random() - .5)

def random_big_step(x):
    return x + 10 * (random.random() - .5)

def obj(x):
    return x**2

local_opt = frigidum.sa(random_start=random_start, random_neighbours=[random_small_step, random_big_step], cost_function=obj, T_start=100, T_stop = 0.001, repeats=10**4, copy_state=frigidum.annealing.naked)

Movements

Copy'ing

To-Do:

  • Statistics of acceptance of various movements/neighbors
  • Multitreadding (N simultanous anneals)
  • Drilling (after repeats, re-repeat with low temp)
  • Re-Annealing
  • Auto-set start Tempreature (Based on >90% movemenets)
  • Auto-stop (Based on near 0 movemebts)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

frigidum-0.1.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page