From 6113f684426b26fe60154c62d8e4e7bf561fd2e4 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 27 Apr 2020 16:15:36 -0500 Subject: [PATCH 1/2] allowing 0 cap constrain --- src/capacity_constraint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capacity_constraint.h b/src/capacity_constraint.h index fa5bcd32de..85672a1173 100644 --- a/src/capacity_constraint.h +++ b/src/capacity_constraint.h @@ -68,7 +68,7 @@ class CapacityConstraint { : capacity_(capacity), converter_(converter), id_(next_id_++) { - if (capacity_ <= 0) + if (capacity_ < 0) throw ValueError("Capacity is not positive, no trades will be executed"); } From 407597044f9a8b68bb4fececafef2f7a0b62455d Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 27 Apr 2020 16:20:04 -0500 Subject: [PATCH 2/2] adding news --- news/0cap.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 news/0cap.rst diff --git a/news/0cap.rst b/news/0cap.rst new file mode 100644 index 0000000000..133fb8b6b4 --- /dev/null +++ b/news/0cap.rst @@ -0,0 +1,12 @@ +**Added:** None + +**Changed:** +- allowing 0 capacity constrain to be set + +**Deprecated:** None + +**Removed:** None + +**Fixed:** None + +**Security:** None