From 93b7e04c52884115fbe46c08021fda09745d71d8 Mon Sep 17 00:00:00 2001 From: MLErik <baerenjesus@gmail.com> Date: Wed, 6 Nov 2019 09:01:45 -0500 Subject: [PATCH] resolved comments by christian b This closes #273 --- changelog.md | 2 +- flatland/envs/malfunction_generators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 5b582d99..7232dba6 100644 --- a/changelog.md +++ b/changelog.md @@ -10,7 +10,7 @@ Changes since Flatland 2.0.0 - agent attribute `next_malfunction`is not used anymore, it will be removed fully in future versions. - `break_agent()` function is introduced which induces malfunctions in agent according to poisson process - `_fix_agent_after_malfunction()` fixes agents after attribute `malfunction == 0` -- Intoduced the concept of malfunction generators. Here you can add different malfunction models in future updates. Currently it only loads from files and parameters. +- Introduced the concept of malfunction generators. Here you can add different malfunction models in future updates. Currently it only loads from files and parameters. ### Changes in `Environment` - moving of member variable `distance_map_computed` to new class `DistanceMap` diff --git a/flatland/envs/malfunction_generators.py b/flatland/envs/malfunction_generators.py index c3e2a1db..58233509 100644 --- a/flatland/envs/malfunction_generators.py +++ b/flatland/envs/malfunction_generators.py @@ -26,7 +26,7 @@ def _malfunction_prob(rate: float) -> float: return 1 - np.exp(- (1 / rate)) -def malfunction_from_file(filename) -> Tuple[MalfunctionGenerator, MalfunctionProcessData]: +def malfunction_from_file(filename: str) -> Tuple[MalfunctionGenerator, MalfunctionProcessData]: """ Utility to load pickle file -- GitLab