S-matrix oriented CAD-tool for simulating complex integrated optical circuits