rugby_simulation

package
v0.0.0-...-bf55477 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PitchLat = 70.0
View Source
const PitchLon = 100.0

Variables

View Source
var MatchStateMap = map[int]string{
	0:  "Penalty",
	1:  "Free Kick",
	2:  "Goal",
	3:  "Drop Goal",
	4:  "Try",
	5:  "Kick Phase",
	6:  "Run Phase",
	7:  "Knock-on",
	8:  "Scrum",
	9:  "Lineout",
	10: "Ruck",
	11: "Maul",
	12: "Kickoff",
}
View Source
var MatchStateValueIndices = map[string]int{
	"Match State":              0,
	"Possession State":         1,
	"Longitudinal Pitch State": 2,
	"Lateral Pitch State":      3,
	"Home Team Score":          4,
	"Away Team Score":          5,
	"Last Match State":         6,
	"Next Match State":         7,
	"Current Attacker":         8,
	"Current Defender":         9,
	"Play Direction":           10,
}
View Source
var PossessionMap = map[int]string{0: "Home Team", 1: "Away Team"}

Functions

This section is empty.

Types

type RugbyMatchIteration

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

RugbyMatchIteration defines an iteration for a model of a rugby match defined in this article: https://umbralcalc.github.io/posts/trywizard.html

func (*RugbyMatchIteration) Configure

func (r *RugbyMatchIteration) Configure(
	partitionIndex int,
	settings *simulator.Settings,
)

func (*RugbyMatchIteration) Iterate

func (r *RugbyMatchIteration) Iterate(
	params *simulator.OtherParams,
	partitionIndex int,
	stateHistories []*simulator.StateHistory,
	timestepsHistory *simulator.CumulativeTimestepsHistory,
) []float64

Jump to

Keyboard shortcuts

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