示例#1
0
        /// <summary>
        /// Generates an .apsimx file for this simulation.
        /// </summary>
        /// <param name="path">Directory to write the file to.</param>
        public void GenerateApsimXFile(string path)
        {
            string xml = Apsim.Serialise(Simulations.Create(new List <IModel> {
                this, new Models.Storage.DataStore()
            }));

            File.WriteAllText(Path.Combine(path, Name + ".apsimx"), xml);
        }