コード例 #1
0
 public double GetPheromoneOnRib(int iStartPos, int iFinishPos)
 {
     if (m_rLaw.IsPosInNet(iStartPos) && m_rLaw.IsPosInNet(iFinishPos))
     {
         return(m_aPheromoneConcentration[iStartPos][iFinishPos]);
     }
     else
     {
         throw new FormatException();
     }
 }
コード例 #2
0
 public CRunningAnt(CGenLaw rLaw, int iStartPos, SimpleOrderPool rOrderPool)
 {
     if (rLaw != null && rOrderPool != null && rLaw.IsPosInNet(iStartPos))
     {
         m_rLaw       = rLaw;
         m_rOrderPool = rOrderPool;
         StartPos     = iStartPos;
     }
     else
     {
         throw new FormatException();
     }
 }