[理工] 作業研究 動態規劃

作者: lenux (人生到處知何似)   2014-05-19 16:25:38
兩題動態規劃問題請教高手
1. Minimize z = max { f1(y1), f2(y2), f3(y3) }
s.t y1+y2+y3 = 17
y1, y2, y3 >= 0
where f1(y1) = 2y1+5, f2(y2) = y2+3, f3(y3) = y3-5
2. A company meed the following number of workers during the next 4 years
Year 1 2 3 4
# of workers 3 6 2 5
At present, the company has 5 workers. Each worker is paid $30,000 per year
At the beginning of each year, workers may be hired or fired. It costs
$10,000 to hire a worker and $25,000 to fire a worker. A newly hired worker
cannot be used to meet worker requirement until the year following the year
in which they are hired (They are paid for the year they are hired).
During each year, 1 worker quits (workers who quit do not incur any firing
cost). The number of workers have to be integer. Use dynamic programming to
determine the optimal hiring and firing schedule to minimize the total cost
incured in meeting the worker requirement in the next 4 years.
作者: darrenmm (mm)   2014-05-20 16:41:00
作業自己寫 不懂得點提出來再問= =
作者: lenux (人生到處知何似)   2014-05-21 09:01:00
這才不是作業 你這樣講請問你會嗎
作者: loveann   2014-05-21 16:16:00
你是題目看不懂?還是哪個計算步驟卡住?
作者: lenux (人生到處知何似)   2014-05-21 22:37:00
同樣問問題怎麼有人直接貼問題就有人回,看太多不會寫的嗆人作業自己寫了....
作者: Honor1984 (希望願望成真)   2014-05-22 00:46:00
抱歉 這門非我專業 沒能夠幫你...
作者: y800122155 (@__@)   2014-05-26 13:28:00
改寫成y=af+b代回條件限制式 0.5f1+f2+f3=17.5
作者: y800122155 (@__@)   2014-05-26 13:29:00
接下來就用DP的方式一個stage一個stage這樣算下去
作者: y800122155 (@__@)   2014-05-26 13:33:00
y1=1,y2=4,y3=12,Z*=7 但是DP最重要的是"過程"不是答案
作者: lenux (人生到處知何似)   2014-05-28 20:03:00
謝謝樓上!我會寫第一題了 另外也謝謝H大

Links booklink

Contact Us: admin [ a t ] ucptt.com