code: protected int getFirstFreeOutputGateIndex() {
  
  		for (int i = 0; i < this.forwardEdges.size(); i++) {
  
  			if (this.forwardEdges.get(i) == null) {
  				return i;
  			}
  		}
  
  		return this.forwardEdges.size();
  	}
docs: Returns the index of this vertex's first free output gate.
  
  @return the index of the first free output gate