liveBook · Manning

Continuous optimization

As explained in Optimization Algorithms: AI techniques for design, planning, and control problems

An optimization problem whose decision variables or feasible solutions range over continuous domains.

Continuous optimization searches over decision variables that can take real-valued choices, such as vehicle speed, acceleration, or tire pressure. It contrasts with integer, discrete, mixed-integer, and combinatorial optimization. section 2.1.1

Classify a problem by the type and number of its decision variables:

  • Use univariate optimization for one continuous variable, bivariate optimization for two, and multivariate optimization for several. section 2.1.1
  • Separate continuous problems from integer or discrete problems; combine both variable types in mixed-integer optimization. section 2.1.1
  • Recognize combinatorial optimization when solutions are sets, combinations, or permutations rather than real-valued vectors. section 2.1.1

Optimizing Himmelblau’s function

Himmelblau’s function provides a small nonconvex test problem with four identical local minima. Tabu search represents the objective and bounds, explores neighboring continuous solutions, and reports a near-zero solution after tuning iteration count, tabu tenure, neighborhood size, aspiration, and long-term memory. section 6.4

Listing 6.2 Solving Himmelblau’s function using tabu search
import numpy as np
from optalgotools.algorithms import TabuSearch                          #1
from optalgotools.problems import ProblemBase, ContinuousFunctionBase   #2
  
def Himmelblau(x,y):
       return (((x**2+y-11)**2) + (((x+y**2-7)**2)))                    #3
  
Himmelblau_bounds = np.asarray([[-6, 6], [-6, 6]])                      #4
  
Himmelblau_obj = ContinuousFunctionBase(Himmelblau, Himmelblau_bounds)  #5
  
ts = TabuSearch(max_iter=100, tabu_tenure=5, neighbor_size=50, use_aspiration=True,
 aspiration_limit=2, use_longterm=False, debug=1)                     #6
ts.run(Himmelblau_obj)                                                  #7
#1 Import the generic tabu search solver from optalgotools.
#2 Import the continuous problem base
#3 Define the objective function.
#4 Define the bounds.
#5 Create a continuous function object.
#6 Define the TS solver. Add debug = 1 to print the initial and final solution.
#7 Run the solver.

Use the Python listing to see how a continuous objective, variable bounds, and tabu-search parameters become an executable optimization problem. section 6.4

How Optimization Algorithms: AI techniques for design, planning, and control problems covers it

How deep it goes
Defines continuous variables, contrasts neighboring problem classes, and demonstrates solver setup without developing continuous-optimization theory.
Examples
Uses vehicle fuel economy, Himmelblau’s function, controller design, and other real-world continuous optimization applications.
What it assumes
Assumes basic optimization vocabulary while distinguishing variable types through concrete examples rather than advanced mathematics.
What you can do after
Apply it via a metaheuristic solver by defining a continuous objective, bounds, neighborhood, and search parameters.
How it connects
Connects continuous optimization with objective functions, nonconvex optimization, tabu search, simulated annealing, genetic algorithms, and mixed-integer optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Optimization Algorithms: AI techniques for design, planning, and control problems. The section links point to the parts of the book it draws on.