Example #1
0
def solve_parm(
    parms
):  #calls the solve_eq function with all default inputs other than lims
    try:
        os.makedirs("../../raw_output/EnvEq/" + f_name + parms[1]['Case'])
    except:
        pass
    f_name_i = f_name + parms[1]['Case'] + '/' + parms[2] + parms[0][
        'Name'] + "-{}".format(parms[4])
    lim[0, 0, 0] = parms[1]['llo2Tpos']
    lim[0, 0, 1] = parms[1]['ulo2Tpos']
    lim[0, 1, 0] = parms[1]['llo2Tpro']
    lim[0, 1, 1] = parms[1]['ulo2Tpro']
    lim[0, 2, 0] = parms[1]['llo2Tneg']
    lim[0, 2, 1] = parms[1]['ulo2Tneg']
    lim[1, 0, 0] = parms[1]['lltestTpos']
    lim[1, 0, 1] = parms[1]['ultestTpos']
    lim[1, 1, 0] = parms[1]['lltestTpro']
    lim[1, 1, 1] = parms[1]['ultestTpro']
    ic = (parms[3] / parms[3].sum() * parms[4]).astype(np.int)
    y0[0:3] = ic
    ee.solve_eq(t_max,
                dt,
                y0,
                p,
                mu,
                lam,
                r,
                K,
                delta,
                rho,
                lim,
                f_name_i,
                therapy=True,
                therapy_parms=parms[0])
Example #2
0
def solve_parm(
    l_lim_test
):  #calls the solve_eq function with all default inputs other than test_lim
    f_name_i = f_name + "{:.1f}".format(l_lim_test)
    lim[1, 1, 0] = l_lim_test
    lim[1, 1, 1] = l_lim_test + cs_diff
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
def solve_parm(l_lim_o2): #calls the solve_eq function with all default inputs other than o2_lim
    f_name_i=f_name+"{:.1f}".format(l_lim_o2[0])+"-"+"{:.1f}".format(l_lim_o2[1])
    lim[0,0,0]=l_lim_o2[0]
    lim[0,1,0]=l_lim_o2[1]
    lim[0,0,1]=l_lim_o2[0]+cs_diff
    lim[0,1,1]=l_lim_o2[1]+cs_diff
    ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)
Example #4
0
def solve_parm(
    o2_lim
):  #calls the solve_eq function with all default inputs other than o2_lim
    f_name_i = f_name + "{:.1f}".format(o2_lim[0]) + "-" + "{:.1f}".format(
        o2_lim[1])
    lim[0, 1] = o2_lim
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
Example #5
0
def solve_parm(
    u_lim_test
):  #calls the solve_eq function with all default inputs other than test_lim
    f_name_i = f_name + "{:.1f}".format(u_lim_test[0]) + "-" + "{:.1f}".format(
        u_lim_test[1])
    lim[1, 0, 1] = u_lim_test[0]
    lim[1, 1, 1] = u_lim_test[1]
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
def solve_parm(parms): #calls the solve_eq function with all default inputs other than lims
    f_name_i=f_name+"Case"+"{:.1f}".format(parms[0])+'-'+"{:.1f}".format(parms[7])+'-'+"{:.1f}".format(parms[8])
    lim[1,1,1]=parms[1]
    lim[0,1,0]=parms[2]
    lim[0,1,1]=parms[3]
    lim[1,0,1]=parms[4]
    lim[0,0,0]=parms[5]
    lim[0,0,1]=parms[6]
    y0[1]=parms[7]*parms[8]
    y0[0]=(1-parms[7])*parms[8]
    ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)
Example #7
0
def solve_parm(
    lims
):  #calls the solve_eq function with all default inputs other than lims

    f_name_i = f_name + "{:.1f}".format(lims[0, 0])
    for limeet in lims.flatten()[1:]:
        f_name_i += "-{:.1f}".format(limeet)
    lim[0, 2] = lims[0]
    lim[0, 1] = lims[1]
    lim[1, 1] = lims[2]
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
Example #8
0
def solve_parm(parms): #calls the solve_eq function with all default inputs other than lims
    f_name_i=f_name+"Case"+parms[0]['Case']
    lim[0,0,0]=parms[0]['llo2Tpos']
    lim[0,0,1]=parms[0]['ulo2Tpos']
    lim[0,1,0]=parms[0]['llo2Tpro']
    lim[0,1,1]=parms[0]['ulo2Tpro']
    lim[0,2,0]=parms[0]['llo2Tneg']
    lim[0,2,1]=parms[0]['ulo2Tneg']
    lim[1,0,0]=parms[0]['lltestTpos']
    lim[1,0,1]=parms[0]['ultestTpos']
    lim[1,1,0]=parms[0]['lltestTpro']
    lim[1,1,1]=parms[0]['ultestTpro']
    ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)
Example #9
0
def solve_parm(
    parms
):  #calls the solve_eq function with all default inputs other than lims
    f_name_i = f_name + parms['Name']
    ee.solve_eq(t_max,
                dt,
                y0,
                p,
                mu,
                lam,
                r,
                K,
                delta,
                rho,
                lim,
                f_name_i,
                therapy=True,
                therapy_parms=parms)
def solve_parm(
    parms
):  #calls the solve_eq function with all default inputs other than lims
    f_name_i = f_name + parms[1] + "Case-" + parms[0]['Case'] + "-{}".format(
        parms[3])
    lim[0, 0, 0] = parms[0]['llo2Tpos']
    lim[0, 0, 1] = parms[0]['ulo2Tpos']
    lim[0, 1, 0] = parms[0]['llo2Tpro']
    lim[0, 1, 1] = parms[0]['ulo2Tpro']
    lim[0, 2, 0] = parms[0]['llo2Tneg']
    lim[0, 2, 1] = parms[0]['ulo2Tneg']
    lim[1, 0, 0] = parms[0]['lltestTpos']
    lim[1, 0, 1] = parms[0]['ultestTpos']
    lim[1, 1, 0] = parms[0]['lltestTpro']
    lim[1, 1, 1] = parms[0]['ultestTpro']
    ic = (parms[2] / parms[2].sum() * parms[3]).astype(np.int)
    y0[0:3] = ic
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
def solve_parm(
    parms
):  #calls the solve_eq function with all default inputs other than lims
    f_name_i = f_name + parms[0]['Name'] + '{:.2e}-{:.2e}'.format(
        parms[1], parms[2])
    y0[0:3] = (np.array([(1 - parms[1]) / 2,
                         (1 - parms[1]) / 2, parms[1]]) * parms[2])
    therapy_parms = parms[0]
    ee.solve_eq(t_max,
                dt,
                y0,
                p,
                mu,
                lam,
                r,
                K,
                delta,
                rho,
                lim,
                f_name_i,
                therapy=True,
                therapy_parms=therapy_parms)
Example #12
0
def solve_parm(p_test):
    mu_test = p_test - 4.4E-7
    f_name_i = f_name + "{:.2E}".format(p_test)
    p[1] = p_test
    mu[1, 1] = mu_test
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
def solve_parm(
    p_res
):  #calls the solve_eq function with all default inputs other than lims
    f_name_i = f_name + "{:.2e}-{:.2e}".format(p_res[0], p_res[1])
    p = p_res
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
Example #14
0
def solve_parm(
    mu_testTpos
):  #calls the solve_eq function with all default inputs other than o2_lim
    f_name_i = f_name + "{:.2E}".format(mu_testTpos)
    mu[1, 0] = mu_testTpos
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)
for i in range(len(cases)):
    for j in range(len(ratios)):
        for tc in totcell:
            parms_array.append([cases.loc[i],rat[j],ratios[j],tc])

def solve_parm(parms): #calls the solve_eq function with all default inputs other than lims
    f_name_i=f_name+parms[1]+"Case-"+parms[0]['Case']+"-{}".format(parms[3])
>>>>>>> b4111a92b4f2fbdca359bdef3f13bfe117b48b84:codes/EnvEq_sum/parallelizer.py
    lim[0,0,0]=parms[0]['llo2Tpos']
    lim[0,0,1]=parms[0]['ulo2Tpos']
    lim[0,1,0]=parms[0]['llo2Tpro']
    lim[0,1,1]=parms[0]['ulo2Tpro']
    lim[0,2,0]=parms[0]['llo2Tneg']
    lim[0,2,1]=parms[0]['ulo2Tneg']
    lim[1,0,0]=parms[0]['lltestTpos']
    lim[1,0,1]=parms[0]['ultestTpos']
    lim[1,1,0]=parms[0]['lltestTpro']
    lim[1,1,1]=parms[0]['ultestTpro']
<<<<<<< HEAD:input/EnvEq/All3/vb-trials/parallelizer.py
=======
    ic=(parms[2]/parms[2].sum()*parms[3]).astype(np.int)
    y0[0:3]=ic
>>>>>>> b4111a92b4f2fbdca359bdef3f13bfe117b48b84:codes/EnvEq_sum/parallelizer.py
    ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)

if __name__ == '__main__':
    pool = Pool(8)
    pool.map(solve_parm,parms_array) #iterate over the lims
    pool.close()
    pool.join()
def solve_parm(parms): #calls the solve_eq function with all default inputs other than lims
    f_name_i=f_name+"{:.2e}".format(parms[0])+'-'+"{:.2e}".format(parms[1])
    p[0]=parms[0]
    lim[1,1,1]=parms[1]
    ee.solve_eq(t_max,dt,y0,p,mu,lam,r,K,delta,rho,lim,f_name_i)
def solve_parm(p_o2):
    f_name_i = f_name + "{:.2E}".format(p_o2)
    p[0] = p_o2
    ee.solve_eq(t_max, dt, y0, p, mu, lam, r, K, delta, rho, lim, f_name_i)