コード例 #1
0
    public void startAlgorithm()
    {
        stoped = false;
        if (aco != null)
        {
            animationControler.reset();
        }

        iterations = new Queue <IterationContext>();
        aco        = new AntColony(getMatrix(), 0, antNumber_, alpha_, beta_,
                                   coefficient_, feremonAmount_, iterationCount_, iterations);

        aco.begin();
        Debug.Log("i started");
        StartCoroutine(waitForIterCtx());
    }
コード例 #2
0
 public void onStopCliked()
 {
     acoControler.stopAlgorithm();
     animationControler.reset();
     acoControler.stoped = true;
 }