Benders Decomposition in XpressMP

· Source: OR in an OB World · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Advanced, medium

Summary

This article details the implementation of Benders decomposition using the Java API for FICO's XpressMP solver, specifically for a fixed-cost transportation problem. The author adapted existing Java code, previously used with CPLEX, to XpressMP, highlighting challenges encountered due to XpressMP's design and sparse Java API documentation. The implementation focuses on "one tree Benders," utilizing callbacks within the master problem. Key aspects discussed include the formulation involving binary warehouse opening variables and continuous flow variables, the specific `PreIntsolCallback` interface for adding cuts, and workarounds for variable naming inconsistencies within callbacks. The author also addresses thread safety considerations, noting that XpressMP's design provides problem copies to each thread but initially caused crashes when printing cuts in a multi-threaded environment, a problem resolved by the variable naming workaround.

Key takeaway

For AI Engineers or Research Scientists working with optimization problems in XpressMP, understanding the nuances of its Java API for Benders decomposition is crucial. You should anticipate challenges with callback implementation and variable naming, and be prepared to use workarounds or consult C API documentation. This approach allows for efficient problem solving, but careful debugging, especially in multi-threaded environments, is essential to avoid crashes.

Key insights

Implementing Benders decomposition in XpressMP via Java callbacks presents unique challenges and workarounds.

Principles

Method

Implement `XpressProblem.CallbackAPI.PreIntsolCallback` in the master problem to add Benders cuts, accepting node solutions and rejecting heuristic solutions if infeasible or underestimating costs.

In practice

Topics

Best for: Software Engineer, Research Scientist, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by OR in an OB World.