The article tackles the problem of optimization methods in optical network design process, based on optimal traffic routing with the goal to minimize the utilized network resources for given topology and traffic demands. An optimization framework Nyx has been developed with the focus on flexibility in solving optimization problems by implementing general heuristic search techniques. Nyx modular organization has been described, including coding types for solutions and genetic algorithm as the optimization method. Optimal routing has been implemented to demonstrate the use of Nyx in the optical network design process. Optimal routing procedure has been applied to Pan-European optical network with variations of routing procedures and the number of wavelengths. The analysis included no protection scenario, 1+1 protection and path restoration. The routing was performed using shortest path routing and optimal routing which minimizes the use of optical network resources, being network multiplexers, amplifiers and fibers.