Skip to content

Commit

Permalink
Update rust toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
reinterpretcat committed Jun 15, 2024
1 parent 0393de5 commit 67f9c3d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 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.78-alpine AS Builder
FROM rust:1.79-alpine AS Builder

LABEL maintainer="Ilya Builuk <ilya.builuk@gmail.com>" \
org.opencontainers.image.title="A Vehicle Routing Problem solver CLI" \
Expand Down
2 changes: 0 additions & 2 deletions experiments/heuristic-research/src/plots/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ pub struct Series3D {

/// Specifies drawing configuration for population state.
pub struct PopulationDrawConfig {
/// Axes configuration.
pub axes: Axes,
/// Series configuration.
pub series: PopulationSeries,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ pub(crate) fn draw_on_area<B: DrawingBackend + 'static>(
PopulationSeries::Rosomaxa {
rows,
cols,
fitness_values,
fitness_matrices,
mean_distance,
u_matrix,
t_matrix,
l_matrix,
n_matrix,
..
} => {
let _fitness_values = fitness_values;
let plots = fitness_matrices.len() + 5;
let cols_size = plots / 2 + usize::from(plots % 2 == 1);

Expand Down
5 changes: 1 addition & 4 deletions experiments/heuristic-research/src/plots/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ pub fn draw_population_plots<B: DrawingBackend + 'static>(
let is_vrp = function_name == "vrp";
draw_population(
area,
PopulationDrawConfig {
axes: Axes { x: (Default::default(), 0.0), y: Default::default(), z: (Default::default(), 0.0) },
series: get_population_series(generation),
},
PopulationDrawConfig { series: get_population_series(generation) },
if is_vrp && generation != 0 {
// TODO find a nice way to visualize vrp solutions in 3D plot
None
Expand Down
2 changes: 1 addition & 1 deletion rosomaxa/src/population/rosomaxa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ where
initial.iter().for_each(|individual| network.store(individual.deep_copy(), 0));

// create gene pool to keep track of population progress
let gene_pool_size = self.config.selection_size.min(8).max(4);
let gene_pool_size = self.config.selection_size.clamp(4, 8);
let gene_pool_selection_size = (gene_pool_size / 2).max(4);
let mut gene_pool = Elitism::new_with_dedup(
self.objective.clone(),
Expand Down
2 changes: 1 addition & 1 deletion vrp-pragmatic/tests/unit/checker/limits_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ can_check_shift_and_distance_limit! {
case_05: (None, Some(10.), 10, Result::<_, &str>::Ok(())),
case_06: (None, Some(10.), 9, Result::<_, &str>::Ok(())),

case_07: (None, None, i64::max_value(), Result::<_, &str>::Ok(())),
case_07: (None, None, i64::MAX, Result::<_, &str>::Ok(())),
}

pub fn can_check_shift_and_distance_limit_impl(
Expand Down

0 comments on commit 67f9c3d

Please sign in to comment.