Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | solver: Initialize subgradient with first master evaluation. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
9d2ba83f8701402c95f753b477ab179e |
| User & Date: | fifr 2016-09-29 06:37:51.206 |
Context
|
2016-09-29
| ||
| 06:38 | solver: Fix computation of `new_cutval`. check-in: 12aebdedf7 user: fifr tags: trunk | |
| 06:37 | solver: Initialize subgradient with first master evaluation. check-in: 9d2ba83f87 user: fifr tags: trunk | |
| 06:37 | solver: Handle error when setting the number of suproblems in the master. check-in: a475dc4e2d user: fifr tags: trunk | |
Changes
Changes to src/solver.rs.
| ︙ | ︙ | |||
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
});
} else {
return Err(Error::NoMinorant);
}
}
self.cur_valid = true;
self.master.set_weight(1.0);
let state = current_state!(self, Step::Term);
let new_weight = self.weighter.weight(&state, &self.params);
self.master.set_weight(new_weight);
debug!("Init master completed");
Ok(())
| > > > > > > > > > > > > | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
});
} else {
return Err(Error::NoMinorant);
}
}
self.cur_valid = true;
// Solve the master problem once to compute the initial
// subgradient.
//
// We could compute that subgradient directly by
// adding up the initial minorants, but this would not include
// the eta terms. However, this is a heuristic anyway because
// we assume an initial weight of 1.0, which, in general, will
// *not* be the initial weight for the first iteration.
self.master.set_weight(1.0);
try!(self.master.solve(self.cur_val));
self.sgnorm = self.master.get_dualoptnorm2().sqrt();
// Compute the real initial weight.
let state = current_state!(self, Step::Term);
let new_weight = self.weighter.weight(&state, &self.params);
self.master.set_weight(new_weight);
debug!("Init master completed");
Ok(())
|
| ︙ | ︙ |