- class iwopy.optimizers.GG(iwopy.core.Optimizer)[source]
Greedy Gradient (GG) optimizer, for local optimum search with constraints.
Follows steepest decent, reducing step size in a finite number of steps on the way. Step directions that violate constraints are projected out or reversed.
Attributes¶
- step_max: numpy.ndarray
Maximal step size for each problem variable, shape: (n_vars_float,)
- step_min: numpy.ndarray
Minimal step size for each problem variable, shape: (n_vars_float,)
- step_div_factor: float
Step size division factor until step_min is reached
- f_tol: float
The objective function tolerance
- vectorized: bool
Flag for running in vectorized mode
- n_max_steps: int
The maximal number of steps without fresh gradient
- memory_size: int
The number of memorized visited points
- memory: tuple
Memorized data: (x, obj, grad, all_valid), each a numpy.ndarray, shapes: (memory_size, n_vars), (memory_size, n_vars), (memory_size,), (memory_size,)
Public members¶
-
initialize(verbosity=
0
)[source] Initialize the object.
- print_info()[source]
Print solver info, called before solving
-
finalize(opt_results, verbosity=
1
)[source] This function may be called after finishing the optimization.
- classmethod new(optimizer_type, *args, **kwargs)[source]
Run-time optimizer factory.
- property initialized
Flag for finished initialization