Ejemplo n.º 1
0
def new_test_sim():
    """Return a new instance of the simulated annealing class
      with 5D test function.
      Don't run optimise on this as objective is constant - will hang."""
    obj = ObjectiveTest()
    sim = SimAnneal(obj, trial_mode='basic', initial_temp_mode='kirkpatrick')
    sim.max_evaluations = 10
    return sim
Ejemplo n.º 2
0
def new_sim2_vanderbilt():
    """Return a new instance of the simulated annealing class
      with 2D Shubert objective function."""
    obj = Shubert(2)
    return SimAnneal(obj,
                     trial_mode='vanderbilt',
                     initial_temp_mode='kirkpatrick')
Ejemplo n.º 3
0
def new_sim5_white():
    """Return a new instance of the simulated annealing class
      with 2D Shubert objective function."""
    obj = Shubert(5)
    return SimAnneal(obj, trial_mode='basic', initial_temp_mode='white')
Ejemplo n.º 4
0
def new_sim2_parks():
    """Return new instance of sim annealing class with 2D
      Shubert function and Parks trial solution method."""
    obj = Shubert(2)
    return SimAnneal(obj, trial_mode='parks', initial_temp_mode='white')
Ejemplo n.º 5
0
def new_test_sim_white():
    """Return a new instance of the simulated annealing class
      with 5D test function."""
    obj = ObjectiveTest()
    return SimAnneal(obj, trial_mode='basic', initial_temp_mode='white')