GTAP Standard 7 · Python vs GAMS · NLP/IPOPT both sides

NLP-vs-NLP convergence & parity matrix

Python solved as NLP (EQUILIBRIA_GTAP_SOLVE_NLP=1) against the GAMS ifMCP=0 reference — same IPOPT both sides, so solver tolerance cancels and the number reflects model fidelity. Cell-by-cell match at 1% tolerance, per period, with the solve return code. Measured by re-running the solve (gen_nlp_matrix_page.py); the floor under each cell is the versioned contract the test asserts.

Each cell: measured match% (color) · convergence chip · contract floor match %: ≥99 95–99 <95 convergence: ✓ code 1 ✕ code 2

Pure-gtap

real-CES · ifSUB=0 & 1
Dataset · ifSUBBaseCheckShock
The 5×5 shock was the fix. It read 59.56% / code 2 (infeasible) until the Python-only Jacobian pre-scale was dropped — GAMS solves the raw model, and once Python does too, IPOPT lands in GAMS's basin (pfact[ROW] 1.25 → 0.996). All pure datasets now 100% across every stage, both ifSUB.

Altertax

CD · ifSUB=0 & 1
Dataset · ifSUBBaseCheckShock
The check/shock ceiling is the reference, not the model. Every altertax NLP reference violates its own eq_pxeq in the ag sector (IPOPT stops at "Locally Optimal"). Where a cleanly-converged MCP reference exists (3×3 ifSUB=1) the same Python solve matches 99.93%. The path to 99% for the rest is MCP references (NEOS), not a code change.