LinearCoolingSchedule

class LinearCoolingSchedule(initialTemperature: Double = defaultInitialTemperature, val stoppingTemperature: Double = defaultStoppingTemperature, val maxIterations: Int = defaultMaxNumberIterations) : CoolingSchedule

Represents a linear cooling schedule used in optimization algorithms like simulated annealing. The temperature decreases linearly with each iteration based on the specified parameters.

Parameters

initialTemperature

The starting temperature for the cooling schedule. Must be positive and greater than the final temperature.

stoppingTemperature

The minimum temperature to which the schedule decreases. Must be positive and less than the initial temperature.

maxIterations

The total number of iterations over which the temperature decreases. Must be positive.

Throws

if maxIterations is not positive, if finalTemperature is not positive, or if finalTemperature is not less than initialTemperature.

Constructors

Link copied to clipboard
constructor(initialTemperature: Double = defaultInitialTemperature, stoppingTemperature: Double = defaultStoppingTemperature, maxIterations: Int = defaultMaxNumberIterations)

Initializes a LinearCoolingSchedule instance with the given parameters.

Properties

Link copied to clipboard
open override var initialTemperature: Double
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun nextTemperature(iteration: Int): Double

Computes the next temperature value based on the given iteration. This method is typically used in optimization algorithms to manage the cooling schedule of a process.