無人機價格低廉且能裝載多種感測器等優勢,使應運而生的應用在日常生活中逐漸增加。然而,無人機的緩衝區大小和電量並非無限量,任一項之不足都可能導致無人機的任務中斷。此文提出優化資料收集問題,期許在含有無人機的無線感測網路中,得到最短任務時間,這裡指的任務時間是收集所有目標節點資訊所需的時間。文中考慮無人機在三種不同狀態下的能耗及剩餘緩衝區,並將上述之資料收集問題形塑為混和整數線性規劃的最佳化問題。(無人機的三種狀態分別為: 飛行狀態、等候狀態、充電與卸載狀態。) 因為此最佳化問題屬於非決定性多項式集合問題 (NP-hard),我們提出一個優化無人機能耗及緩衝區佔據量的無人機部署方法 (OEBP),追求最小化無人機的任務時間,此方法包含最短路徑演算法 (SPA) 及等候點選擇演算法 (WPSA) 兩部分。藉由前者,我們可取得近似最佳化的無人機飛行路徑;而藉由後者,我們先轉換等候點,此轉換是考量目標範圍的重心所做的轉換,接著從中選定最適合的一點,作為無人機中途充電及資料卸載的中繼點。模擬結果顯示,此 OEBP 方法與下列三種方法相比,等候點部署在凸包上 (convexhull) 的方法、等候點部署在任務範圍邊界的方法及等候點隨機部署的方法,皆能節省任務時間及總能耗,特別是當目標節點數眾多時,成效更加明顯。;With the advantage of low cost and the availability of installing sensor devices, unmanned aerial vehicles (UAVs) applications are increasingly deployed in our daily life. However, both the buffer size and the energy of UAVs are limited, insufficiency of either may cause the interruption of their tasks. In this paper, we propose an optimizing data gathering problem to get the minimized mission time of gathering all the messages from target points of interest (PoIs) in a UAV-aided wireless sensor network and formulate the problem as a mixed-integer linear programming (MILP) optimization problem considering the energy cost and the residual buffer size in three of UAV states, flying, waiting, and charging-offloading. As the problem is non-deterministic polynomial-time hardness (NP-hard), we propose an optimizing energy cost and buffer occupancy ferry placement scheme(OEBP), including shortest path algorithm (SPA) and waiting point selection algorithm (WPSA), aiming to minimize the mission time. By SPA, we can get the near-optimal UAV flying route. Then, WPSA transfers the waiting points which take the barycentric of the target area into account and decides the most suitable one for UAV charging and data offloading. Simulation results present that our OEBP scheme is capable of reducing both the mission time and the energy consumption compared to the convex hull, the border and the random waiting points methods, especially when the number of PoIs is large.