RsBundle  Diff

Differences From Artifact [99b5b53ffb]:

  • File src/solver.rs — part of check-in [4728cdaec5] at 2019-07-25 13:42:45 on branch trunk — Fix indexing of minorants in solver. Each minorants is assigned a globally unique and invariant identifier. This identifiers is always used to refer to that minorant. The former implementation violated this rule during the model update when the subgradient extension callback is called. This caused the wrong primal to be used for the subgradient extension ultimately leading to wrong subgradients/minorants. (user: fifr size: 37350)

To Artifact [15ce9dfd36]:

  • File src/solver.rs — part of check-in [166a377203] at 2019-07-25 13:46:16 on branch trunk — firstorderproblem: pass the subproblem index to `extend_subgradient` (user: fifr size: 37355)

703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
        }

        if !newvars.is_empty() {
            let problem = &mut self.problem;
            let primals = &self.primals;
            self.master.add_vars(
                &newvars.iter().map(|v| (v.0, v.1, v.2)).collect::<Vec<_>>(),
                &mut |_fidx, minidx, vars| {
                    problem
                        .extend_subgradient(primals[minidx].as_ref().unwrap(), vars)
                        .map(DVector)
                        .map_err(|e| e.into())
                },
            )?;
            // modify moved variables
            for (index, val) in newvars.iter().filter_map(|v| v.0.map(|i| (i, v.3))) {
                self.cur_y[index] = val;







|

|







703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
        }

        if !newvars.is_empty() {
            let problem = &mut self.problem;
            let primals = &self.primals;
            self.master.add_vars(
                &newvars.iter().map(|v| (v.0, v.1, v.2)).collect::<Vec<_>>(),
                &mut |fidx, minidx, vars| {
                    problem
                        .extend_subgradient(fidx, primals[minidx].as_ref().unwrap(), vars)
                        .map(DVector)
                        .map_err(|e| e.into())
                },
            )?;
            // modify moved variables
            for (index, val) in newvars.iter().filter_map(|v| v.0.map(|i| (i, v.3))) {
                self.cur_y[index] = val;