Let G be a directed graph with m vertices and n edges, I(B) thebinomial ideal associated to the incidence matrix B of the graph G, and I_L the latticeideal associated to the columns of the matrix B. Also let B_i be a submatrix ofB after removing the ith column. In this paper it is determined that which primeminimal ideals of I(B_i) are Andean or toral. Then we study the rank of the spaceof solutions of binomial D-module associated to I(B_i) as A-graded ideal, where A isa matrix that, AB_i = 0. Afterwards, we define a maximal cellular cycle and provethat for computing this rank it is enough to consider these components of G. Weintroduce some bounds for the number of the vertices of the convex hull generatedby the columns of the matrix A. Finally an algorthim is introduced by which we cancompute the volume of the convex hull corresponded to a cycles with k diagonals, soby Theorem 2.1 the rank of (D / H_A(I(B_i); beta)) can be computed.