Example #1
0
        public virtual void Copy(MOOSolution rhs)
        {
            mObjectives.Clear();
            mConstaints.Clear();

            int objective_count = rhs.mObjectives.Count;

            for (int objective_index = 0; objective_index < objective_count; ++objective_index)
            {
                mObjectives.Add(rhs.mObjectives[objective_index]);
            }
            int constraint_count = rhs.mConstaints.Count;

            for (int constraint_index = 0; constraint_index < constraint_count; ++constraint_index)
            {
                mConstaints.Add(rhs.mConstaints[constraint_index]);
            }

            mTags.Clear();
            Dictionary <string, object> tags = rhs.mTags;

            foreach (string tag_id in tags.Keys)
            {
                mTags[tag_id] = tags[tag_id];
            }

            mRank             = rhs.mRank;
            mCrowdingDistance = rhs.mCrowdingDistance;

            mPopulation = rhs.mPopulation;
            mProblem    = rhs.mProblem;
        }
Example #2
0
        public virtual ISolution Clone()
        {
            MOOSolution clone = new MOOSolution(mPopulation, mProblem);

            clone.Copy(this);

            return(clone);
        }
Example #3
0
 public virtual void UniformCrossover(MOOSolution rhs)
 {
 }
Example #4
0
 public virtual void OnePointCrossover(MOOSolution rhs)
 {
 }