Skip to main content
. Author manuscript; available in PMC: 2012 Jun 1.
Published in final edited form as: Parallel Comput. 2011 June-July;37(6-7):261–278. doi: 10.1016/j.parco.2011.04.002

Algorithm 3.

[combinations]=GENERATE_CANDIDATES(K)

Input:
 current nullspace matrix Kq×nems=[R(1)R(2)]
Output:
pairs of indices of columns forming candidates (combinations)
1: irrev + ⇐ (i: R1,i(2)>0 and (∃j: jth reaction is irreversible, Rj,i(1)0)}
2: irrev ⇐ (i: R1,i(2)<0 and (∃j: jth reaction is irreversible, Rj,i(1)0)}
3: rev ⇐ (i: R1,i(2)0 and (∀j: jth reaction is reversible or Rj,i(1)=0)}
4: {combine columns that can annihilate the element in the current row}
5:  S ⇐ {(ii, jj): (ii, jj) ∈ (irrev+ × irrev) ∪ ((irrev+ ∪ irrev ∪ rev) × rev)}
6: for each (ii, jj) ∈ S do
7:  form candidate column from the pair of columns indexed by (ii, jj)
8:  if candidate satisfies Proposition 4, add (ii, jj) to combinations
9: end for