We present a model for the optimal placement of mono- and bipolar probes in radio-frequency (RF) ablation. The model is based on a numerical computation of the probe's electric potential and of the steady state of the heat distribution during RF ablation. The optimization is performed by minimizing a temperature based objective functional under these constraining equations. The paper discusses the discretization and implementation of the approach. Finally, applications of the optimization to artificial data and a comparison to a real RF ablation are presented.