Reader small image

You're reading from  Extending Power BI with Python and R - Second Edition

Product typeBook
Published inMar 2024
Reading LevelIntermediate
PublisherPackt
ISBN-139781837639533
Edition2nd Edition
Languages
Right arrow
Author (1)
Luca Zavarella
Luca Zavarella
author image
Luca Zavarella

Luca Zavarella has a rich background as an Azure Data Scientist Associate and Microsoft MVP, with a Computer Engineering degree from the University of L'Aquila. His decade-plus experience spans the Microsoft Data Platform, starting as a T-SQL developer on SQL Server 2000 and 2005, then mastering the full suite of Microsoft Business Intelligence tools (SSIS, SSAS, SSRS), and advancing into data warehousing. Recently, his focus has shifted to advanced analytics, data science, and AI, contributing to the community as a speaker and blogger, especially on Medium. Currently, he leads the Data & AI division at iCubed, and he also holds an honors degree in classical piano from the "Alfredo Casella" Conservatory in L'Aquila.
Read more about Luca Zavarella

Right arrow

Handling optimization problems with Python and R

As you’ve probably noticed, the large community that develops Python packages never stands still. Even in this case, it has provided a module that helps us solve linear optimization problems. Its name is PuLP (https://github.com/coin-or/pulp) and it is an LP modeler written in Python. It interfaces with the most common free and non-free engines that solve LP, Mixed-Integer Programming (MIP), and other related problems, such as the GNU Linear Programming Kit (GLPK), COIN-OR Branch and Cut (CBC), which is the default one, and IBM ILOG CPLEX. Using PuLP is fairly straightforward. Let’s put it into practice right away with the problem from the previous section.

Solving the LP problem in Python

The code that will be explained to you in this section can be found in the Python\01-linear-optimization-in-python.py file in the Chapter 14 folder of the repository.

First, you have to install the PuLP module in your environment...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Extending Power BI with Python and R - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781837639533

Author (1)

author image
Luca Zavarella

Luca Zavarella has a rich background as an Azure Data Scientist Associate and Microsoft MVP, with a Computer Engineering degree from the University of L'Aquila. His decade-plus experience spans the Microsoft Data Platform, starting as a T-SQL developer on SQL Server 2000 and 2005, then mastering the full suite of Microsoft Business Intelligence tools (SSIS, SSAS, SSRS), and advancing into data warehousing. Recently, his focus has shifted to advanced analytics, data science, and AI, contributing to the community as a speaker and blogger, especially on Medium. Currently, he leads the Data & AI division at iCubed, and he also holds an honors degree in classical piano from the "Alfredo Casella" Conservatory in L'Aquila.
Read more about Luca Zavarella