Skip to content

Instantly share code, notes, and snippets.

Rama Renspandy renspandy

View GitHub Profile
renspandy / routing_sub
Created Apr 2, 2016
Vehicle routing problem sub in VBA.
View routing_sub
Sub run()
Dim iData As Worksheet 'input sheet
Dim mData As Worksheet 'main sheet
Dim bSpeed As Integer 'truck speed variable
Dim bCapacity As Integer 'truck capacity
Dim sNode As Integer 'sum node
Dim nDist() As Double 'node distance
Dim nStat() As String 'node status (pickup or delivery)
Dim nDemand() As Integer 'node demand
Dim nAssign() As Boolean 'node assigned (sebagai variabel untuk mengecek jumlah node yang sudah di-assign)
View simulation_sub
Sub simulasi()
Dim posisi(4) As Integer
Dim hitung(40) As Integer
Dim maks(40) As Integer
Dim roll_dice As Integer
Dim iter As Double
Dim tes As Integer
Dim jail_stat(4) As Integer
tes = Cells(2, 3)
You can’t perform that action at this time.