Research Article

Optimizing Ship Speed to Minimize Total Fuel Consumption with Multiple Time Windows

Algorithm 1

(1)   
(2)   for to
(3)   
(4)   for to
(5)   
(6)  
(7)  for to
(8)   if there does not exist any such that for all
(9)     
(10)  if
(11)    total fuel consumption
(12)    for to
(13)    
(14)    return()
(15)  if
(16)    
(17)    for
(18)    if
(19)       and
(20)    else if
(21)       and
(22)    else
(23)       and
(24)   for
(25)    if for all
(26)      if
(27)         and Partition()
(28)      else if
(29)         and Partition()
(30)      else
(31)        for to
(32)           if
(33)               and Partition()
(34)           else
(35)               and Partition()
(36)   for to
(37)     
(38)   for to
(39)    
(40)   return(min)
Partition( )
(41) 
(42) if
(43)   
(44)   for to
(45)