/******************************************************** Xpress-BCL C# Example Problems ============================== file xbdelvr.cs ```````````````` Transportation problem. (c) 2008-2023 Fair Isaac Corporation authors: S.Heipcke, D.Brett. ********************************************************/ using System; using System.Text; using System.IO; using BCL; namespace Examples { public class TestIntroDelivery { const int NSupp = 10; /* Number of suppliers */ const int NCust = 7; /* Number of customers */ const int MaxArcs = 100; /* Max. num. of non-zero cost values */ //Define XPRBDATAPATH to wherever you have placed the data folder; here we expect it to be same directory as compiled example. static string XPRBDATAPATH = Directory.GetParent(System.Reflection.Assembly.GetExecutingAssembly().Location).FullName + "/Data"; static string VANFILE = XPRBDATAPATH + "/delivery/ifvan.dat"; /* Van data file */ static string COSTFILE = XPRBDATAPATH + "/delivery/cost.dat"; /* Cost data file */ /****DATA****/ /* Supplier: London Luton B'ham Bristl Derby Stckpt York */ double[] SUPPLY = {140.0, 600.0, 50.0, 10.0, 400.0, 200.0, 20.0, /* Supplier: Derby Soton Scnthp */ 90.0, 30.0, 12}; /* Customer: London Livpol Doncst York Hull Manchr Shffld */ double[] DEMAND = {123.3, 56.4, 17.1, 192.8, 310.0, 47.0, 86}; double[,] COST = new double[NSupp,NCust]; /* Cost per supplier-customer pair */ double[,] IFVAN = new double[NSupp,NCust]; /* Non-zero if route uses vans instead of lorries */ double VANCAP=40; /* Capacity on routes that use vans */ XPRBprob p = new XPRBprob("Delivery"); /* Initialize a new problem in BCL */ /***********************************************************************/ void modDelivery() { XPRBexpr lobj, lc; int s,c; XPRBvar[,] x = new XPRBvar[NSupp,NCust]; /****VARIABLES****/ for(s=0;s= DEMAND[c]); } for(s=0;s