Учебное пособие: Задачи линейного программирования

End Sub

Private Sub Form_Load()

'основная матрица

lblyr(0).Caption = " 9 = 0.5X1 + 0.5X2 + 2X3 + X4 + 0X5 + 0X6 + 0X7 + 0X8"

lblyr(1).Caption = " 12 = 2X1 + X2 + X3 + 0X4 + X5 + 0X6 + 0X7 + 0X8"

lblyr(2).Caption = " 12 = 2X1 + 0X2 + X3 + 0X4 + 0X5 + X6 + 0X7 + 0X8"

lblyr(3).Caption = " 8 = X1 + 2X2 + 0.5X3 + 0X4 + 0X5 + 0X6 + X7 + 0X8"

lblyr(4).Caption = " 16 = 0X1 + 0.5X2 + X3 + 0X4 + 0X5 + 0X6 + 0X7 + X8"

lblyr(5).Caption = " F = 22 + 36 + 28 + 0 + 0 + 0 + 0 + 0"

' Загрузка массива исходных данных

p = Array(pv(0), pv(1), pv(2), pv(3), pv(4), pv(5))

fm = Array(fmMin(0), fmMin(1), fmMin(2), fmMin(3), fmMin(4), fmMin(5), fmMin(6), fmMin(7))

f = fm

xn(1) = Array(Ar(1, 0), Ar(1, 1), Ar(1, 2), Ar(1, 3), Ar(1, 4), Ar(1, 5), Ar(1, 6), Ar(1, 7))

xn(2) = Array(Ar(2, 0), Ar(2, 1), Ar(2, 2), Ar(2, 3), Ar(2, 4), Ar(2, 5), Ar(2, 6), Ar(2, 7))

xn(3) = Array(Ar(3, 0), Ar(3, 1), Ar(3, 2), Ar(3, 3), Ar(3, 4), Ar(3, 5), Ar(3, 6), Ar(3, 7))

xn(4) = Array(Ar(4, 0), Ar(4, 1), Ar(4, 2), Ar(4, 3), Ar(4, 4), Ar(4, 5), Ar(4, 6), Ar(4, 7))

xn(5) = Array(Ar(5, 0), Ar(5, 1), Ar(5, 2), Ar(5, 3), Ar(5, 4), Ar(5, 5), Ar(5, 6), Ar(5, 7))

grdData.Row = r + 1

For i = 1 To n + 1

grdData.Col = i

'запись строки в таблицу

grdData.Text = Str(f(i - 1))

Next i

For i = 1 To r

grdData.Row = i

For j = 0 To n + 1

grdData.Col = j

If j = 0 Then

К-во Просмотров: 497
Бесплатно скачать Учебное пособие: Задачи линейного программирования