|
Algorithm 1 MILP-MDP adaptive routing algorithm |
Input: Network parameters, , V, , , , packetLength
Output: Network lifetime, delay, FND, HND
Initialize Q-table for 81 states
Initialize exploration rate
Define action set
for each round r do
Update node energy and alive-node status
if or or event-triggered then
Perform Distance–Energy Weighted K-means clustering
Observe current state
Select action A using -greedy policy
Solve MILP to obtain routing path subject to flow and subtour constraints
Apply scaling factor to adjust routing
end if
Execute data transmission
Compute reward R according to Equation (24)
Observe next state
Update Q-table using Q-learning rule
Update exploration rate
end for
Record performance metrics (FND, HND, delay, energy)
|