In maritime freight transportation, carriers build collaborative relationships with other carriers while competing with each other to optimize their own profits. In such a scenario, a game of coopetition is formed. We formulate a nonlinear mixed-integer problem to determine the optimal levels of coopetition for a single company and embed the resulting problem into a general game theoretic framework. A diagonalization algorithm that incorporates an ascent direction search technique is developed to effectively evaluate the game. The numerical results show that carriers choose similar coopetition levels to maximize their profits, and the coopetition game can reach equilibrium under general conditions.