The paper presents a versatile simulation model of the operation process of a complex technical system. Among other features, the model assumes dependencies between the system’s components, and a priority-based maintenance/repair policy implemented by a limited personnel. Over the recent decades various maintenance models were investigated with the aim of optimizing the maintenance costs. Most researchers pursued analytical approach, hence the obtained results hold true under quite restrictive assumptions imposed for the purpose of analytical tractability (mutual independence of components, exponential time-to-failure and time-to-repair, no waiting time for repair, etc.). The model described herein is free from such limitations, as it is designed to compute the system’s reliability or performance indices by way of simulation rather than analytically. The following features make it more realistic than many other models from the relevant literature: 1) the components are mutually dependent, i.e. a component’s state change affects the failure rates of some other components, 2) repairs can be perfect, imperfect, or minimal, 3) due to a limited maintenance personnel, a failed component may have to await its repair in a priority queue, where the priority level depends on the component’s importance, 4) a component state may be unobservable, in which case hidden failures are revealed by inspections. Using such a model, the optimal or near optimal parameters of an assumed maintenance policy can be found by repeated simulation. Any performance index expressed as a priori known function of these parameters can be subject to optimization. The author’s main result is a non-trivial simulation algorithm encompassing the model’s comprehensiveness. Clearly, the simulation approach, although time-consuming, allows to avoid elaborate analytical derivations which, in the absence of simplifying assumptions, become unreasonably complicated or impossible as the system’s complexity increases.