TUDelft-CITG / OpenCLSim

Rule driven scheduling of cyclic activities for in-depth comparison of alternative operating strategies.
https://openclsim.readthedocs.io
MIT License
14 stars 17 forks source link

Feature/roadmap #59

Closed Pietervanhalem closed 5 years ago

Pietervanhalem commented 5 years ago

I have merged my Halem package into the Digital-Twin master. The Halem package is installable via pip install halem and available in its own GitHub repository. The Halem package contains tests (55% code coverage) and is working according to the expectations,

I have created a mix-in for the Digital-Twin master. I did this by adding a Roadmap to the environment and changing the Movable class. In the Movable class, it checks if the environment contains a Roadmap the route is optimized for the fastest route. If a Route is added in the Notebook the coordinates of the route function as checkpoints of the optimized route.

I have written tests for the new Movable class and all the tests pass. I wrote three tests: 1, it checks if for a single transport the route of Digital-Twin is equal to the route of Halem. 2, it checks when you have more than one route if the first route is different from the second route. And 3, it checks if when you add a route the coordinates of the route are contained in the coordinates of the optimized route. These three tests pass. And cover the entirety of my added code.

Can you please check the code and give suggestions for improvement and then accept my pull request?

uijl commented 5 years ago

Some nuances:

Both the tests and code are running fine, I'll review the code and add some comments / suggest changes.

Pietervanhalem commented 5 years ago

I changed the code so that the mix-in Routable is required for the route optimization. In this mix-in you can specify what you want to optimize.

uijl commented 5 years ago

@Pietervanhalem and I will wait until Monday for additional reviews. If no reviews are added we'll merge @Pietervanhalem's changes into the master branch Monday at noon.