/******************************************************** Xpress-BCL Java Example Problems ================================ file xbdelvr.java ````````````````` Transportation problem. (c) 2008 Fair Isaac Corporation author: S.Heipcke, Jan. 2000, rev. Mar. 2011 ********************************************************/ import java.io.*; import com.dashoptimization.*; public class xbdelvr { static final int NSupp = 10; /* Number of suppliers */ static final int NCust = 7; /* Number of customers */ static final int MaxArcs = 100; /* Max. num. of non-zero cost values */ static final String VANFILE = System.getProperty("XPRBDATA") + "/delivery/ifvan.dat"; static final String COSTFILE = System.getProperty("XPRBDATA") + "/delivery/cost.dat"; /****DATA****/ /* Supplier: London Luton B'ham Bristl Derby Stckpt */ static final double SUPPLY[] = {140.0, 600.0, 50.0, 10.0, 400.0, 200.0, /* Supplier: York Derby Soton Scnthp */ 20.0, 90.0, 30.0, 12}; /* Customer: London Livpol Doncst York Hull Manchr */ static final double DEMAND[] = {123.3, 56.4, 17.1, 192.8, 310.0, 47.0, /* Customer: Shffld */ 86}; static double[][] COST; /* Cost per supplier-customer pair */ static double[][] IFVAN; /* Non-zero if route uses vans instead of lorries */ static final double VANCAP=40; /* Capacity on routes that use vans */ /***********************************************************************/ static void modDelivery() throws IOException { XPRBexpr lobj, lc; int s,c; XPRBvar[][] x; try (XPRBprob p = new XPRBprob("Delivery")) { /* Initialize BCL and create a new problem */ /****VARIABLES****/ x = new XPRBvar[NSupp][NCust]; for(s=0;s