pympcc.frontend.ampl.from_nl¶
- pympcc.frontend.ampl.from_nl(path)[source]¶
Read an AMPL text-format
.nlfile and return anpympcc.MPCCProblem.Complementarity constraints (encoded via bound-type-5 entries in the
bsegment) are routed into the MCP bulk form (comp_var_pairs_bulk). Remaining constraints are split between equality and inequality blocks based on the AMPL bound type codes in thersegment.Not supported:
Binary
.nlfiles (rejected withNLParseError).Defined variables (
Vsegments) and logical constraints (L).Imported function calls (
f<N>).Multiple objectives — only objective 0 is honoured; the rest are ignored with a
UserWarning.