Skip to content

Commit

Permalink
Merge pull request #261 from RSGInc/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bstabler committed Dec 8, 2019
2 parents 7229c20 + 3dcf286 commit bde90c5
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions DaySim.Framework/Roster/VisumSkimReader.cs
Expand Up @@ -72,8 +72,8 @@ internal class VisumSkimReader : ISkimFileReader {
int[] zonenumscol; int[] zonenumscol;


if (idv == "$BI") { //Matrix type - BI if (idv == "$BI") { //Matrix type - BI
zonenums = new int[rows * 2]; zonenums = new int[rows];
for (int z = 0; z < rows * 2; z++) { for (int z = 0; z < rows; z++) {
zonenums[z] = b.ReadInt32(); zonenums[z] = b.ReadInt32();
} }
} else { // Matrix type not BI.. } else { // Matrix type not BI..
Expand Down Expand Up @@ -110,7 +110,7 @@ internal class VisumSkimReader : ISkimFileReader {
d = b.ReadByte(); d = b.ReadByte();


if (d == '\x01') { if (d == '\x01') {
//Console.WriteLine("This is a zero matrix!"); Console.WriteLine("All values are zero (null matrix)");
} else if (d == '\x00') { } else if (d == '\x00') {
double diagsum = b.ReadDouble(); double diagsum = b.ReadDouble();
Console.WriteLine("Diagonal sum: " + diagsum.ToString()); Console.WriteLine("Diagonal sum: " + diagsum.ToString());
Expand Down Expand Up @@ -166,36 +166,11 @@ internal class VisumSkimReader : ISkimFileReader {
double rowSum = b.ReadDouble(); double rowSum = b.ReadDouble();
double columnSum = b.ReadDouble(); double columnSum = b.ReadDouble();
} }
} else {
Console.WriteLine("No matrix data read!");
} }
} }





/*
for (var origin = 0; origin < count; origin++)
{
for (var destination = 0; destination < count; destination++)
{
if (position >= length)
{
goto end;
}
var value = reader.ReadUInt16();
// binary matrices are already mapped to consecutive zone indices, matching the zone index file
matrix[origin][destination] = value;
position += sizeof(ushort);
}
}
}
end:*/

SkimMatrix skimMatrix = new SkimMatrix(matrix); SkimMatrix skimMatrix = new SkimMatrix(matrix);


return skimMatrix; return skimMatrix;
Expand Down

0 comments on commit bde90c5

Please sign in to comment.