A while ago, I had to speed up some Python code. I learnt a few things about speeding up Python codes that I am sharing (in no particular order, but the couple major ones are underlined). Perhaps you find them useful:
[Read More]
Why Linearize in Optimization?
$&(&^%$)
Performance of Pyomo on a Mac
Fun Fact: Pyomo runs much faster on computers with SSD hard drive (most Apple Mac computers). I discovered it accidently. It is because Python code of Pyomo has to access a solver file and to do that, it has to do some I/O operations, which is faster on SSD hard...
[Read More]