Research Article

An Improved Discrete PSO for Tugboat Assignment Problem under a Hybrid Scheduling Rule in Container Terminal

Pseudocode 1

While ( < )
 Set the state of each tugboat = 0
 For = 1 to
  If ( = 0 and the state of each assigned tugboat = 0)
   
   Set the state of each assigned tugboat = 1
   Calculate the conflict ship set
   Calculate the start docking time according to (7)
   Calculate the completion docking time according to (6)
   Set the state of ship   
    = + 1
  End if
 Next
_flag = _flag + 1
End
Calculate the turnaround time of ships according to (4).