3. Given $0 \leqslant a-b \leqslant 1,1 \leqslant a+b \leqslant 4$. Then, when $a-2 b$ reaches its maximum value, the value of $8 a+2002 b$ is $\qquad$ .
3.8.
$$
\begin{array}{l}
\text { Let } 0 \leqslant a-b \leqslant 1, \\
1 \leqslant a+b \leqslant 4, \\
\text { and } m(a-b)+n(a+b)=a-2 b .
\end{array}
$$
By comparing the coefficients of $a$ and $b$ on both sides, we get the system of equations and solve to find
$$
m=\frac{3}{2}, n=-\frac{1}{2} \text {. }
$$

Thus, $a-2 b=\frac{3}{2}(a-b)-\frac{1}{2}(a+b)$.
From (1) and (2), we have $-2 \leqslant a-2 b \leqslant 1$.
Therefore, the maximum value of $a-2 b$ is 1, at which point $b=\frac{a-1}{2}$.
Substituting into (1) and (2) gives $0 \leqslant a \leqslant 1, 1 \leqslant a \leqslant 3$.
This implies $a=1, b=0$. Hence, $8 a+2002 b=8$.