Skip to main content

read_nl_file

Function read_nl_file 

Source
pub fn read_nl_file(path: &Path) -> Result<NlProblem, String>
Expand description

Parse an .nl file from disk.

After parsing the .nl body, this also looks for AMPL’s optional sibling name files — stub.col (variable names) and stub.row (constraint names), emitted only when the modeler sets option auxfiles rc;. When present and well-formed they populate NlProblem::var_names / NlProblem::con_names; when absent or malformed the names stay empty and every downstream consumer falls back to indices. Names are a diagnostic nicety, never load-blocking (cf. Lee et al. 2024, https://doi.org/10.69997/sct.147875).