Retargetable, instance optimized, bare-bone speed, python framework for global optimization problems
MIT License
GOPT is a framework to run global optimization meta-euristics on combinatorial problems (TSP, Bin-Packing, etc...)
The key charactirstics are:
This framework is for example particularly suited for algorithms like:
We describe here the main abstractions used by GOPT. Users can use the ones provided in this repository or swap them by their own implementation.
import numba
import numpy as np
import logging
from gopt.problems import EuclieanTSP
from gopt.optimizers import LocalSearch
from gopt.runners import CPURunner
from gopt.shufflers import IndependentShuffler
logging.basicConfig(format='%(levelname)s [%(name)s]:%(message)s',
level=logging.INFO)
DATA = np.random.uniform(size=(1000, 2)).astype('float32')
NUM_CITIES = DATA.shape[0]
TSP = EuclieanTSP(DATA.shape[0], DATA.shape[1])
Optimizer = LocalSearch(TSP)
Shuffler = IndependentShuffler(Optimizer, 32)
runner = CPURunner(Shuffler, DATA)
result = runner.run(max_iter=1000000000, max_time='1 min')