chrismo-schmidt / cyclistsocialforce

Social forces for microscopic traffic simulation of cyclists.
MIT License
6 stars 1 forks source link

Module named "pypaperutils" in \cyclistsocialforce\vizualisation.py #10

Closed redfish9 closed 2 months ago

redfish9 commented 2 months ago

Hi @chrismo-schmidt and @moorepants ! Thanks for your awesome framework and I really benefit a lot!

I'm currently working with it and I encountered an error suggesting I do not have the module "pypaperutils". The required class in this module is imported and used in through the following code in "src/cyclistsocialforce/vizualisation.py":

from pypaperutils.design import TUDcolors
...
        self.tud_colors = TUDcolors()
...

As I cannot install "pypaperutils" using pip commands, I wonder if it is a missing folder in this directory ("src/cyclistsocialforce/").

I'd really appreciate your generous reply on how to solve this issue. Thanks again!

chrismo-schmidt commented 2 months ago

Hi redfish9! Nice to see that you are interested in our model.

You can find the module + installation instructions here: https://github.com/chrismo-schmidt/pypaperutils You may also encounter a similar error regarding pytrafficutils: https://github.com/chrismo-schmidt/pytrafficutils

These are two very small modules that I created to dump some more general code that we use for multiple projects. Indeed they are not available via pip. None of it should be essential to the model . TUDcolors provides the colors of the TU Delft corporate identity, which are used for the visualisation. If you prefer, it should be straightforward to replace the colors with any other colors (look for tud_colors and replace whatever instance you want with a different color). Let me know if you encounter any other issues!

Best, Chris

redfish9 commented 2 months ago

Hi Chrismo Schmidt! Thank you very much for your kind response!

Indeed, I replaced TUD colors with the corresponding colors in matplotlib, which achieved a similar effect. I greatly appreciate you providing the code for the pytrafficutils library, as it significantly helped me execute your code smoothly.

I think this problem has been successfully resolved and I will close this issuse.

Wish you all the best!