5
$\begingroup$

If you're programming OR challenges in Python, besides using mathematical optimization software (= constraint solvers), which other libraries do you often use? Maybe for mundane tasks such as data parsing, etc. Why? How do they make your life easier?

$\endgroup$
6
$\begingroup$

I can do 90% of my work with the following :

I use them extensively because they are:

  • used by many others
  • well documented
  • maintained
  • user friendly
  • free
  • open source
  • robust
$\endgroup$
6
  • 1
    $\begingroup$ +1, similar to my 90% list. I'd just add numpy for some specific tasks and flask, django or similar for web apps/requests to the models $\endgroup$
    – dhasson
    Jan 6 at 12:40
  • $\begingroup$ @dhasson yes indeed! I think when you install pandas you get numpy for free :). I have little experience with web apps but have worked with flask once or twice and indeed it seemed great. And even though OP mentioned non solving librairies, I feel like the list is incomplete without ORTOOLS. $\endgroup$
    – Kuifje
    Jan 6 at 13:13
  • $\begingroup$ That's true, because pandas is built on top of numpy. OR-Tools can be considered as more than a solving library, as it has a bit of pulp's capabilities and can be used as interface to many solvers. One of my remarks about its Python API is that performance can be way slower than using a low level language, see for example the discussion here and this gist. Anyways, it's a great open source tool for prototyping models and developing solutions for reasonable scale instances. $\endgroup$
    – dhasson
    Jan 6 at 15:27
  • 1
    $\begingroup$ I have also discoverd osmnx and am very impressed! very fun and very powerful!! built upon networkx and pandas so easy to manipulate. Incredible plotting. The only downside is that installing with pip is a nightmare for the moment. $\endgroup$
    – Kuifje
    Jan 8 at 17:28
  • $\begingroup$ osmnx is great! and installation can be cumbersome...you could check this link there's a Docker image containing osmnx, jupyter, networkx, geopandas, pysal, matplotlib, among other useful libraries. Hopefully it'll contain or be compatible with the stuff you use for programming. This link contains the details about the environment and requirements. Docker makes it easier to share code on projects between different machines in a way that's isolated and reproducible. $\endgroup$
    – dhasson
    Jan 8 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.