Matematik model optimallashtirish foyda ishlab chiqarish
Foydalanilgan adabiyotlar ro’yxati
Download 121.83 Kb.
|
Matematik modelni standart chiziqli dasturlash muammosi shaklida
Foydalanilgan adabiyotlar ro’yxati
Yusupbekov N.R., Muxitdinov D.P. Texnologik jarayonlarni modellashtirish va optimallashtirish asoslari. Oliy o’quv yurtlari uchun darslik, 2-nasr: qayta ishlangan va to’ldirilgan, T.”Fan va texnologiya”,-2019. Yusupbekov N.R., Muxitdinov D.P., Bazarov M.B. Elektron hisoblash mashinalarini kimyo texnologiyasida qo`llash. Darslik, Toshkent. O`zbekiston Respublikasi fanlar akademiyasi. "Fan"-2010 yil. 392 b. Yusupbekov N.R., Muxitdinov D.P., Bazarov M.B., Xalilov A.J. Boshqarish sistemalarini kompyuterli modellashtirish asoslari: O’quv qo’llanma.- Navoiy: «Navoiy Gold Servis».- 2008. - 184 bet. Luigi Bocola. Identifying Neutral Technology Shocks, University of Pennsylvania, 2014 Yusupbekov N.R., Muxitdinov D.P. Texnologik jarayonlarni modellashtirish va identifikatsiyalash. Oliy o’quv yurtlari uchun o’quv qo’llanma, T.”Fan va texnologiya”,-2019. Ilova Dim mas_Bazis(1 dan 5 gacha) bayt sifatida Dim mas_P0(1 dan 5 gacha) Yagona Dim mas_Sb(1 dan 5 gacha) bayt sifatida Dim mas_P1_10(1 dan 5 gacha, 1 dan 10 gacha) Yagona Dim mas_Delti(1 dan 10 gacha) Single sifatida Dim mas_Prib(1 dan 10 gacha) Single sifatida Umumiy optima sifatida String Ommaviy raz_elem, nap_stl_el As Single Umumiy nap_str, nap_stl Bayt sifatida Ommaviy kol_iter, kol_iter_nado Bayt sifatida Umumiy str_F String sifatida Umumiy raqam Mantiqiy sifatida Umumiy F butun son sifatida Ommaviy vid_resch bayt sifatida Dim mas_mesto_x(1 dan 5 gacha) bayt sifatida Umumiy str_opt_x String sifatida Ommaviy Sub Reschenie(bayt sifatida vid_resch, bayt sifatida kol_iter) Agar ((vid_resch = 1) Yoki (vid_resch = 2 va kol_iter = 1)) keyin Ma'lumotlarni to'ldirish kol_iter_nado = 1 i = 1 dan 5 gacha mas_place_x(i) = 0 Keyingi i '----- mas_P0(1) = CDbl(GL.T_kol_res_1.Matn): mas_P0(2) = CDbl(GL.T_kol_res_2.Matn) mas_P0(3) = CDbl(GL.T_kol_res_3.Matn): mas_P0(4) = CDbl(GL.T_kol_res_4.Matn) mas_P0(5) = CDbl(GL.T_kol_res_5.Matn) '----- mas_P1_10(1, 1) = CDbl(GL.T_a_11.Matn): mas_P1_10(1, 2) = CDbl(GL.T_a_12.Matn) mas_P1_10(1, 3) = CDbl(GL.T_a_13.Matn): mas_P1_10(1, 4) = CDbl(GL.T_a_14.Matn) mas_P1_10(1, 5) = CDbl(GL.T_a_15.Matn): mas_P1_10(1, 6) = 1 mas_P1_10(1, 7) = 0: mas_P1_10(1, 8) = 0 mas_P1_10(1, 9) = 0: mas_P1_10(1, 10) = 0 mas_P1_10(2, 1) = CDbl(GL.T_a_21.Matn): mas_P1_10(2, 2) = CDbl(GL.T_a_22.Matn) mas_P1_10(2, 3) = CDbl(GL.T_a_23.Matn): mas_P1_10(2, 4) = CDbl(GL.T_a_24.Matn) mas_P1_10(2, 5) = CDbl(GL.T_a_25.Matn): mas_P1_10(2, 6) = 0 mas_P1_10(2, 7) = 1: mas_P1_10(2, 8) = 0 mas_P1_10(2, 9) = 0: mas_P1_10(2, 10) = 0 mas_P1_10(3, 1) = CDbl(GL.T_a_31.Matn): mas_P1_10(3, 2) = CDbl(GL.T_a_32.Matn) mas_P1_10(3, 3) = CDbl(GL.T_a_33.Matn): mas_P1_10(3, 4) = CDbl(GL.T_a_34.Matn) mas_P1_10(3, 5) = CDbl(GL.T_a_35.Matn): mas_P1_10(3, 6) = 0 mas_P1_10(3, 7) = 0: mas_P1_10(3, 8) = 1 mas_P1_10(3, 9) = 0: mas_P1_10(3, 10) = 0 mas_P1_10(4, 1) = CDbl(GL.T_a_41.Matn): mas_P1_10(4, 2) = CDbl(GL.T_a_42.Matn) mas_P1_10(4, 3) = CDbl(GL.T_a_43.Matn): mas_P1_10(4, 4) = CDbl(GL.T_a_44.Matn) mas_P1_10(4, 5) = CDbl(GL.T_a_45.Matn): mas_P1_10(4, 6) = 0 mas_P1_10(4, 7) = 0: mas_P1_10(4, 8) = 0 mas_P1_10(4, 9) = 1: mas_P1_10(4, 10) = 0 mas_P1_10(5, 1) = CDbl(GL.T_a_51.Matn): mas_P1_10(5, 2) = CDbl(GL.T_a_52.Matn) mas_P1_10(5, 3) = CDbl(GL.T_a_53.Matn): mas_P1_10(5, 4) = CDbl(GL.T_a_54.Matn) mas_P1_10(5, 5) = CDbl(GL.T_a_55.Matn): mas_P1_10(5, 6) = 0 mas_P1_10(5, 7) = 0: mas_P1_10(5, 8) = 0 mas_P1_10(5, 9) = 0: mas_P1_10(5, 10) = 1 '------ mas_Bazis(1) = 6: mas_Bazis(2) = 7 mas_Bazis(3) = 8: mas_Bazis(4) = 9: mas_Bazis(5) = 10 '------ i = 1 dan 5 gacha mas_Sb(i) = 0 Keyingi i '------ mas_Delti(1) = -CDbl(GL.T_prib_1.Matn) mas_Delti(2) = -CDbl(GL.T_prib_2.Matn) mas_Delti(3) = -CDbl(GL.T_prib_3.Matn) mas_Delti(4) = -CDbl(GL.T_prib_4.Matn) mas_Delti(5) = -CDbl(GL.T_prib_5.Matn) mas_Delti(6) = 0 mas_Delti(7) = 0: mas_Delti(8) = 0 mas_Delti(9) = 0: mas_Delti(10) = 0 '------ mas_Prib(1) = CDbl(GL.T_prib_1.Matn) mas_Prib(2) = CDbl(GL.T_prib_2.Matn) mas_Prib(3) = CDbl(GL.T_prib_3.Matn) mas_Prib(4) = CDbl(GL.T_prib_4.Matn) mas_Prib(5) = CDbl(GL.T_prib_5.Matn) mas_Prib(6) = 0 mas_Prib(7) = 0: mas_Prib(8) = 0 mas_Prib(9) = 0: mas_Prib(10) = 0 ' Ma'lumotlarni to'ldirish tugallandi. Agar tugaydi Optimallikni hisoblash Do optima="y" Reja optimal yoki yo'qligini tekshiring: i = 1 dan 10 gacha Agar (mas_Delti(i) < 0) bo'lsa optima="n" Agar tugasa Keyingi i Optimallik testi yakunlandi Agar reja maqbul bo'lmasa, biz simpleks jadvallarini ko'rib chiqamiz: Agar optima = "n" bo'lsa kol_iter = kol_iter + 1 ' hidoyat elementlari nap_stl_el = 0 i = 1 dan 10 gacha Agar nap_stl_el > mas_Delti(i) Keyin nap_stl_el = mas_Delti(i) nap_stl = i Agar tugasa Keyingi i '----- i = 0 Do i = i + 1 Agar (mas_P0(i) > 0 va mas_P1_10(i, nap_stl) > 0) bo'lsa nap_str_el = mas_P0(i) / mas_P1_10(i, nap_stl) Agar tugasa Loop while (mas_P1_10(i, nap_stl) <= 0 Yoki mas_P0(i) <= 0) '----- i = 1 dan 5 gacha Agar (mas_P0(i) > 0 va mas_P1_10(i, nap_stl) > 0) bo'lsa Agar (nap_str_el >= (mas_P0(i) / mas_P1_10(i, nap_stl)))) Keyin nap_str_el = mas_P0(i) / mas_P1_10(i, nap_stl) nap_str = i Agar tugasa Agar tugasa Keyingi i '----- raz_elem = mas_P1_10(nap_str, nap_stl) '----- mas_P0(nap_str) = mas_P0(nap_str) / raz_elem i = 1 dan 5 gacha Agar (mas_P1_10(i, nap_stl) <> 0 Va i <> nap_str) bo'lsa mas_P0(i) = mas_P0(i) - (mas_P1_10(i, nap_stl) * mas_P0(nap_str)) Agar tugasa Keyingi i mas_Bazis(nap_str) = nap_stl mas_Sb(nap_str) = mas_Prib(nap_stl) 'Delti(nap_stl) '-CDbl(mas_Delti(nap_stl)) ' Xato ===== raz_elem i = 1 dan 10 gacha mas_P1_10(nap_str, i) = mas_P1_10(nap_str, i) / raz_elem Keyingi i i = 1 dan 5 gacha Agar (nap_str <> i) Keyin Y = mas_P1_10(i, nap_stl) x = 1 dan 10 gacha mas_P1_10(i, x) = mas_P1_10(i, x) - (Y * mas_P1_10(nap_str, x)) Keyingi x Agar tugasa Keyingi i i = 1 dan 10 gacha mas_Delti(i) = 0 x = 1 dan 5 gacha Agar (mas_Sb(x) <> 0) bo'lsa mas_Delti(i) = mas_Delti(i) + (mas_Sb(x) * mas_P1_10(x, i)) Agar tugaydi Keyingi x mas_Delti(i) = mas_Delti(i) - mas_Prib(i) Keyingi i Agar tugasa Loop while ((vid_resch = 1 Va optima = "n") Yoki (vid_resch = 2 Va optima = "n" Va kol_iter <> kol_iter_nado + 1)) Optimallikni hisoblash tugallandi. optima="y" Reja optimal yoki yo'qligini tekshiring: i = 1 dan 10 gacha Agar (mas_Delti(i) < 0) bo'lsa optima="n" Oxiri Agar Keyingisi i Optimallik sinovi tugadi. Agar (optima = "y" Yoki kol_iter = kol_iter_nado) Keyin main.Command1.Enabled = False 'Command2.Enabled = rost Agar tugasa ' Xulosa natijalar main.T_bas_1.Text = "P" + Str(mas_Bazis(1)) main.T_bas_2.Text = "P" + Str(mas_Bazis(2)) main.T_bas_3.Text = "P" + Str(mas_Bazis(3)) main.T_bas_4.Text = "P" + Str(mas_Bazis(4)) main.T_bas_5.Text = "P" + Str(mas_Bazis(5)) '---------------- main.T_sb_1.Text = Str(mas_Sb(1)) main.T_sb_2.Text = Str(mas_Sb(2)) main.T_sb_3.Text = Str(mas_Sb(3)) main.T_sb_4.Text = Str(mas_Sb(4)) main.T_sb_5.Text = Str(mas_Sb(5)) '---------------- main.T_P0_1.Text = Str(Format(mas_P0(1), "#.00")) main.T_P0_2.Text = Str(Format(mas_P0(2), "#.00")) main.T_P0_3.Text = Str(Format(mas_P0(3), "#.00")) main.T_P0_4.Text = Str(Format(mas_P0(4), "#.00")) main.T_P0_5.Text = Str(Format(mas_P0(5), "#.00")) '---------------- main.T_P_11.Matn = Format(mas_P1_10(1, 1), "0.##") main.T_P_12.Matn = Format(mas_P1_10(1, 2), "0.##") main.T_P_13.Matn = Format(mas_P1_10(1, 3), "0.##") main.T_P_14.Matn = Format(mas_P1_10(1, 4), "0.##") main.T_P_15.Matn = Format(mas_P1_10(1, 5), "0.##") main.T_P_16.Matn = Format(mas_P1_10(1, 6), "0.##") main.T_P_17.Matn = Format(mas_P1_10(1, 7), "0.##") main.T_P_18.Matn = Format(mas_P1_10(1, 8), "0.##") main.T_P_19.Matn = Format(mas_P1_10(1, 9), "0.##") main.T_P_110.Matn = Format(mas_P1_10(1, 10), "0.##") main.T_P_21.Matn = Format(mas_P1_10(2, 1), "0.##") main.T_P_22.Matn = Format(mas_P1_10(2, 2), "0.##") main.T_P_23.Matn = Format(mas_P1_10(2, 3), "0.##") main.T_P_24.Matn = Format(mas_P1_10(2, 4), "0.##") main.T_P_25.Matn = Format(mas_P1_10(2, 5), "0.##") main.T_P_26.Matn = Format(mas_P1_10(2, 6), "0.##") main.T_P_27.Matn = Format(mas_P1_10(2, 7), "0.##") main.T_P_28.Matn = Format(mas_P1_10(2, 8), "0.##") main.T_P_29.Matn = Format(mas_P1_10(2, 9), "0.##") main.T_P_210.Matn = Format(mas_P1_10(2, 10), "0.##") main.T_P_31.Matn = Format(mas_P1_10(3, 1), "0.##") main.T_P_32.Matn = Format(mas_P1_10(3, 2), "0.##") main.T_P_33.Matn = Format(mas_P1_10(3, 3), "0.##") main.T_P_34.Matn = Format(mas_P1_10(3, 4), "0.##") main.T_P_35.Matn = Format(mas_P1_10(3, 5), "0.##") main.T_P_36.Matn = Format(mas_P1_10(3, 6), "0.##") main.T_P_37.Matn = Format(mas_P1_10(3, 7), "0.##") main.T_P_38.Matn = Format(mas_P1_10(3, 8), "0.##") main.T_P_39.Matn = Format(mas_P1_10(3, 9), "0.##") main.T_P_310.Matn = Format(mas_P1_10(3, 10), "0.##") main.T_P_41.Matn = Format(mas_P1_10(4, 1), "0.##") main.T_P_42.Matn = Format(mas_P1_10(4, 2), "0.##") main.T_P_43.Matn = Format(mas_P1_10(4, 3), "0.##") main.T_P_44.Matn = Format(mas_P1_10(4, 4), "0.##") main.T_P_45.Matn = Format(mas_P1_10(4, 5), "0.##") main.T_P_46.Matn = Format(mas_P1_10(4, 6), "0.##") main.T_P_47.Matn = Format(mas_P1_10(4, 7), "0.##") main.T_P_48.Matn = Format(mas_P1_10(4, 8), "0.##") main.T_P_49.Matn = Format(mas_P1_10(4, 9), "0.##") main.T_P_410.Matn = Format(mas_P1_10(4, 10), "0.##") main.T_P_51.Matn = Format(mas_P1_10(5, 1), "0.##") main.T_P_52.Matn = Format(mas_P1_10(5, 2), "0.##") main.T_P_53.Matn = Format(mas_P1_10(5, 3), "0.##") main.T_P_54.Matn = Format(mas_P1_10(5, 4), "0.##") main.T_P_55.Matn = Format(mas_P1_10(5, 5), "0.##") main.T_P_56.Matn = Format(mas_P1_10(5, 6), "0.##") main.T_P_57.Matn = Format(mas_P1_10(5, 7), "0.##") main.T_P_58.Matn = Format(mas_P1_10(5, 8), "0.##") main.T_P_59.Matn = Format(mas_P1_10(5, 9), "0.##") main.T_P_510.Matn = Format(mas_P1_10(5, 10), "0.##") '---------------- main.L_F_max.Caption="F=" str_F = "" num = noto'g'ri F=0 i = 1 dan 5 gacha Agar mas_Sb(i) <> 0 bo'lsa Agar raqam = False, keyin str_F = str_F + Str(mas_Sb(i)) + "*" + Str(Format(mas_P0(i), "#.00")) raqam=To'g'ri F = F + mas_Sb(i) * mas_P0(i) Boshqa str_F = str_F + "+" + Str(mas_Sb(i)) + "*" + Str(Format(mas_P0(i), "#.00")) F = F + mas_Sb(i) * mas_P0(i) Agar tugasa Agar tugasa Keyingi i main.T_F = "F=" & Str(F) main.L_F_max.Caption = main.L_F_max.Caption & str_F & "=" & Str(F) '---------------- main.T_delt_1.Matn = Format(mas_Delti(1), "0.##") main.T_delt_2.Matn = Format(mas_Delti(2), "0.##") main.T_delt_3.Matn = Format(mas_Delti(3), "0.##") main.T_delt_4.Matn = Format(mas_Delti(4), "0.##") main.T_delt_5.Matn = Format(mas_Delti(5), "0.##") main.T_delt_6.Matn = Format(mas_Delti(6), "0.##") main.T_delt_7.Matn = Format(mas_Delti(7), "0.##") main.T_delt_8.Matn = Format(mas_Delti(8), "0.##") main.T_delt_9.Matn = Format(mas_Delti(9), "0.##") main.T_delt_10.Matn = Format(mas_Delti(10), "0.##") '---------------- main.L_kol_iter.Caption = Str(kol_iter) Agar optima = "y" bo'lsa main.L_opt_d.Caption = " ha " str_opt_x = "{" i = 1 dan 5 gacha Agar mas_Sb(i) > 0 bo'lsa mas_mesto_x(mas_Bazis(i)) = mas_P0(i) Agar tugaydi Keyingi i i = 1 dan 5 gacha Agar mas_place_x(i) > 0 bo'lsa str_opt_x = str_opt_x + Str(mas_mesto_x(i)) + ";" Boshqa str_opt_x = str_opt_x + Str(0) + ";" Agar tugasa Keyingi i main.L_opt.Caption = str_opt_x + "}" Aks holda: main.L_opt_d.Caption = " yo'q " Agar tugasa Natijalarning chiqishi tugadi. end sub Shaxsiy pastki buyruq1_Click() asosiy.Show main.L_opt.Caption = "" Qo‘ng‘iroqning ruxsati (2, 1) 'Command2.Enabled = False main.Command1.Enabled = Rost end sub Shaxsiy pastki buyruq2_Click() GLni yuklab oling end sub Allbest.ru saytida joylashgan Download 121.83 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling