Skip to main content

solve_nlp_batch

Function solve_nlp_batch 

Source
pub fn solve_nlp_batch<T, C>(
    problems: Vec<T>,
    configure: C,
) -> Vec<NlpBatchResult>
where T: TNLP + 'static, C: FnMut(usize, &mut IpoptApplication),
Expand description

Solve a batch of independent NLPs sequentially, returning one result per input in input order. configure is called once per instance (receiving the instance index, so per-instance options are possible) on a fresh IpoptApplication (set options / backend / restoration there — see the module docs). Predictable and contention-free; the right choice when each instance is large enough that the linear-solver backend parallelizes internally.