source/ampl_dispatch_registry.cpp file

AMPL parameter + iterator dispatch table population.

register_ampl_param_dispatchers fills the (class, attribute) -> AmplParamFn table with one row per user-facing PAMPL attribute. A row names the LP class and the param_X accessor; param_shim generates the resolver: sc.get_element(ObjectSingleId<LP>{uid}) followed by the accessor call. The user-constraint resolver in element_column_resolver.cpp reaches it through a single find_ampl_param probe.

The resolver signature is uniform (sc, uid, stage, block); per-stage accessors param_X(s) ignore the block and scalar ones param_X() ignore both — param_shim picks the call form from the accessor's signature at compile time.

Adding a new (class, attribute) is one table row — no resolver edit. test_ampl_param_registry_golden.cpp pins the registered set and the value every resolver returns on a fixture.

Namespaces

namespace gtopt