iOpt.method Package
listener
method
optim_task
- class iOpt.method.optim_task.TypeOfCalculation(value)[исходный код]
Базовые классы:
enum.EnumAn enumeration.
- FUNCTION = 1
- CONVOLUTION = 2
- class iOpt.method.optim_task.OptimizationTask(problem: Problem, perm: np.ndarray(shape=1, dtype=int) = None)[исходный код]
Базовые классы:
object- calculate(data_item: iOpt.method.search_data.SearchDataItem, function_index: int, calculation_type: iOpt.method.optim_task.TypeOfCalculation = TypeOfCalculation.FUNCTION) iOpt.method.search_data.SearchDataItem[исходный код]
Compute selected function by number
process
search_data
- class iOpt.method.search_data.SearchDataItem(y: Point, x: np.double, function_values: np.ndarray(shape=1, dtype=FunctionValue) = [<iOpt.trial.FunctionValue object>], discrete_value_index: int = 0)[исходный код]
Базовые классы:
iOpt.trial.TrialThe SearchDataItem class is intended for storing search information, which is an interval with a right point included, as well as links to neighbouring intervals. SearchDataItem is an inheritor of the Trial class
- __init__(y: Point, x: np.double, function_values: np.ndarray(shape=1, dtype=FunctionValue) = [<iOpt.trial.FunctionValue object>], discrete_value_index: int = 0)[исходный код]
Constructor of SearchDataItem class
- Параметры
y – trial point in the original N-dimensional search area.
x – Mapping the trial point y to the segment [0, 1].
function_values – Vector of function values (objective and constraint functions).
discrete_value_index – Discrete parameter.
- get_x() numpy.float64[исходный код]
Obtain the right point of the search interval where \(x\in[0, 1]\)
- Результат
Value of the right point of the interval.
- get_y() iOpt.trial.Point[исходный код]
Provide an N-dimensional trial point of the original search area
- Результат
N-dimensional trial point value.
- get_discrete_value_index() int[исходный код]
Obtain a discrete parameter
- Результат
Discrete parameter value.
- set_index(index: int)[исходный код]
Specify the index value of the last executed constraint for the index scheme
- Параметры
index – Restriction index.
- get_index() int[исходный код]
Get the index value of the last executed constraint for the index scheme
- Результат
Index value.
- set_z(z: numpy.float64)[исходный код]
Allow you to specify a function value for a given index.
- Параметры
z – Function value.
- get_z() numpy.float64[исходный код]
Get the value of the function for a given index
- Результат
Function value for index.
- set_left(point: iOpt.method.search_data.SearchDataItem)[исходный код]
Set the left interval for the source interval
- Параметры
point – Left interval.
- get_left() iOpt.method.search_data.SearchDataItem[исходный код]
Get the left interval for the original interval
- Результат
Left interval value.
- set_right(point: iOpt.method.search_data.SearchDataItem)[исходный код]
Set the right interval for the original interval
- Параметры
point – Right interval.
- get_right() iOpt.method.search_data.SearchDataItem[исходный код]
Get the right interval for the original interval
- Результат
Right interval value.
- __lt__(other) bool[исходный код]
The method overrides the < comparison operator for two intervals
- Параметры
other – Second interval.
- Результат
The value is true - if the right point of the initial interval is less than the
the right point of the second interval, otherwise - false.
- class iOpt.method.search_data.CharacteristicsQueue(maxlen: int)[исходный код]
Базовые классы:
objectThe CharacteristicsQueue class is designed to store a prioritised queue of characteristics with preempting
- __init__(maxlen: int)[исходный код]
Constructor of the CharacteristicsQueue class
- Параметры
maxlen – Maximum queue size.
- Clear()[исходный код]
Clear the queue
- insert(key: numpy.float64, data_item: iOpt.method.search_data.SearchDataItem)[исходный код]
Add search interval with specified priority. The priority is the value of the characteristic on this interval
- Параметры
key – Priority of the search interval.
data_item – Insertion interval.
- get_best_item()[исходный код]
Get the interval with the best characteristic
- Результат
Tuple: interval with the best characteristic, priority of the interval in the queue.
- is_empty()[исходный код]
Check for queue emptiness.
- Результат
True if the queue is empty, otherwise false.
- get_max_len() int[исходный код]
Get the maximum queue size.
- Результат
Value of maximum queue size.
- get_len() int[исходный код]
Get the current queue size
- Результат
Value of the current queue size.
- class iOpt.method.search_data.SearchData(problem: iOpt.problem.Problem, maxlen: Optional[int] = None)[исходный код]
Базовые классы:
objectThe SearchData class is used to store the set of all intervals, the original task and the priority queue of global characteristics
- __init__(problem: iOpt.problem.Problem, maxlen: Optional[int] = None)[исходный код]
Constructor of SearchData class
- Параметры
problem – Information about the original task.
maxlen – Maximum queue size.
- clear_queue()[исходный код]
Clear the characteristic queue
- insert_data_item(new_data_item: iOpt.method.search_data.SearchDataItem, right_data_item: Optional[iOpt.method.search_data.SearchDataItem] = None)[исходный код]
Add a new trial interval to the list of all trials performed and prioritised characteristic queue
- Параметры
new_data_item – New trial interval.
right_data_item – The covering interval, is the right interval for the newDataItem.
- insert_first_data_item(left_data_item: iOpt.method.search_data.SearchDataItem, right_data_item: iOpt.method.search_data.SearchDataItem)[исходный код]
Allow a pair of trial intervals to be added to the first iteration of the GSA.
- Параметры
left_data_item – Left interval for right_data_item.
right_data_item – Right interval for left_data_item.
- find_data_item_by_one_dimensional_point(x: numpy.float64) iOpt.method.search_data.SearchDataItem[исходный код]
Find the covering interval for the obtained point x
- Параметры
x – Right point of the interval.
- Результат
Right point of the covering interval.
- get_data_item_with_max_global_r() iOpt.method.search_data.SearchDataItem[исходный код]
Obtain the interval with the best value of the global characteristic
- Результат
Value of the interval with the best global characteristic.
- refill_queue()[исходный код]
Refill the queue of global characteristics, for example, when it is empty or when the Lipschitz constant estimation is changed
- get_count() int[исходный код]
Get the current number of intervals in the list
- Результат
Value of the number of intervals in the list.
- get_last_item() iOpt.method.search_data.SearchDataItem[исходный код]
Get the last added interval to the list
- Результат
Value of the last added interval.
- get_last_items(N: int = 1) list[SearchDataItem][исходный код]
Get the last added intervals to the list.
- Результат
Values of the last series of added intervals.
- searchdata_to_json(mode='full') json[исходный код]
Save the optimization process to a file
- Параметры
mode – „full“ - save all optimization information
file_name – file name.
- json_to_searchdata(data, mode='full')[исходный код]
Load the optimization process from a file
- Параметры
file_name – file name.
- class iOpt.method.search_data.SearchDataDualQueue(problem: iOpt.problem.Problem, maxlen: Optional[int] = None)[исходный код]
Базовые классы:
iOpt.method.search_data.SearchData- The SearchDataDualQueue class is incherited of the SearchData class. It is intended
for storing a set of all intervals, the initial task and two priority queues for global and local characteristics
- __init__(problem: iOpt.problem.Problem, maxlen: Optional[int] = None)[исходный код]
Constructor of SearchDataDualQueue class
- Параметры
problem – Information on the initial task.
maxlen – Maximum queue size.
- clear_queue()[исходный код]
Clear the characteristic queues
- insert_data_item(new_data_item: iOpt.method.search_data.SearchDataItem, right_data_item: Optional[iOpt.method.search_data.SearchDataItem] = None)[исходный код]
- Add a new trial interval to the list of all trials performed
and priority queues of global and local characteristics
- Параметры
new_data_item – New trial interval.
right_data_item – The covering interval, is the right interval for the new_data_item.
- get_data_item_with_max_global_r() iOpt.method.search_data.SearchDataItem[исходный код]
Obtain the interval with the best value of the global characteristic
- Результат
Value of the interval with the best global characteristic.
- get_data_item_with_max_local_r() iOpt.method.search_data.SearchDataItem[исходный код]
Obtain the interval with the best value of the local characteristic
- Результат
Value of the interval with the best local characteristic.
- refill_queue()[исходный код]
- Refill the queues of global and local characteristics, e.g.,
when they are emptied or when the Lipschitz constant estimation is changed
sol_value
- class iOpt.method.sol_value.SolutionValue(calculations_number: int = - 1, holder_constants_estimations: numpy.float64 = - 1.0)[исходный код]
Базовые классы:
iOpt.trial.FunctionValue