mlabonne / blog

https://mlabonne.github.io/blog/
https://mlabonne.github.io/blog/
33 stars 10 forks source link

Introduction to Linear Programming in Python | Maxime Labonne #5

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Introduction to Linear Programming in Python | Maxime Labonne

A guide to mathematical optimization with Google OR-Tools

https://mlabonne.github.io/blog/linearoptimization/

DeanStra commented 2 years ago

This is very useful, thanks! Out of interest why did it take my program 184037.00 milliseconds to solve? Is your pc really more than 2,000 times faster? I was entering the code in IDLE.

edit: the answer comes ~instantaneously but IDLE says it's taking a number of seconds.

Wang-Yong2018 commented 2 years ago

Useful blog on explain OR tools with interested war game. It is ready user friendly and OR tools and support multi model.

================= Solution ================= Solved in 1.00 milliseconds in 2 iterations

Optimal power = 1800.0 💪power Army:

mlabonne commented 2 years ago

Thanks for your feedback!

@DeanStra This is strange, is it value returned by solver.wall_time() or another measure provided by IDLE?

DeanStra commented 2 years ago

Hi Maxime I'm new to python and don't really understand your question. FWIW I ran the code in Jupyter Notebooks and am getting times of 1-3 milliseconds. Will provide more details upon request.

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, May 13, 2022 at 11:05 AM Maxime Labonne @.***> wrote:

Thanks for your feedback!

@DeanStra https://github.com/DeanStra This is strange, is it value returned by solver.wall_time() or another measure provided by IDLE?

— Reply to this email directly, view it on GitHub https://github.com/mlabonne/blog/issues/5#issuecomment-1125875356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZEUNIUH4EO5ICJV73GGXP3VJYSN3ANCNFSM5VZYBBFQ . You are receiving this because you were mentioned.Message ID: @.***>

mlabonne commented 2 years ago

@DeanStra No problem, I just wanted to check where this "184037.00 milliseconds" value comes from. It's probably nothing important, I'm glad if it works better for you with Jupyter Notebook.