calculator

package
v0.0.0-...-66d665b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

func NewCalculator

func NewCalculator(logger *slog.Logger) *Calculator

func (*Calculator) CalculateMonthly

func (c *Calculator) CalculateMonthly(usage nem12.UsageData, plan *cdsenergy.EnergyPlanDetail) (Cost, error)

type Cost

type Cost struct {
	// This will always be populated and will be an average monthly cost given all the usage data available
	AverageMonthly float64
	// Breaks down the cost into an average per month. Indexed with January being 0. How much of
	// this is populated depends on the usage data provided. If there is at least a year of usage,
	// all indices will have a value.
	AveragePerMonth []float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL