Skip to content

Commit

Permalink
Update toolchain version to 1.78
Browse files Browse the repository at this point in the history
  • Loading branch information
reinterpretcat committed May 2, 2024
1 parent 721c2a3 commit cd7797b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.77-alpine AS Builder
FROM rust:1.78-alpine AS Builder

LABEL maintainer="Ilya Builuk <ilya.builuk@gmail.com>" \
org.opencontainers.image.title="A Vehicle Routing Problem solver CLI" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub(crate) fn draw_on_area<B: DrawingBackend + 'static>(
// draw local optimum markers
rows.clone()
.cartesian_product(cols.clone())
.filter(|&(x, y)| (series[0].matrix_fn)().get(&Coordinate(x, y)).is_some())
.filter(|&(x, y)| (series[0].matrix_fn)().contains_key(&Coordinate(x, y)))
.filter(|&(x, y)| {
get_neighbours(x, y)
.map(|coordinate| to_relation(&Coordinate(x, y), &coordinate))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn draw_search_statistics<B: DrawingBackend + 'static>(
area: &DrawingArea<B, Shift>,
statistics: &[(String, usize)],
) -> DrawResult<()> {
let mut statistics = statistics.iter().cloned().collect::<Vec<_>>();
let mut statistics = statistics.to_vec();

statistics.sort_by(|(_, a), (_, b)| b.cmp(a));

Expand Down
7 changes: 0 additions & 7 deletions experiments/heuristic-research/src/plots/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,6 @@ fn get_population_series(generation: usize) -> PopulationSeries {
}

fn get_axis_sizes() -> (f64, f64, f64) {
#[derive(Serialize)]
struct Axis {
pub x: f64,
pub y: f64,
pub z: f64,
}

EXPERIMENT_DATA.lock().unwrap().on_generation.iter().fold((0_f64, 0_f64, 0_f64), |acc, (_, (_, data))| {
data.iter().fold(acc, |(max_x, max_y, max_z), data| {
let &DataPoint3D(x, y, z) = match data {
Expand Down
4 changes: 2 additions & 2 deletions vrp-pragmatic/src/format/solution/solution_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ fn create_tour(
}
});

tour.vehicle_id = vehicle.dimens.get_vehicle_id().unwrap().clone();
tour.type_id = vehicle.dimens.get_vehicle_type().unwrap().clone();
tour.vehicle_id.clone_from(vehicle.dimens.get_vehicle_id().unwrap());
tour.type_id.clone_from(vehicle.dimens.get_vehicle_type().unwrap());

tour
}
Expand Down

0 comments on commit cd7797b

Please sign in to comment.