reaction_state(ReactionID,substrateLimiting,HypothesizedState,Time):-
      	catalyzed_by_ECclass(ReactionID,EC_Number),
	concentration_e(EC_Number,GEChange,Degree,Time),!,
	(nonContradict(HypothesizedState,GEChange)->
		Foo=0; % do nothing and pass
		getEarlierTimes(Time,EarlierTimes),
		maplist(checkSubstrateLimitingContradict({EC_Number,HypothesizedState}),EarlierTimes,EarlierTimes_Consistent0),flatten(EarlierTimes_Consistent0,EarlierTimes_Consistent),
		length(EarlierTimes_Consistent,ConsistentNum),ConsistentNum >=1	% go to earlier time point \+keep this contradict -- in the early time point it is consiste
	).
reaction_state(ReactionID,substrateLimiting,HypothesizedState,Time).

%reaction_state(RID,substrateLimiting,HypothesizedState,Time). 
