Курсовая работа: Распределение ресурсов по трем отраслям

ActiveCell.Cells(0, i) = 0

Next

For i = 1 To n

ActiveCell.Cells(i, 1) = i * d

ActiveCell.Cells(i, 2) = f_g1(i + 0#)

ActiveCell.Cells(i, 3) = f_g2(i + 0#)

ActiveCell.Cells(i, 4) = f_g3(i + 0#)

ActiveCell.Cells(i, 5) = f_g1(i + 0#)

Next

For i = 1 To n

ActiveCell.Cells(i + 0, 7) = GetF2Val(i + 0, d)

ActiveCell.Cells(i + 0, 8) = Int(GetF2Pos(i + 0, d) * d)

ActiveCell.Cells(i + 0, 9) = GetF3Val(i + 0, d)

ActiveCell.Cells(i + 0, 10) = Int(GetF3Pos(i + 0, d) * d)

ActiveCell.Cells(i + 0, 6) = Abs(z - ActiveCell.Cells(i + 0, 8) - ActiveCell.Cells(i + 0, 10))

Next

ListBox1.Clear

For i = 1 To 3

m_str = Str(i) + ": X = " + Str(ActiveCell.Cells(n + 0, 4 + i * 2)) + " F = " + Str(ActiveCell.Cells(n + 0, 3 + i * 2))

ListBox1.AddItem (m_str)

Next

Range("A10:J10").Select

End Sub

Private Sub CommandButton2_Click()

Hide

End Sub

Public Function GetF2Val(n As Integer, d As Double) As Double

Dim maxs As Double

maxs = f_g2(0) + f_g1(n * d)

К-во Просмотров: 273
Бесплатно скачать Курсовая работа: Распределение ресурсов по трем отраслям