The Dependency tax exemption is determined based upon Federal law as defined by the IRS, not your Settlement Agreement.
IRS says, that the parent who has the children the most gets the dependency exemption.
Even if the Final Judgment says that the Non Custodial parent gets the exemption that is not the final answer in this matter as far as the IRS is concerned.
The IRS is not bound by the rulings of State courts.
In order for the Non Custodial parent to legally claim the dependency exemption, they must have a form 8232 signed by the custodial parent giving up the exemption. This form must be attached to the Non Custodial parents tax return for each and every year that the dependency exemption is claimed.
Because the IRS is not bound by State Court rulings, the Final judgments when the Non Custodial parent is given the children as dependency exemptions must require the custodial parent to provide a signed 8232 each year in a timely manner for tax filings.