Robby,
My first guess is that Pyomo is probably writing out a “valid-looking” NL file that hits an edge case that the ASL is not designed for. The NL writer is primarily derived from the “Writing .nl files” SAND report, but we have picked up a number of additional “rules” derived by observing NL files generated by AMPL and a bit of trial-and-error. We have seen examples in the past where what “looks like a valid NL file” will not evaluate correctly in the ASL (one that comes to mind is constant expression arguments to external functions), and we generally work around those issues in the writer. This is likely to be another edge case.
On recent Pyomo releases “nl” is an alias for “nl_v2”.
I’m happy to help diagnose – the place to start will be to dig through the NL file and see how the named expressions are being used / embedded. We could make a lot of headway with the pickle of the model and the NL file. If you want to carve out (delete) the irrelevant constraints, that should be fine.
John
From: pyomo...@googlegroups.com <pyomo...@googlegroups.com>
On Behalf Of robbyb...@gmail.com
Sent: Monday, July 13, 2026 3:40 PM
To: Pyomo Forum <pyomo...@googlegroups.com>
Subject: [EXTERNAL] ASL-Pyomo discrepancy with named expressions
|
You don't often get email from robbyb...@gmail.com. Learn why this is important |
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pyomo-forum...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/pyomo-forum/01587620-8df9-4f4f-8bbf-626ccc9d6161n%40googlegroups.com.