Documentation ¶
Index ¶
- Constants
- Variables
- func FileExists(filePath string) (bool, error)
- func GenerateDataLoop(params *Params, configClimat *ClimatConfig, configConsum *ConsumConfig, ...)
- func GetExecutionDir() string
- func GetMeterGenDir() string
- func IndexOf(arr []string, test string) int
- func InterfaceSliceToFloat64(slice []interface{}) ([]float64, interface{})
- func InterfaceSliceToString(slice []interface{}) []string
- func JsonToStrMap(jsonObject []byte) (map[string]string, error)
- func JsonToStrSlice(jsonObject []byte) ([]string, error)
- func Main(args []string)
- func PrintProgress(phase string, progress uint64, max uint64)
- type City
- type ClimatConfig
- type Coefs
- type ConsumConfValue
- type ConsumConfig
- type MeteoRecord
- type Meter
- type Params
Constants ¶
View Source
const ( TYPE_ELE = "elec" TYPE_GAS = "gas" TYPE_MIX = "mix" )
View Source
const SIZE_POP_RATIO = 121.519 // average france density, used as constant ratio to reduce size of smallest cities
Variables ¶
View Source
var REGEXP_FOLDER = regexp.MustCompile(".*/")
Functions ¶
func FileExists ¶
func GenerateDataLoop ¶
func GenerateDataLoop(params *Params, configClimat *ClimatConfig, configConsum *ConsumConfig, metersTab []Meter, configMeteo []MeteoRecord)
func GetExecutionDir ¶
func GetExecutionDir() string
func GetMeterGenDir ¶
func GetMeterGenDir() string
func InterfaceSliceToFloat64 ¶
func InterfaceSliceToFloat64(slice []interface{}) ([]float64, interface{})
func InterfaceSliceToString ¶
func InterfaceSliceToString(slice []interface{}) []string
func JsonToStrSlice ¶
func PrintProgress ¶
Types ¶
type ClimatConfig ¶
type ClimatConfig struct {
// contains filtered or unexported fields
}
func GetClimatConfig ¶
func GetClimatConfig(climatFilePath string) ClimatConfig
func (*ClimatConfig) GetCoefsFor ¶
func (this *ClimatConfig) GetCoefsFor(country, region, season string) Coefs
type ConsumConfValue ¶
type ConsumConfig ¶
type ConsumConfig struct { // {"elec":{"s20":{"coldS":{"wDay":{"Night":{"avg":2996,"stddev":30},...},...},...},...} Elec map[string]map[string]map[string]map[string]ConsumConfValue `json:"elec"` Gas map[string]map[string]map[string]map[string]ConsumConfValue `json:"gas"` }
func GetConsumConfig ¶
func GetConsumConfig(climatFilePath string) ConsumConfig
type MeteoRecord ¶
type MeteoRecord struct { //id string Lat float64 `json:"lat"` Lng float64 `json:"lng"` Min []float64 `json:"min"` Max []float64 `json:"max"` Heat []float64 `json:"heat"` Cool []float64 `json:"cool"` }
func GetMeteoConfig ¶
func GetMeteoConfig(meteoFileName string) []MeteoRecord
Click to show internal directories.
Click to hide internal directories.