Wasn't sure where to post this as this is probably a philosophical/theological question more than not.
Anyway, this thought occurred to me and I figured it was worth discussing. As God is all-knowing, all-perfect, and all-good, it follows that even from an evil action that is performed either by man or by Satan, He will not permit it to have an ultimate evil end, rather He will see to it that the Ultimate End is something that is good and perfect, as is befitting of His Divine Will. For example, let's say a pagan man is robbed of all his property by the government and is forced to live on the street. Say he goes into a conversion because of this, and becomes a great Saint who in turn converts thousands of souls. Although evil was initially done, good came out of it, as is befitting God's will.
Now, what if this evil never happened at all? Let's say there are two people who are about to commit adultery, and would give birth to a child that would become one of the greatest saints ever to walk the Earth. What if, by the realization of the horror they were about to commit, backed out at the last moment. This would mean that the Saint would never have been born. This sounds very close to consequentialism, but in fact, the two people would never know that the sinful act would have led to a great saint having been born, so it's mostly God I am talking about. Is it possible that He may have both great joy for the fact that the two people avoided a sin, but also sorrow, since he cannot create His beloved saint? This leads one to wonder, if God takes both joy for every evil that is avoided, but also a certain amount of sorrow, since He cannot bring about another good that would have come out of the evil that was not done.
I am not saying that God is limited, but that from the way He has acted so far, he will allow one thing to happen, and if that thing happens, avoid doing another thing. E.g. If a bridge remains standing, He will not allow it to simultaneously fall, etc.