internal Data(string filename) { InputDataReader reader = new InputDataReader(filename); time = reader.ReadDoubleArrayArray(); distance = reader.ReadDoubleArrayArray(); n = time.Length; timeNormalized = CrossCutting.CrossCutting.UnitVectorScaleDoubleArrayArray(time, n, n); distanceNormalized = CrossCutting.CrossCutting.UnitVectorScaleDoubleArrayArray(distance, n, n); }
internal static void ReadData(string fileName) { InputDataReader reader = new InputDataReader(fileName); _avail = reader.ReadDoubleArray(); _rate = reader.ReadDoubleArray(); _inv0 = reader.ReadDoubleArray(); _prodCost = reader.ReadDoubleArray(); _invCost = reader.ReadDoubleArray(); _revenue = reader.ReadDoubleArrayArray(); _market = reader.ReadDoubleArrayArray(); _nProd = _rate.Length; _nTime = _avail.Length; }
internal Data(string filename) { InputDataReader reader = new InputDataReader(filename); foodCost = reader.ReadDoubleArray(); foodMin = reader.ReadDoubleArray(); foodMax = reader.ReadDoubleArray(); nutrMin = reader.ReadDoubleArray(); nutrMax = reader.ReadDoubleArray(); nutrPerFood = reader.ReadDoubleArrayArray(); nFoods = foodMax.Length; nNutrs = nutrMax.Length; if (nFoods != foodMin.Length || nFoods != foodMax.Length) { throw new ILOG.Concert.Exception("inconsistent data in file " + filename); } if (nNutrs != nutrMin.Length || nNutrs != nutrPerFood.Length) { throw new ILOG.Concert.Exception("inconsistent data in file " + filename); } for (int i = 0; i < nNutrs; ++i) { if (nutrPerFood[i].Length != nFoods) { throw new ILOG.Concert.Exception("inconsistent data in file " + filename); } } }
internal Data(string filename) { InputDataReader reader = new InputDataReader(filename); foodCost = reader.ReadDoubleArray(); foodMin = reader.ReadDoubleArray(); foodMax = reader.ReadDoubleArray(); nutrMin = reader.ReadDoubleArray(); nutrMax = reader.ReadDoubleArray(); nutrPerFood = reader.ReadDoubleArrayArray(); nFoods = foodMax.Length; nNutrs = nutrMax.Length; if ( nFoods != foodMin.Length || nFoods != foodMax.Length ) throw new ILOG.Concert.Exception("inconsistent data in file " + filename); if ( nNutrs != nutrMin.Length || nNutrs != nutrPerFood.Length ) throw new ILOG.Concert.Exception("inconsistent data in file " + filename); for (int i = 0; i < nNutrs; ++i) { if ( nutrPerFood[i].Length != nFoods ) throw new ILOG.Concert.Exception("inconsistent data in file " + filename); } }
internal Data(string filename) { InputDataReader reader = new InputDataReader(filename); activityOnResource = reader.ReadIntArrayArray(); duration = reader.ReadDoubleArrayArray(); dueDate = reader.ReadDoubleArray(); earlinessCost = reader.ReadDoubleArray(); tardinessCost = reader.ReadDoubleArray(); nJobs = dueDate.Length; nResources = activityOnResource.Length; }
internal Data(string fileName) { InputDataReader reader = new InputDataReader(fileName); arcCost = reader.ReadDoubleArrayArray(); numNodes = arcCost.Length; for (int i = 0; i < numNodes; ++i) { if (arcCost[i].Length != numNodes) { throw new ILOG.Concert.Exception("inconsistent data in file " + fileName); } arcCost[i][i] = 0.0; } }
internal static void ReadData(string fileName) { System.Console.WriteLine("Reading data from " + fileName); InputDataReader reader = new InputDataReader(fileName); _capacity = reader.ReadDoubleArray(); _fixedCost = reader.ReadDoubleArray(); _cost = reader.ReadDoubleArrayArray(); _nbLocations = _capacity.Length; _nbClients = _cost.Length; for(int i = 0; i < _nbClients; i++) if ( _cost[i].Length != _nbLocations ) throw new ILOG.Concert.Exception("inconsistent data in file " + fileName); }
internal static void ReadData(string fileName) { System.Console.WriteLine("Reading data from " + fileName); InputDataReader reader = new InputDataReader(fileName); _capacity = reader.ReadDoubleArray(); _fixedCost = reader.ReadDoubleArray(); _cost = reader.ReadDoubleArrayArray(); _nbLocations = _capacity.Length; _nbClients = _cost.Length; for (int i = 0; i < _nbClients; i++) { if (_cost[i].Length != _nbLocations) { throw new ILOG.Concert.Exception("inconsistent data in file " + fileName); } } }
internal Data(string fileName) { InputDataReader reader = new InputDataReader(fileName); arcCost = reader.ReadDoubleArrayArray(); numNodes = arcCost.Length; for (int i = 0; i < numNodes; ++i) { if ( arcCost[i].Length != numNodes ) throw new ILOG.Concert.Exception("inconsistent data in file " + fileName); arcCost[i][i] = 0.0; } }