model

package
v0.0.0-...-c864ae1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: BSD-2-Clause, BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LogLevel logging.Level = "Model"

Variables

View Source
var NullModel = new(nullModel)

Functions

func NewNullModel

func NewNullModel() *nullModel

Types

type ContainedModel

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

ContainedModel is a struct offering a default implementation of ContainedLogger

func (*ContainedModel) Model

func (c *ContainedModel) Model() Model

func (*ContainedModel) SetModel

func (c *ContainedModel) SetModel(model Model)

type Container

type Container interface {
	Model() Model
	SetModel(model Model)
}

ContainedLogger defines an interface embedding a Model

type DecisionVariableContainer

type DecisionVariableContainer interface {
	NameMappedVariables() *variable.DecisionVariableMap

	DecisionVariable(name string) variable.DecisionVariable
	OffersDecisionVariable(name string) bool
	DecisionVariableChange(decisionVariableName string) float64
}

type InitialisationType

type InitialisationType int
const (
	AsIs InitialisationType = iota
	Random
	Unchanged
)

type Model

type Model interface {
	name.Nameable
	name.Identifiable
	DecisionVariableContainer

	Initialise(initialisationType InitialisationType)
	Randomize()
	TearDown()

	DoRandomChange()
	UndoChange()

	TryRandomChange()
	ChangeIsValid() (bool, *errors.CompositeError)
	AcceptChange()
	RevertChange()

	IsEquivalentTo(Model) bool
	SynchroniseTo(Model)

	DeepClone() Model

	ManagementActions() []action.ManagementAction
	ActiveManagementActions() []action.ManagementAction
	SetManagementAction(index int, value bool)
	SetManagementActionUnobserved(index int, value bool)

	PlanningUnits() planningunit.Ids
}

Directories

Path Synopsis
action package contains interfaces and behaviour for general-purpose "management actions" that change a model's decision variables based on their activation status.
action package contains interfaces and behaviour for general-purpose "management actions" that change a model's decision variables based on their activation status.
models
Variable package supplies generalised model variables that allow watchers of models to make decisions on those models by reacting the changes in model decision variables.
Variable package supplies generalised model variables that allow watchers of models to make decisions on those models by reacting the changes in model decision variables.

Jump to

Keyboard shortcuts

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