Research Article

A Heuristic Procedure for a Ship Routing and Scheduling Problem with Variable Speed and Discretized Time Windows

Pseudocode 2

Pseudocode of the Local Search Procedure.
Local-Search()
Input: Initial Feasible solution (Route for each ship )
Output: Best Solution found (Route for each ship )
 Do until no further improvement is achieved
  InsertionContractsN()
  ImproveRoute()
 End do
 Do until no further improvement is achieved
  InterchangeContractsN()
  ImproveRoute()
 End do
 Do until no further improvement is achieved
  2OptUpward()
  ImproveRoute()
 End do
 Do until no further improvement is achieved
  InsertionContractsN2()
  ImproveRoute()
 End do
 If no improvement of the initial solution was found, then
  InterchangeContracts_S()
  If no improvement was previously found, then
   InterchangeContracts_C()
  End if
 End If
 Return