A three step procedure is presented to calculate the cost-optimal actuator capabilities of a melon harvesting mobile Cartesian robot. In the first step, the minimum-time trajectory required to traverse between any two melons that adheres to motion constraints is calculated. This is accomplished in a hierarchal manner by solving several sub-problems involving optimal control and optimization, allowing maximum melon harvesting to be formulated as the orienteering problem with time windows. In the second step, the solution to the orienteering problem - the sequence of melons for the robot to pick up that result in the maximum number harvested - is solved. A novel solution method based on dynamic programming, the moving branch and prune method, is devised. This allows optimal melons sequences to be computed without need to solve the entire problem at once, accommodating online implementation. In the third step, the costs and revenues are modeled as a function of actuator capabilities and platform velocity and then factored into a cost function. Optimization of this function results in the most cost optimal actuators of the robot. Examples demonstrate the efficacy of the algorithm.