Princeton Optimization

Working with a Fantastic Toolkit: Q&A About Solution Development

In October I conducted a webinar, “Optimization Solution Development & Deployment, a Framework for Success” (watch it here). Following are lightly edited excerpts from the Q&A with the attendees. Some of the questions relate to the INFORMS Analytics Framework, which is described here. Question: What value does Princeton find in building optimization and analytics solutions […]

In October I conducted a webinar, “Optimization Solution Development & Deployment, a Framework for Success” (watch it here). Following are lightly edited excerpts from the Q&A with the attendees. Some of the questions relate to the INFORMS Analytics Framework, which is described here.

Question: What value does Princeton find in building optimization and analytics solutions in an iterative and incremental fashion, à la many Agile methods? Would each increment walk through each of the analytics framework domains and result in a partial but functional analytics solution?”

Irv: That’s a great question. We do use Agile for our development, but I would say not in all of the domains. When we are starting off defining a project, we are “being Agile” in a sprint because we are not worrying about code—we are getting the problem and the documentation right or the analytics right. Once we have the problem defined, there are sprints in Agile where we are working with data. Then we get to the modeling. If we’ve chosen to use optimization, we start building a model. Using Agile, we will be saying, “Here is a set of requirements that we can develop,” and we can show client executives a solution that is handling that set of requirements. We will create a user interface that will let them see that we are handling a certain part of the data and certain requirements and it’s getting a solution, but it doesn’t meet other constraints, which we will address in future sprints. Such a partial, functional solution allows the project owner, from the Agile perspective, to confirm moving forward, having met the goals agreed to at the beginning of the sprint.

We tend to work in three‑week sprints with optimization, not two weeks. We make sure that clients understand that there is a research component with developing the model—we may try different ideas to see what will work. Sometimes at the end of a sprint, we report that we tried three ideas which didn’t work, so in the next sprint we will try a fourth idea. We set those expectations ahead of time. From our experience in project management and communication, we understand the risks in trying one modeling approach versus another, so that we can avoid those kinds of conversations.

In general, we work iteratively and get to the modeling, assuming we haven’t had to come back and get the data or change the business problem. The development process is linear in the sense that we establish the business problem, then the analytics statement of the problem, then we work with the data, and then figure out what optimization technology to use. Often we use a commercial solver in building the model, though sometimes we build some heuristics as well. We work incrementally at that stage.

Question: Are there templates for user interfaces to get up and running faster?

Irv: In a couple of projects, we have used a tool called taipy. There is an open-source version as well as an enterprise version. With taipy, you can have a bunch of pandas tables and, in an hour, create a UI that displays the tables. In a few days you can get to a functional UI with, for example, an optimization button that calls a model, produces an answer, and displays it.

We have found that quite valuable for demonstrating that we are making progress with an optimization solution. taipy uses combinations of python and markdown. It’s important to note that when we get to the delivery of a project, things can be different because many clients have specifications about how UI design works and how their UI code should integrate with their applications. For one client, we created a taipy UI so that during our agile process the business sponsors and project people could validate what we were doing. That UI had to act as a tab within a set of applications at the company because they had standards for how that works. They hired a developer to write essentially the same UI that we had provided, but using their standards, and then called our REST API in the backend. I like taipy because I can do everything in python and not worry about learning all the tricks of Angular.

Question: Sometimes projects involve both AI forecasting demand, for example, and optimization. How do you handle that in terms of data and project management?

Irv: Let’s presume that AI in this case is machine learning—Gen AI is a separate topic. We start with the business problem and, in understanding the analytics problem, address if we want to use forecasting or something like machine learning that becomes an input into the optimization. For a project with a trucking company, there were multiple machine learning models and multiple optimization models. I created a very large diagram with arrows showing how one model produced output that became an input for another model. This kind of exercise is part of the design of the solution process. We then start actual development, making sure that we are always delivering value. At Princeton we have a fantastic toolbox that includes machine learning, GenAI, optimization, simulation, and more. We work with clients to understand the problem and then pick the right set of tools.

Question: For Princeton Consultants, after completing a project, how long do you typically provide maintenance or follow‑up support?

Irv: It’s all over the map. Some clients have someone with the right background, so we do a knowledge transfer and that employee handles all the forward‑going maintenance. Other clients prefer that we handle continual support, which can last a few years or even more. It depends on how the solution is used and whether ongoing changes are needed. Some solutions are very stable and we remain available for fixes. We are supporting a client that is rolling out a pilot solution to numerous facilities, and we fix bugs.

Question: How familiar are organizations with python? What level of technical abilities of the clients can we expect these days?

Irv: We are using python all the time and have found no resistance. Clients are on to it—they use python in lots of different ways, sometimes without anything to do with optimization. There are major websites run on python back ends. We did have a client in Finance, before the pandemic, that did not allow python. We were developing a model for them, and they did everything in Java. We agreed we would document the model and write the code in python, assuming that the data was the same format as in Java. The client developer translated our python to Java and, if he ran into trouble, sent us his MPS file that we ran locally to see if our python code produced something different and, if so, why. Sometimes we found a bug in the Java code. Otherwise, we have not really seen any resistance to using python.

I think the degree of sophistication in developing an application with python is very varied. One issue is that people often learn python in the notebook environment, which is great for experimentation, PoC’s, and data exploration. However, when delivering an application, you’ve got to get out of the notebook and think about object‑oriented programming concepts and application design. The same principles apply whether you’re using python, Java, C++, or any object‑oriented language. When it comes to building a real application, we have to fill some gaps at times.

To discuss these topics further with Irv, email us to set up a call.