We describe the OCELOT open source project focusing on new beam dynamics simulation capabilities of the whole machine in modern electron-based x-ray sources. Numerical approaches for particle tracking and field calculations are discussed. In developing of the full-dimensional numerical modeling we pursue two important competitive aspects: the simulation has to be fast and has to include accurate estimations of collective effects. The simulation results for the European XFEL are presented. The results have been benchmarked agains other codes and some of such benchmarks are shown.