Skip to content

Commit

Permalink
Bump version to 1.9.1
Browse files Browse the repository at this point in the history
- add maximize value objective
- build multiple initial solutions
  • Loading branch information
reinterpretcat committed Mar 24, 2021
1 parent 002c9ec commit bdeef36
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 19 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
## [Unreleased]


## [v1.9.1] - 2021-03-24

## Added

- add maximize value objective

### Changed

- build multiple initial solutions


## [v1.9.0] - 2021-03-19

### Changed
Expand Down Expand Up @@ -199,7 +210,8 @@ with Self Organizing MAps and eXtrAs (pronounced as "rosomaha", from russian "р

- Initial commit

[Unreleased]: https://github.com/reinterpretcat/vrp/compare/v1.9.0...HEAD
[Unreleased]: https://github.com/reinterpretcat/vrp/compare/v1.9.1...HEAD
[v1.9.1]: https://github.com/reinterpretcat/vrp/compare/v1.9.0...v1.9.1
[v1.9.0]: https://github.com/reinterpretcat/vrp/compare/v1.8.1...v1.9.0
[v1.8.1]: https://github.com/reinterpretcat/vrp/compare/v1.8.0...v1.8.1
[v1.8.0]: https://github.com/reinterpretcat/vrp/compare/v1.7.4...v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The fastest way to try vrp solver on your environment is to use `docker` image (
* **run public image** from `Github Container Registry`:

```bash
docker run -it -v $(pwd):/repo --name vrp-cli --rm ghcr.io/reinterpretcat/vrp/vrp-cli:1.9.0
docker run -it -v $(pwd):/repo --name vrp-cli --rm ghcr.io/reinterpretcat/vrp/vrp-cli:1.9.1
```

* **build image locally** using `Dockerfile` provided:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The fastest way to try vrp solver on your environment is to use public `docker`
(not performance optimized):

```bash
docker run -it -v $(pwd):/repo --name vrp-cli --rm ghcr.io/reinterpretcat/vrp/vrp-cli:1.9.0
docker run -it -v $(pwd):/repo --name vrp-cli --rm ghcr.io/reinterpretcat/vrp/vrp-cli:1.9.1
```

## Install from source
Expand Down
4 changes: 2 additions & 2 deletions examples/json-pragmatic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "json-pragmatic"
version = "1.9.0"
version = "1.9.1"
authors = ["Ilya Builuk <[email protected]>"]
license = "Apache-2.0"
keywords = ["vrp", "optimization"]
Expand All @@ -13,7 +13,7 @@ description = "An examples for solving rich VRP"
publish = false

[dependencies]
vrp-pragmatic = { path = "../../vrp-pragmatic", version = "1.9.0" }
vrp-pragmatic = { path = "../../vrp-pragmatic", version = "1.9.1" }

[dev-dependencies]
criterion = "0.3.4"
Expand Down
8 changes: 4 additions & 4 deletions vrp-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrp-cli"
version = "1.9.0"
version = "1.9.1"
authors = ["Ilya Builuk <[email protected]>"]
license = "Apache-2.0"
keywords = ["vrp", "optimization"]
Expand All @@ -23,9 +23,9 @@ name = "vrp_cli"
crate-type = ["cdylib", "lib"]

[dependencies]
vrp-core = { path = "../vrp-core", version = "1.9.0" }
vrp-scientific = { path = "../vrp-scientific", version = "1.9.0", optional = true }
vrp-pragmatic = { path = "../vrp-pragmatic", version = "1.9.0" }
vrp-core = { path = "../vrp-core", version = "1.9.1" }
vrp-scientific = { path = "../vrp-scientific", version = "1.9.1", optional = true }
vrp-pragmatic = { path = "../vrp-pragmatic", version = "1.9.1" }

csv = { version = "1.1.5", optional = true }
serde_json = "1.0.61"
Expand Down
2 changes: 1 addition & 1 deletion vrp-cli/src/extensions/generate/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub(crate) fn generate_plan(
services: generate_tasks(&job_proto.services, true),
priority: job_proto.priority,
skills: job_proto.skills.clone(),
value: job_proto.value.clone(),
value: job_proto.value,
}
})
.collect();
Expand Down
2 changes: 1 addition & 1 deletion vrp-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrp-core"
version = "1.9.0"
version = "1.9.1"
authors = ["Ilya Builuk <[email protected]>"]
license = "Apache-2.0"
keywords = ["vrp", "optimization"]
Expand Down
4 changes: 2 additions & 2 deletions vrp-pragmatic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrp-pragmatic"
version = "1.9.0"
version = "1.9.1"
authors = ["Ilya Builuk <[email protected]>"]
license = "Apache-2.0"
keywords = ["vrp", "optimization"]
Expand All @@ -12,7 +12,7 @@ edition = "2018"
description = "An extension logic for solving rich VRP"

[dependencies]
vrp-core = { path = "../vrp-core", version = "1.9.0" }
vrp-core = { path = "../vrp-core", version = "1.9.1" }

serde = { version = "1.0.123", features = ["derive"] }
serde_json = "1.0.61"
Expand Down
7 changes: 3 additions & 4 deletions vrp-pragmatic/src/validation/objectives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn check_e1601_duplicate_objectives(objectives: &[&Objective]) -> Result<(), For

/// Checks that cost objective is specified.
fn check_e1602_no_cost_objective(objectives: &[&Objective]) -> Result<(), FormatError> {
let no_min_cost = objectives.iter().filter(|objective| matches!(objective, MinimizeCost)).next().is_none();
let no_min_cost = objectives.iter().find(|objective| matches!(objective, MinimizeCost)).is_none();

if no_min_cost {
Err(FormatError::new(
Expand All @@ -77,10 +77,9 @@ fn check_e1603_no_jobs_with_value_objective(
ctx: &ValidationContext,
objectives: &[&Objective],
) -> Result<(), FormatError> {
let has_value_objective =
objectives.iter().filter(|objective| matches!(objective, MaximizeValue { .. })).next().is_some();
let has_value_objective = objectives.iter().any(|objective| matches!(objective, MaximizeValue { .. }));
let has_no_jobs_with_value =
ctx.problem.plan.jobs.iter().filter_map(|job| job.value).filter(|value| *value > 0.).next().is_none();
ctx.problem.plan.jobs.iter().filter_map(|job| job.value).find(|value| *value > 0.).is_none();

if has_value_objective && has_no_jobs_with_value {
Err(FormatError::new(
Expand Down
4 changes: 2 additions & 2 deletions vrp-scientific/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vrp-scientific"
version = "1.9.0"
version = "1.9.1"
authors = ["Ilya Builuk <[email protected]>"]
license = "Apache-2.0"
keywords = ["vrp", "optimization"]
Expand All @@ -13,4 +13,4 @@ description = "An extension logic for solving scientific VRP"


[dependencies]
vrp-core = { path = "../vrp-core", version = "1.9.0" }
vrp-core = { path = "../vrp-core", version = "1.9.1" }

0 comments on commit bdeef36

Please sign in to comment.