From 148382f70afde7210ce27a891164209fe74393a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Schr=C3=B6pfer?= Date: Wed, 23 Dec 2020 08:16:08 +0100 Subject: [PATCH] basic structs for the calculation --- go.mod | 3 +++ goodcalc.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 go.mod create mode 100644 goodcalc.go diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8ed01f1 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.ecogood.org/andras.schroepfer/goodcalc + +go 1.15 diff --git a/goodcalc.go b/goodcalc.go new file mode 100644 index 0000000..1fff7d2 --- /dev/null +++ b/goodcalc.go @@ -0,0 +1,42 @@ +// Package goodcalc is a good balance calculator +package goodcalc + +type Matrix struct { + MaxPoints int + Stakeholders []Stakeholder +} + +type Stakeholder struct { + No string + Weight float32 +} + +type Theme struct { + No string + Weight float32 + Aspects []Aspect + NegativeAspects []NegativeAspect + ThemeCalc // calculatet values +} + +type Aspect struct { + No string + Weight float32 + Points int +} + +type NegativeAspect struct { + Aspect +} + +type ThemeCalc struct { + CalcWeight float32 + WeightFactor float32 + MaxPoints float32 + NrPositiveAspects int + ValuationPoints int + EstPercentage float32 + blancePoints int + NegativeValuationPoints int + NegativeBlancePoints int +}