  We consider the problem of minimizing the time average cost of sampling and
transmitting status updates by users over a wireless channel subject to average
Age of Information constraints (AoI). Errors in the transmission may occur and
the scheduling algorithm has to decide if the users sample a new packet or
attempt for retransmission of the packet sampled previously. The cost consists
of both sampling and transmission costs. The sampling of a new packet after a
failure imposes an additional cost in the system. We formulate a stochastic
optimization problem with time average cost in the objective under time average
AoI constraints. To solve this problem, we apply tools from Lyapunov
optimization theory and develop a dynamic algorithm that takes decisions in a
slot-by-slot basis. The algorithm decides if a user: a) samples a new packet,
b) transmits the old one, c) remains silent. We provide optimality guarantees
of the algorithm and study its performance in terms of time average cost and
AoI through simulation results.
