The GRadient Ascent Pulse Engineering (GRAPE) method is widely used for optimization in quantum control. GRAPE is gradient search method based on exact expressions for gradient of the control objective. It has been applied to various coherently controlled closed and open quantum systems. In this work, we adopt the GRAPE method for optimizing objective functionals in open quantum systems driven by both coherent and incoherent controls. In our case, a tailored or engineered environment acts on the controlled system as control via time-dependent decoherence rates
γ
i
(
t
)
or, equivalently, via spectral density
n
ω
(
t
)
of the environment. To develop the GRAPE approach for this problem, we compute gradient of various objectives for general N-level open quantum systems for the piecewise constant class of control. The case of a single qubit is considered in details and solved analytically. For this case, an explicit analytical expression for evolution and objective gradient is obtained via diagonalization of a
3
×
3
matrix determining the system’s dynamics in the Bloch ball. The diagonalization is obtained by solving a cubic equation via Cardano’s method. The efficiency of the algorithm is demonstrated through numerical simulations for the state-to-state transition problem and its complexity is estimated. Robustness of the optimal controls is also studied.