chm

package
v0.0.0-...-e1d4e1a Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Epsilon

type Epsilon struct {
	Cp float64
	Tc int
	// contains filtered or unexported fields
}

Epsilon is used for Epsilon constraint handling

func NewE

func NewE(cp float64, tc, maxGenerations int) *Epsilon

func (Epsilon) Initialise

func (e Epsilon) Initialise(gen int, maxViolation float64)

func (Epsilon) Name

func (e Epsilon) Name() string

func (Epsilon) Threshold

func (e Epsilon) Threshold(gen int) float64

func (*Epsilon) Update

func (e *Epsilon) Update(t int, temp float64)

Update updates the epsilon value used for the generation (k)

func (Epsilon) Violation

func (e Epsilon) Violation(t int, f types.Fitness) float64

Violation calculates the constraint violation in regards to the threshold set by the CHM. If the violation is below the threshold, 0 is returned.

type ImprovedEpsilon

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

ImprovedEpsilon is used for Improved Epsilon Constraint Handling

func NewIE

func NewIE(tau, alpha, cp float64, tc, maxGenerations int) *ImprovedEpsilon

func (*ImprovedEpsilon) Initialise

func (ie *ImprovedEpsilon) Initialise(generation int, maxViolation float64)

func (*ImprovedEpsilon) Name

func (ie *ImprovedEpsilon) Name() string

func (*ImprovedEpsilon) Threshold

func (ie *ImprovedEpsilon) Threshold(gen int) float64

func (*ImprovedEpsilon) Update

func (ie *ImprovedEpsilon) Update(t int, rfk float64)

Update updates the epsilon value used for the generation (t) based on the feasibility ratio (rfk) of the current generation

func (ImprovedEpsilon) Violation

func (ie ImprovedEpsilon) Violation(t int, f types.Fitness) float64

Violation calculates the constraint violation in regards to the threshold set by the CHM If the violation is below the threshold, 0 is returned

type R2S

type R2S struct {
	Z float64
	//InitialDeltaIn, InitialDeltaOut float64
	DeltaIn, DeltaOut           []float64
	HasCheckedActiveConstraints bool
	ActiveConstraints           []bool
	Val                         float64
	NUMacd, FESc, FESmax        int
}

R2S struct defines the parameters needed by r2s and the methods available

func NewR2S

func NewR2S(FESc, NUMacd int, val, z float64, constraintsCount, generations int) *R2S

func (*R2S) ACD

func (r2s *R2S) ACD(iter, cfe int, fitness []types.Fitness)

ACD check for active constraints near an assumed optimal individual

func (R2S) HasActiveConstraints

func (r2s R2S) HasActiveConstraints() bool

HasActiveConstraints check if any of the constraints of the problem are seen as active

func (*R2S) Initialise

func (r2s *R2S) Initialise(t int, maxviolation float64)

func (*R2S) Name

func (r2s *R2S) Name() string

func (*R2S) Threshold

func (r2s *R2S) Threshold(gen int) float64

func (*R2S) Update

func (r2s *R2S) Update(t int, cfe float64)

Update updates the deltaIn and deltaOut of r2s. Require that cfe is a float to allow the use of interface for constraint handling.

func (R2S) Violation

func (r2s R2S) Violation(t int, fitness types.Fitness) float64

Violation returns the constraint violation of an individual

Jump to

Keyboard shortcuts

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