The flower-growing sector in Latin America presents significant health risks for workers, which highlights the need for technological updates in their production processes. Likewise, outdated machinery leads to losses that need to be avoided. The method of productive innovation developed in this document involves optimizing a mechanism of agricultural machinery used in carnation classification. The optimization is achieved by minimizing the jerk of the mechanism’s movement using metaheuristic methods. The results of three metaheuristic methods are compared against a brute force methodology. Optimization using these metaheuristic methods allows for achieving satisfactory results with up to 98% time reduction in the optimization process. This jerk optimization gives a longer useful life to the machinery, reduces the production stops needed for maintenance from once an hour to once every three hours, and reduces the damage done by the machine to the carnation stems.