| |||||||||||
Adding the message callback in Java Description The examples demonstrates how to define a messaging callback for the Xpress Optimizer in Java.
Source Files By clicking on a file name, a preview is opened at the bottom of this page.
Callback.java import com.dashoptimization.*; public class Callback { public void run(String model) { try (XPRSprob problem = new XPRSprob(null)) { problem.setIntControl (XPRS.LPLOG, 1); problem.addMessageListener(DefaultMessageListener::console); problem.readProb (model); problem.lpOptimize (""); } } public static void main(String [] args) { String model = args.length == 0 ? "../data/callback" : args[0]; Callback c = new Callback (); c.run (model); } } | |||||||||||
© Copyright 2024 Fair Isaac Corporation. |