This thesis is structured as follows. Chapter 2 gives a general introduction to the formation of large-scale structures in the Universe by taking a brief look at the matter content of the Universe; theories for structure formation, both linear and non-linear; peculiar velocity fields; and finally a description of the Local Group and its immediate neighbourhood. In Chapter 3, the dynamics of galaxies will be discussed, the main result being the deduction of the equations of motion for particles in comoving coordinates using Hamilton's principle. In the following chapter, Chapter 4, a presentation of the different numerical methods used in the AVP will be presented, both for the integration and the optimization of the action. In Chapter 5, we are finally moving into the main part of this thesis, namely the implementation of the AVP and the testing of the different optimizing methods for two different systems off mass tracers: one consisting of 8 and one of 22 particles. The resulting number of undefined parameters for these two systems is 120 and 660, respectively, and these two systems will therefore serve as two widely different test cases. Additionally, Chapter 5 will contain a description of the N-body code used to test the validity of the AVP solutions, a comparison of the AVP solution reached to the solutions presented by P-89,P-90, and a physical discussion of the solution that gave the best fit in the system of 22 mass tracers, including the adjustment of distances mentioned in the previous section. Chapter 6 is meant to serve as a review of the AVP, giving a brief examination of the areas of application and the different implementations presented previously in literature. The closing chapter, Chapter 7, contains a summary of the study and suggestions for future work, while the Appendix A contains the complete sourcecode of the program used to calculate the orbits, AVP.