public void Start() { var matrix = new EmmeMatrix(Root.ZoneSystem.ZoneArray, MatrixToSave.AquireResource<SparseTwinIndex<float>>().GetFlatData()); matrix.Save(OutputFile, true); }
private static void CopySummedMatrix(IZone[] zones, string[] origins, string destination) { var array = new float[zones.Length * zones.Length]; try { for(int i = 0; i < origins.Length; i++) { BinaryHelpers.ExecuteReader((reader => { var matrix = new EmmeMatrix(reader); AddToArray(array, matrix.FloatData); }), origins[i]); } SaveData.SaveMatrix(zones, array, destination); } catch (IOException) { } }
internal void Execute(int iteration) { BinaryHelpers.ExecuteReader((reader) => { EmmeMatrix matrix = new EmmeMatrix(reader); switch (matrix.Type) { case EmmeMatrix.DataType.Float: ProcessData(matrix.FloatData, iteration); break; default: throw new XTMFRuntimeException("In '" + Name + "' the data type for the file '" + DemandMatrix + "' was not float!"); } }, DemandMatrix); }
private static void CopyMatrix(IZone[] zones, string origin, string destination) { try { BinaryHelpers.ExecuteReader((reader => { var matrix = new EmmeMatrix(reader); SaveData.SaveMatrix(zones, matrix.FloatData, destination); }), origin); } catch (IOException) { } }