Var.formulation_source#

property Var.formulation_source#

Where the live CVXPY object for this item came from. Useful for debugging "did my customization actually take effect?".

Returns one of:

  • 'pending' — item hasn't been evaluated yet (no live optz).

  • 'codegen'e_fn was wired from ~/.ams/pycode/<routine>.py (the fast AOT path); only happens for items that exactly match the pristine source.

  • 'manual' — author/user code assigned item.e_fn = fn directly, bypassing both codegen and the eval-fallback helper.

  • 'eval' — eval-fallback path: e_str is resolved symbol-by-symbol via ams.opt._runtime_eval.eval_e_str() and eval-ed at parse/evaluate time. This is what runs for items the user customized via e_str = '...' or addConstrs(...). (Renamed from 'sub_map' in v1.2.3; the legacy regex+eval pipeline that name referenced was retired in PR #246.)