Example #1
0
        /// <summary>
        /// Returns a reset copy of itsself.
        ///
        /// This method creates a copy of itsself that links to the
        /// same element, but has a reset retry counter.
        /// </summary>
        /// <returns>A reset copy of itself.</returns>
        public override CopiableElement  copy()
        {
            CompetenceElement newObj = (CompetenceElement)this.MemberwiseClone();

            newObj.reset();

            return(newObj);
        }
Example #2
0
        /// <summary>
        /// Initialises the competence priority element.
        /// 
        /// The log domain is set to [AgentName].CP.[competence_name]
        /// </summary>
        /// <param name="agent">The element's agent.</param>
        /// <param name="CompetenceName">The name of the competence.</param>
        /// <param name="elements">The set of competence elements of the
        ///         priority element.</param>
        public CompetencePriorityElement(Agent agent, string competenceName, CompetenceElement[] elements)
            : base(string.Format("CP.{0}",competenceName),agent)
        {
            this.name = competenceName;
            if (elements.Length > 0)
                this.elements = new List<CompetenceElement>(elements);
            else
                this.elements = new List<CompetenceElement>();

            log.Debug("Created");
        }