第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Python SciPy ODE求解器未收斂

Python SciPy ODE求解器未收斂

桃花長(zhǎng)相依 2021-05-06 14:16:06
我正在嘗試使用scipy的ode求解器來(lái)繪制2D方程組之間的相互作用。我正在嘗試通過(guò)以下代碼塊更改傳遞給求解器的參數(shù):# define maximum number of iteration steps for ode solver iterationm = 1 #power of iterationN = 2**m #number of steps# setup a try-catch formulation to increase the number of steps as needed for solution to convergewhile True:    try:        z = ode(stateEq).set_integrator("vode",nsteps=N,method='bdf',max_step=5e5)        z.set_initial_value(x0, t0)        for i in range(1, t.size):            if i%1e3 == 0:                print 'still integrating...'            x[i, :] = z.integrate(t[i]) # get one more value, add it to the array            if not z.successful():                raise RuntimeError("Could not integrate")        break    except:        m += 1        N = 2**m        if m%2 == 0:            print 'increasing nsteps...'            print 'nsteps = ', N運(yùn)行它不會(huì)中斷while循環(huán)。它會(huì)永遠(yuǎn)增加nstep,而系統(tǒng)永遠(yuǎn)也不會(huì)解決。我認(rèn)為,如果不將其放入while循環(huán)中,則系統(tǒng)會(huì)得到解決,因?yàn)榻鉀Q方案已被標(biāo)繪。while循環(huán)是否必要?我的求解器公式不正確嗎?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 306 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)