Skip to content

Commit

Permalink
Merge pull request #57 from igloo-4002/fix-vaporized
Browse files Browse the repository at this point in the history
Fix data type for `SumoTripInfo.vaporized`
  • Loading branch information
megascrapper authored Oct 15, 2023
2 parents 410829c + 09f6587 commit 43403c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ data class SumoTripInfo(
@field:JacksonXmlProperty(isAttribute = true)
val speedFactor: Double,
@field:JacksonXmlProperty(isAttribute = true)
val vaporized: Boolean?
val vaporized: String?
)
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class FilesystemStorageService @Autowired constructor(properties: StoragePropert
val averageTimeLoss = tripInfo.map { it.timeLoss }.average()

// Total number of cars that reached their destination. Can work this out with vaporised variable
val totalNumberOfCarsThatCompleted = tripInfo.count() - tripInfo.count { it.vaporized == true }
val totalNumberOfCarsThatCompleted = tripInfo.count() - tripInfo.count { !it.vaporized.isNullOrEmpty() }

val simulationLength = netState.lastOrNull()?.time ?: 0.0

Expand Down

0 comments on commit 43403c3

Please sign in to comment.