Nonlinear programming solvers play important roles in process systems engineering. The performance of a nonlinear programming solver is influenced significantly by values of the solver parameters. Hence, tuning these parameters can enhance the performance of the nonlinear programming solver, especially for hard problems and time-critical applications like real time optimization and nonlinear model predictive control. Random sampling (RS) algorithm is utilized to tune the nonlinear programming solver for solving hard problems. By introducing an iterated search technique, heuristic rules and advanced termination criteria, an enhanced random sampling algorithm is developed to determine parameter configuration that work significantly better than the default. These random sampling-based methods can handle all kinds of parameters (e.g., categorical, integer, and continuous) of the nonlinear programming solver. Numerical results with parameter configurations from the proposed random sampling-based methods show r...