Agent.Engine.SolveInstance C# (CSharp) Method

SolveInstance() protected method

This is the method that actually does the work.
protected SolveInstance ( IGH_DataAccess DA ) : void
DA IGH_DataAccess The DA object is used to retrieve from inputs and store in outputs.
return void
    protected override void SolveInstance(IGH_DataAccess DA)
    {
      // First, we need to retrieve all data from the input parameters.
      // We'll start by declaring variables and assigning them starting values.
      Boolean reset = true;
      bool liveUpdate = true;
      List<T.AgentSystem> systems = new List<T.AgentSystem>();

      // Then we need to access the input parameters individually. 
      // When data cannot be extracted from a parameter, we should abort this method.
      if (!DA.GetData(0, ref reset)) return;
      if (!DA.GetData(1, ref liveUpdate)) return;
      if (!DA.GetDataList(2, systems)) return;

      // We should now validate the data and warn the user if invalid data is supplied.

      // We're set to create the output now. To keep the size of the SolveInstance() method small, 
      // The actual functionality will be in a different method:
      DataTree<AgentType> agents = run(reset, liveUpdate, systems);
      //List<Point3d> agents = new List<Point3d>();

      // Finally assign the spiral to the output parameter.
      DA.SetDataTree(0, agents);
    }
    List<T.AgentSystem> agentSystems = new List<T.AgentSystem>();