Exemplo n.º 1
0
def sphere_ND(CPVs, OFE_budgets, randomSeed):
    anneal_module.fast_sa_run(prob_id=2,
                              x0=-100 + 200 * numpy.random.rand(D),
                              dwell=int(CPVs[0]),
                              m=CPVs[1],
                              maxevals=max(OFE_budgets),
                              random_seed=randomSeed,
                              lower=-100.0 * numpy.ones(D),
                              upper=100.0 * numpy.ones(D),
                              **anneal_KWs)
    return get_F_vals_at_specified_OFE_budgets(
        F=anneal_module.fval_hist.copy(),
        E=anneal_module.eval_hist.copy(),
        E_desired=OFE_budgets)
def sphere_ND(CPVs, OFE_budgets, randomSeed):
    anneal_module.fast_sa_run(
        prob_id=2,
        x0=-100 + 200 * numpy.random.rand(D),
        dwell=int(CPVs[0]),
        m=CPVs[1],
        maxevals=max(OFE_budgets),
        random_seed=randomSeed,
        lower=-100.0 * numpy.ones(D),
        upper=100.0 * numpy.ones(D),
        **anneal_KWs
    )
    return get_F_vals_at_specified_OFE_budgets(
        F=anneal_module.fval_hist.copy(), E=anneal_module.eval_hist.copy(), E_desired=OFE_budgets
    )
def anneal(CPVs, OFE_budgets, randomSeed):
    #fast_sa_run - Function signature:
    #  fast_sa_run(prob_id,x0,t0,dwell,m,n,quench,boltzmann,maxevals,lower,upper,random_seed,[d])
    anneal_module.fast_sa_run(prob_id = 1 ,
                              x0 = -2.048 + 2*2.048*numpy.random.rand(D),
                              t0 = 500.0,
                              dwell = int(CPVs[0]),
                              m = CPVs[1],
                              n = 1.0,
                              quench = 1.0,
                              boltzmann = 1.0,
                              maxevals = max(OFE_budgets),
                              lower = -2.048*numpy.ones(D),
                              upper =  2.048*numpy.ones(D),
                              random_seed = randomSeed)
    return get_F_vals_at_specified_OFE_budgets(F=anneal_module.fval_hist.copy(), E=anneal_module.eval_hist.copy(), E_desired=OFE_budgets)
Exemplo n.º 4
0
def anneal(CPVs, OFE_budgets, randomSeed):
    #fast_sa_run - Function signature:
    #  fast_sa_run(prob_id,x0,t0,dwell,m,n,quench,boltzmann,maxevals,lower,upper,random_seed,[d])
    anneal_module.fast_sa_run(prob_id=1,
                              x0=-2.048 + 2 * 2.048 * numpy.random.rand(D),
                              t0=500.0,
                              dwell=int(CPVs[0]),
                              m=CPVs[1],
                              n=1.0,
                              quench=1.0,
                              boltzmann=1.0,
                              maxevals=max(OFE_budgets),
                              lower=-2.048 * numpy.ones(D),
                              upper=2.048 * numpy.ones(D),
                              random_seed=randomSeed)
    return get_F_vals_at_specified_OFE_budgets(
        F=anneal_module.fval_hist.copy(),
        E=anneal_module.eval_hist.copy(),
        E_desired=OFE_budgets)