COLREG-compliant optimal path planning for real-time guidance and control of autonomous ships