Skip to content

Commit

Permalink
fix for incorrect hotelling APU and shorepower emissions when running…
Browse files Browse the repository at this point in the history
… on Linux (#81)

The Go BaseRateCalculator reads input from flat files in the bundle. These flat files are always created with lowercase names. However, the go code was incorrectly trying to read the shorepoweremissionratefraction flat file using title case. This works on Windows, because file names are case insensitive on that platform. However, this fails on platforms where file names are case sensitive.
  • Loading branch information
danielbizercox committed Jan 13, 2025
1 parent d2174dc commit 5241770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calc/baseratecalculator/baseratecalculator.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ func StartSetup() {
apuEmissionRateFraction[k] = hourFractionAdjust
})
}
if _, err := os.Stat("ShorepowerEmissionRateFraction"); err == nil {
parse.ReadAndParseFile("ShorepowerEmissionRateFraction", func(parts []string) {
if _, err := os.Stat("shorepoweremissionratefraction"); err == nil {
parse.ReadAndParseFile("shorepoweremissionratefraction", func(parts []string) {
// modelYearID fuelTypeID hourFractionAdjust
if len(parts) < 3 {
return
Expand Down

0 comments on commit 5241770

Please sign in to comment.