Ejemplo n.º 1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object can be used to retrieve data from input parameters and
        /// to store data in output parameters.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            if (!GetInputs(DA))
            {
                return;
            }

            if (rst == true)
            {
                iter = 0;
                popu.Clear();
                env.Reset();
                popu.initParameters();
                //env.setBirthPlace(emit.getEmitPts());
                env.emitter = emit;
                env.setFood(food.getFoodPts(env.getEnvAccu()));
                foreach (AbstractSettingType sett in setList)
                {
                    sett.setParameter(popu);
                }
                popu.initPopulation(env);
            }

            else
            {
                popu.Update(env);
                iter++;
            }

            SetOutputs(DA);
        }