Exemplo n.º 1
0
        /// <summary>
        ///   Factory method for creating an instance of the <see cref="MultiCatchmentCompositeObjectiveEvaluator" /> class.
        /// </summary>
        /// <param name="objectiveDefinitionFileInfo"> The objective definition file info. </param>
        /// <returns> The new instance. </returns>
        public static RCompositeObjectiveEvaluator <TSysConfig> Create(FileInfo objectiveDefinitionFileInfo)
        {
            if (!objectiveDefinitionFileInfo.Exists)
            {
                throw new ArgumentException("Cannot find objective definition file " +
                                            objectiveDefinitionFileInfo.FullName);
            }

            var objDefn =
                XmlSerializeHelper.DeserializeFromXML <RexpObjectiveDefinition>(objectiveDefinitionFileInfo.FullName);

            return(Create(objDefn));
        }