## 2 Optimization Model
### Constraints  
1. The velocity of wellbore trajectory change can be controlled by the build-up rate. When the build-up rate is low, the length of the well orbit required to reach the target increases, thus extending the drilling cycle. When the build-up rate is large, the construction speed is fast, which may lead to stuck bit and increased construction difficulty [40]. The build-up rate should be between the maximum build-up rate and minimum build-up rate of the deflecting tool. For conventional directional wells, the build-up rate is generally (2.1-4.2) (\({}^{\circ}\))/30 m, and the drop-off rate is generally less than 2.5 (\({}^{\circ}\))/30 m [41]. There is a lot of feed for extended reach wells in the inclined section. Controlling the build-up rate below 3 (\({}^{\circ}\))/30 m is beneficial to reduce friction and casing wear and prevent fatigue damage to drilling tools during rotation. The range constraint expression of build-up rate \(k\) is shown in Formula (23). In order to prevent track loss and landing, the building slope of the offshore platform is generally (2.5-3) (\({}^{\circ}\))/30 m. \[k_{\min}\leq k\leq k_{\max}\] (23)
2. According to the calculation of the safety density window, the stable inclination should be between the maximum stable inclination angle and minimum stable inclination angle under the condition of wellbore stability. According to the law of rock carrying, the inclination angle between 48\({}^{\circ}\) and 68\({}^{\circ}\) is the most unfavorable to rock carrying. For directional wells, if the angle of inclination is less than 15\({}^{\circ}\), the borehole orientation is unstable and drift is easy to occur. If the deviation value is more than 45\({}^{\circ}\), it is not conducive to wellbore torsion, and logging and completion operations are relatively difficult. \[\alpha_{\min}\leq\alpha\leq\alpha_{\max}\] (24)
3. When the stratum strength is low, the dip force generated by the BHA is small, restricting the build-up rate's rise. When the stratum strength is high, the inclination-building effect of the inclination-building force generated by the bottom hole assembly decreases, which restricts the improvement of the build-up rate. Therefore, it is necessary to combine the formation strength factors to select the location of the inclination-making point, and it should be located in the medium-soft to medium-hard stratum, which is most conducive to the inclination making [42, 43]. To establish the constraint conditions considering the influencing factors of formation strength, the uniaxial compressive strength value of formation can be input into the program, and the function of formation strength and vertical depth can be established. Through the program call, the constraint range of formation strength can be determined according to Table 1 [44], and the appropriate depth can be selected. Then, the expression can be expressed as \[UCS_{\min}\leq UCS(Z_{i})\leq UCS_{\max}\] (25)
4. When the vertical depth of the kickoff point is shallow, the length of the build-up section will be increased,; then the drilling operation cycle will be extended, and the drilling operation will be more difficult. When the vertical depth of the kickoff point is deep, the build-up rate will be increased, thus increasing the difficulty of construction [45]. The constraint expression of the vertical depth range of the first kickoff point is shown in Formula (26). According to the requirements of the offshore cluster well standard, in order to quickly make the surface separation and reduce the risk of collision prevention, the position of the first kickoff point \(Z_{A}\) is generally chosen at one to two pillars after the catheter shoe. \[h_{\min}\leq Z_{A}\leq h_{\max} \tag{26}\]  
The vertical depth and plane error of the second target should be less than the specified range, and the constraint conditions can be expressed as  
\[\left\{ \begin{array}{l}\left|Z-Z_{T}\right|\leq H\\ \left|S_{T}-\sqrt{\left(X_{O}-X_{T}\right)^{2}+\left(Y_{O}-Y_{T}\right)^{2}} \right|\leq J\end{array} \right.