This paper is concerned with a PDE-constrained optimization problem of induction heating, where the state equations consist of 3D time-dependent heat equations coupled with 3D time-harmonic eddy current equations. The control parameters are given by finite real numbers representing applied alternating voltages which enter the eddy current equations via impressed current. The optimization problem is to find optimal voltages so that, under certain constraints on the voltages and the temperature, a desired temperature can be optimally achieved. As there are finitely many control parameters but the state constraint has to be satisfied in an infinite number of points, the problem belongs to a class of semi-infinite programming problems. We present a rigorous analysis of the optimization problem and a numerical strategy based on our theoretical result.