Skip to content
Snippets Groups Projects
Commit a7a2b805 authored by Elbez Hammouda's avatar Elbez Hammouda
Browse files

SimLog updatefd

parent 76653689
No related branches found
No related tags found
No related merge requests found
......@@ -227,7 +227,7 @@ class NeuronsFireLog(name : String,mongoCollection: MongoCollection[Document], o
// if (((System.currentTimeMillis() - globalTimestamps)) - time >= 0.250){
time = (System.currentTimeMillis() - globalTimestamps)
documents = documents.::(Document("i" -> Document("L" -> path.actor.path.name.split(":")(0),
"N" -> BsonInt32.apply(Integer.valueOf(path.actor.path.name.split(":")(1)))),"T" -> BsonDouble.apply(BigDecimal(time/1000.0).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble),"Input" -> Integer.valueOf(GlobalLogVars.ActualInput)))
"N" -> BsonInt32.apply(Integer.valueOf(path.actor.path.name.split(":")(1)))),"T" -> BsonDouble.apply(BigDecimal(time/1000.0).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble), if(GlobalLogVars.ActualInput == "") "Input" -> "" else "Input" -> BsonInt32.apply(Integer.valueOf(GlobalLogVars.ActualInput))))
id = id + 1
i = i + 1
......@@ -408,7 +408,7 @@ class SynapticWeight(list : Seq[Seq[Seq[ConnectionPath]]], refreshRate : Int = 1
y = cnx._2
}
})
documents = documents.::(Document("T" -> BsonDouble.apply(BigDecimal((System.currentTimeMillis() - globalTimestamps)/1000.0).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble), "C" -> v._1, "To" -> Integer.valueOf(v._2.split(":")(1)), "V" ->
documents = documents.::(Document("T" -> BsonDouble.apply(BigDecimal((System.currentTimeMillis() - globalTimestamps)/1000.0).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble), "C" -> v._1, "To" -> BsonInt32.apply(Integer.valueOf(v._2.split(":")(1))), "V" ->
BsonDouble.apply(BigDecimal(v._3).setScale(6, BigDecimal.RoundingMode.HALF_UP).toDouble),"index" -> Document("x" -> y, "y" -> x), "L" -> v._2.split(":")(0)))
})
valuesTmp = values
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment