user_model_lp.cpp file
LP build / output path for UserModel (generic AMPL capture).
UserModelLP is an additive aggregation: it owns one internal DecisionVariableLP per declared variable and one internal UserConstraintLP per declared constraint, and delegates the LP build to them verbatim. Every reused side-effect (the shared expr resolver, the add_ampl_variable routing, the silent_flatten_pass() rebuild gate, the soft-slack folding, the scope routing, the abs/min/max aux-col lowering) runs in the SAME code paths as the standalone elements — no parallel registry, no forked AST. Only the OUTPUT is re-namespaced.
── Aux-col policy (P1, decided 2026-06-22) ─────────────────────────────── abs(x) / min / max lowering in user_constraint_lp.cpp creates add_aux_col columns (abs_aux / min_aux / max_aux) plus helper rows that are NOT registered in the AMPL variable registry and carry no stable user-facing name. UserModel captures ONLY the NAMED user cols (DecisionVariable.value) and NAMED rows (UserConstraint.constraint and its slacks). The aux cols/rows are treated as internal / non-captured LP-implementation detail: they have no tag-name to file under, and their physical content is fully recoverable from the named row's dual. This is the simplest correct policy and matches what the standalone UserConstraintLP::add_to_output already does (it never emits aux cols).
Namespaces
- namespace gtopt