Probably need to return Late costs if conditions are met here:
|
func (p productionFunction) GetExposedValue(e hazards.ArrivalandDurationEvent) float64 { |
|
hazardMonth := e.ArrivalTime.Month() //iota "enum" |
|
hazardMonthIndex := int(hazardMonth) - 1 |
|
// We need to prorate monthly costs later |
|
// This assumes planting on time. Cannot deal with case where you are delayed THEN impacted. |
|
return p.cumulativeMonthlyProductionCostsEarly[hazardMonthIndex] |
|
} |
Probably need to return Late costs if conditions are met here:
go-consequences/crops/productionfunctions.go
Lines 22 to 28 in 0156c78