FelooPy: The Plug-and-Play OR Workflow You’ve Been Looking For

Keivan
Keivan Tafakkori

Ph.D. Candidate

University of Tehran, Creator of FelooPy

FelooPy is a Python software package for user-friendly formulating, coding, solving, analyzing, and benchmarking mathematical, computa tional, or statistical models. It supports interface/solver-neutral coding, promoting shareability and reproducibility across users with varying access to free/proprietary solvers. The models are passed to environments that are searched iteratively, sequentially, or in parallel, all integrated to decide how operations should be performed in real or virtual-world systems, industries, or supply chains. These modular environments enable experts to reuse capabilities instead of starting from scratch for each use case.

Thanks to advances in creativity and computing, we have countless methods to perform any operation—based on our ideas, expert advice, or computer-generated suggestions. While a just do it attitude may seem logical in a rush, opting for the best method is crucial, especially for tasks that are frequent, high-impact, or risky, affecting the sustainability or resilience of our lives.

Surpass human-level intelligence

Following a method to perform an operation that is solely based on historical experience, existing knowledge, or data is misleading. When an operation is new, its context of performance has evolved, or elements (players) interacting in its context are changed, the description or prediction of outcomes, if not impossible, becomes difficult. In such situations, outcomes are not immediately apparent or historically documented.

Herein, advanced models (built on assumptions about how elements interact) are crucial in simulating potential outcomes. Using these models, a prescription on how that new operation should be effectively performed (considering its evolved context and changed players) is derived, surpassing human-level intelligence.

Operations research (O.R.) involves developing and analyzing simulations of feasible methods for performing operations using mathematical, computational, or statistical models. Each model is tailored to a specific problem and built on a set of expert-defined assumptions that establish logical rules and constraints to guide operations. These models target, represent, or learn the interactions among elements—referred to as sets—that influence key performance indicators (KPIs) within objective functions defining optimal efficiency, accuracy, leanness, and agility. The data on elements affecting operations (e.g., resource limitations or technical coefficients), along with the preferences and thresholds—whether predefined before model development or collected afterward—are known as parameters. The operations defined by the model that need to be performed are called decision variables. In short, the models help us determine the optimal method to perform operations concerning key performance indicators (KPIs). This result-oriented approach underpins our rebranding from O.R. (i.e., the science of the better) to Decision Science (D.S.) (Camm and Watson, 2023).1

What are the requirements?

In O.R./D.S., we analyze and optimize a spectrum of operations—from highly frequent, short-term operations, through moderately frequent, mid-term tactics, to lowly frequent, long-term strategies. We develop optimal schedules, plans, and designs to enhance a real/virtual world system’s, industry’s, or supply chain’s performance across all time horizons.

Domain experts in O.R./D.S. typically move from modeling to solving by coding their models for local/cloud computers. These computers have essential hardware—including central processing units (CPUs), graphics processing units (GPUs), and random access memories (RAMs)—to run optimization algorithms. CPUs have a small set of strong cores running multiple threads concurrently with multi-threading and time-slicing techniques, making them powerful for sequential processes. In contrast, GPUs feature many weak cores designed for single-instruction, multiple threads (SIMIT) processes, handling data-parallel operations by applying the same process across many elements. System RAM for CPUs or dedicated video RAM (VRAM) for GPUs retains temporary information through iterations; more efficient algorithms require less memory. With the parallel processing capabilities of GPUs and the introduction of PDLP—a simple, parallelized first-order method for large-scale linear programming Lu and Applegate (2024)—the traditional sequential simplex algorithm is now considered a costly, energy-intensive competitor (Baker, 2025). However, with emerging technologies like quantum processing units (QPUs) (Microsoft) or neural processing units (NPUs), both traditional CPUs and GPUs may eventually become obsolete.

Figure 1 categorizes classic and emerging optimization algorithms in O.R./D.S.. It shows exact methods for linear programming (LP) and integer/mixed-integer programming (IP/MIP) (e.g., the simplex, branch-and-bound, or cutting plane algorithms), alongside interior point methods for LP and nonlinear programming (NLP). It also highlights general-purpose programming (GPP) while contrasting heuristic and intelligence optimization algorithms that use/train AI agents for sequential decision-making (Powell, 2022).  These algorithms rely on programming languages to efficiently unlock computer resources. The evolution began with FORTRAN (1957) (Backus, 1978) and has progressed to modern, user-friendly languages like Python (1989)2 and Julia (2009) (Bezanson et al., 2017) that built on robust lower-level languages such as C (1972) (Kernighan and Ritchie, 1978) and C++ (1983). These free, open-source languages provide high-performance computing with simpler syntax accessible to non-experts. However, relying solely on programming languages can be inefficient for O.R./D.S. since each new model demands extensive adjustments. Consequently, many organizations, scientists, engineers, and students delegate the work to specialized optimization algorithms or interface/solver developers.

Promises of modeling languages

Since 1984, developers have been designing domain-specific languages (DSLs), optimization programming languages (OPLs), algebraic modeling languages (AMLs), mathematical programming languages (MPLs), linear/logical/literate programming languages (LPLs) (Hürlimann, 2022), application programming interfaces (APIs), or simply modeling languages to help users spend less time coding, solving, and analyzing models.

Modeling languages enable users to express their intentions in a manner closer to human reasoning or by using domain-specific expressions. These languages are then translated into source code, which is subsequently compiled into bytecode, assembly code, and ultimately machine code for execution. Thanks to Python and Julia, which use interpreters instead of compilers, modern modeling languages are more flexible, accessible, and open-source than traditional ones. This openness provides access to cutting-edge optimization algorithms and promotes code sharing and reproducibility—principles pioneered by data scientists, machine learning engineers, and computer scientists.

Modeling languages let users interact with optimization algorithms written purely in Python/Julia or provided by solver binaries (e.g., compiled from C/C++ or Rust), either just-in-time or by converting the model to intermediary file formats like .mps or .lp. In summary, they primarily serve to streamline the interfaces between users and advanced solvers, facilitating the translation of models into executable algorithms through a model generation process. This process can be time-consuming, especially when intermediary files are required. Sometimes, model generation time (MGT) exceeds CPU time (CPT) for complex models, though efficient algorithms manage memory via lazy initialization or constraints (users can refer to GAMS and JuMP as two popular providers of modeling languages who recently competed on MGT). Thus, experimenting with different modeling languages is desirable if the model is used frequently.

Modeling languages available for Python/Julia are distributed

ORtmr_SS25_11
Figure 1: Algorithms in O.R./D.S. (from left to right: exact optimization for LP; exact optimization for IP/MIP; exact optimization for LP/NLP or heuristic optimization for GPP; and intelligence optimization for GPP) (Source: The author)
ORtmr_SS25_12
Figure 2: FelooPy code and output, demonstrating the model and solution of a 0/1 knapsack problem. (Source: The author)

as specific packages through websites like PyPI or JuliaHub. Some—such as gurobipy, docplex, coptpy, xpress, mosek, hexaly, insideopt − seeker, and highspy—are solver-specific, while others like pulp, pyomo, gekko, ortools, amplpy, gamspy, pyoptinterface, and jump facilitate using multiple solvers. Additional packages include cvxpy for convex optimization, rsome for stochastic and robust optimization, pyepo for predict-then-optimize, scipy for calculus-based optimization, and pymoo, niapy, mealpy, and timefold for heuristic algorithms, with pydecision supporting multi-attribute decision-making. Notably, packages such as ortools, cplex, pychoco, minizinc, and cpmpy provide algorithms for logical constraints satisfaction in integer programming.3

Briefly, most Python-based modeling languages serve as interfaces to solvers (free or proprietary) optimized for specific O.R./D.S. algorithms. Their performance varies, making code sharing and result reproduction challenging unless the same interface or solver is used. This forces O.R./D.S. experts to rewrite code for different languages. Some interfaces offer deployment options like cloud platforms (e.g., NEOS), while others rely on local solvers. Efficient coding often requires extensive documentation lookup or help from language models, diverting time from higher-level tasks like analysis and benchmarking.

FelooPy, yet another modeling language?

FelooPy (feasible, logical, and optimal in Python, pronounced /fE"lupaI/) is a software package written in the Python programming language that serves as an efficient and feature-rich integrated decision environment (IDE) for O.R./D.S. professionals. It has been in development since September 14, 2022. It supports various decision problems, including certain or uncertain, single or multi-objective, constrained or unconstrained numerical optimization (i.e., convex or non-convex LP and NLP) and combinatorial optimization (i.e., IP and MIP, including mixed-integer linear programming (MILP), mixed-integer quadratic programming (MIQP), and mixed-integer non-linear programming (MINLP)) problems. These problems can be formulated as mathematical, computational, or statistical models that target, represent, or learn real/virtual world systems, industries, and supply chains and are coded into FelooPy’s decision environments. As optimization is not always a concern in a decision problem, and one desires feasible and logical methods to perform operations, FelooPy can help satisfy a set of logical rules for performing operations through constraint programming (CP). Finally, as a formulation of the decision problem is not always available, FelooPy enables data-driven evaluation of experts’ opinions given pairwise comparison matrices or decision matrices to weight criteria (from most important to least important), or, given decision matrices and criteria weight vectors, to rank/classify a set of alternatives (from best to worst or from highest priority to lowest priority ) through multi-attribute decision-making (MADM) algorithms.

FelooPy also supports a variety of decision algorithms (either by itself or through its interface/solver wrappers) that search decision environments These include classical exact optimization algorithms (e.g., simplex, branching-based, cutting-plane, decomposition-based, and interior-point methods), constraint optimization algorithms (e.g., specialized algorithms provided by OR-Tools and CPLEX for scheduling and routing), common heuristic optimization algorithms (e.g., mat-heuristics, meta-heuristics, sim-heuristics, learn-heuristics, grad-heuristics, hyper-heuristics, and hybrid-heuristics), uncertain optimization algorithms (e.g., currently robust optimization and stochastic optimization), and it is expected to support emerging intelligence optimization algorithms (e.g., predict-and-optimize, classify-and-optimize, cluster-and-optimize, and act-and-optimize).

FelooPy enables users to write O.R./D.S. projects in a manner that is independent of any specific interface, solver, or decision algorithm, allowing for greater flexibility. It integrates with other interfaces, such as Julia’s JuMP within Python, enabling productive yet flexible workflows. As a result, coded projects can be easily shared and reproduced within the community, with different users able to access or engage with particular interfaces, solvers, or algorithms that align with their interests or needs. It offers a simple syntax with five main operators: data_toolkit, search, parallel_search, report, and get. Figure 2 is an example of solving and analyzing a 0/1 knapsack problem using them. These operators manage input/output data, search decision environments, generate outputs, and retrieve solutions. It enables sensitivity analysis and benchmarking of various models, algorithms, interfaces, solvers, and configurations through boilerplates of decision environments. FelooPy analyzes both the input/output data of a specific decision environment and its configurations in an integrated manner, letting users diagnose the root cause of infeasibility, illogicality, or sub-optimality. Users can interact with different decision environments in iterative, sequential, or parallel workflows, where each environment can share data with other environments and vice versa.

Thanks to its graphical user interface, FelooPy’s engine sets up the necessary interpreters, virtual development environments, and interfaces and solvers. FelooPy’s studio also enables managing, editing, browsing, sharing, backing up, recovering, and installing requirements for each specific O.R./D.S. project. It is also integrated with Git workflows as a version control system for local/cloud projects. FelooPy is expected to provide a robust foundation for converting informal problem definitions into testable models in an era of large language models acting as modern expert systems.

In conclusion, FelooPy is a unified, future-proof tool for O.R./D.S./M.S. experts, simplifying mathematical, computational, and statistical modeling, solving, and reporting with a clean Pythonic syntax—explore the website, visit the GitHub repository, or get started now with pip install "feloopy[stock]".

References:

Backus, J.W., 1978. The history of FORTRAN I, II, and III. SIGPLAN Notices 13, 165–180. doi:10.1145/960118.808380.

Baker, J., 2025. AI’s energy demands: Addressing sustainability and technological advancements in data centers. Analytics

Magazine doi:10.1287/LYTX.2025.01.13.

Bezanson, J., Edelman, A., Karpinski, S., Shah, V.B., 2017. Julia: A fresh approach to numerical computing. SIAM Review 59,

65–98. doi:10.1137/141000671.

Camm, J.D., Watson, M., 2023. Distinguishing the profession of operations research in the age of analytics, big data, data science

and AI. OR/MS Today 50. doi:10.1287/orms.2023.04.06.

Hürlimann, T., 2022. Mathematical modeling using LPL. URL: https://matmod.ch.

Kernighan, B.W., Ritchie, D.M., 1978. The C programming language. Prentice-Hall.

Powell, W.B., 2022. Reinforcement learning and stochastic optimization: A unified framework for sequential decisions. Wiley.

Acknowledgments: We would like to thank Haokun Du for taking the time to review this article. Photo credit goes to Kelly Sikkema for the header photo.