Dynamic multiple multicasts widely exist in several applications of optical network-on-chip. However, there is no good solution for routing and wavelength assignment for multiple multicasts in the mesh-based network. This paper proposes a new routing strategy based on a modified artificial fish swarm algorithm. The modified artificial fish model can support unicast and multicast in the mesh-based network. The routing and wavelength assignment for multiple multicasts can be solved based on this model. Then, we design a layer-based algorithm to assign wavelength for multiple multicasts, which can utilize wavelength and area resources more effectively. Simulation results show that our scheme works better than the other tree-based schemes regarding average communication latency and power consumption. In general, our modified artificial fish swarm algorithm provides a universal platform to study different aspects of routing and wavelength assignment in mesh-based ONoC.