Using the Multi-Objective Optimizer |
Top Previous Next |
|
FreeFlyer's multi-objective optimization capability can be used to analyze the solution space of problems related to trajectory design, contact planning, and more. Multi-objective optimization features are available in FreeFlyer's Mission tier (see the Features List for details regarding the differences between the Mission and Engineer tiers).
The basic components of a multi-objective optimization problem workflow are as follows, in order:
This page is intended as a basic guide to configuring a user-defined multi-objective optimization problem; for further details, see Multi-Objective Optimization Concepts.
Define the ProblemThe first step of any optimization process is to define the problem that must be solved. This involves configuring the state variables and objectives.
Configuring State VariablesState variables within an optimization process represent the parameters that will be varied by the MultiObjectiveOptimizer object in order to find the optimal value of the objective functions specified by the user. State variables can have continuous values or integer values between or equal to their lower and upper bounds. State variables can be added to the process via the MultiObjectiveOptimizer.AddContinuousStateVariable(), MultiObjectiveOptimizer.AddContinuousStateVariableBlock(), MultiObjectiveOptimizer.AddIntegerStateVariable(), or the MultiObjectiveOptimizer.AddIntegerStateVariableBlock() methods, which require the user to set a label to be used to identify the variable within the process.
Configuring ObjectivesObjective functions define the quantities that need to be minimized or maximized by the MultiObjectiveOptimizer, and can be any value that can be calculated in FreeFlyer script. Since multi-objective optimization problems use stochastic solution methods that do not directly handle constraints, constraints are instead handled by objectives. An objective can be used to track constraint violations by adding a minimizing objective and then incrementing the value of that objective when constraint violations are present. Objective functions can be added to the process via the MultiObjectiveOptimizer.AddMinimizingObjective() or MultiObjectiveOptimizer.AddMaximizingObjective() methods.
Load the Optimization EngineOnce the problem is defined, the optimization engine must be loaded. FreeFlyer includes built-in support for NSGA-based and SPEA-based genetic algorithms as well as a brute force method, which can be used to evaluate all possible solutions to an integer problem. For more information on each algorithm, see Multi-Objective Optimization Engines. The optimization engine is loaded by calling the LoadEngine() method on the MultiObjectiveOptimizer object. If called with no arguments, SPEA will be loaded by default.
The MultiObjectiveOptimizer object can be used to modify how the MultiObjectiveOptimizer builds each generation of candidate solutions. The percent of individual variables within solutions that will be selected for crossover or mutation when generating the next generation of solutions can be configured using the MultiObjectiveOptimizer.StateVariableCrossoverRate property or MultiObjectiveOptimizer.StateVariableMutationRate property, respectively.
The MultiObjectiveOptimizer object can be configured to use a particular population size and number of maximum generations via the MultiObjectiveOptimizer.MaximumGenerations property or MultiObjectiveOptimizer.PopulationSize property, respectively. Other exit conditions can be defined using the MultiObjectiveOptimizer.HypervolumeStallWindow property or MultiObjectiveOptimizer.MaximumConsecutiveStalledGenerations property.
See the MultiObjectiveOptimizer Properties and Methods page for additional methods that can be used to modify how the MultiObjectiveOptimizer builds each generation of candidate solutions.
Create the Evaluation LoopThe evaluation loop is where the bulk of the analysis happens for any optimization problem. After defining the problem and loading the desired optimization engine, the evaluation loop is used to run each iteration of state variable values through the user's analysis, calculate the current objective values, and allow the optimization engine to improve the Pareto front until an exit condition is reached.
Update and Retrieve State Variables At the beginning of each iteration of the evaluation loop, the state variables must be updated using the MultiObjectiveOptimizer.UpdateStateVariables() method. This method retrieves the next iteration of state variable values from the optimization process so that they can be subsequently used for evaluating the objective values. These state variable values should then be retrieved using the MultiObjectiveOptimizer.GetContinuousStateVariableValue() or MultiObjectiveOptimizer.GetIntegerStateVariableValue() method and assigned to any objects or properties being used for analysis as needed.
Perform AnalysisOnce the latest state variable values have been retrieved from the Optimizer object, any analysis that is necessary to calculate the constraints or objective function should be performed. This could include Spacecraft propagation, contact analysis, performing maneuvers, and more.
Minimize or Maximize the Objective Function The objective functions define the quantities which need to be minimized or maximized by the MultiObjectiveOptimizer object in order to produce optimal solution candidates. The objective value is passed in as an argument to the MultiObjectiveOptimizer.Minimize() or MultiObjectiveOptimizer.Maximize() method, and the MultiObjectiveOptimizer object works to vary the state variable values in order to produce a generation of optimal candidate solutions.
Generate ReportsData reports and graphical output can be generated within the evaluation loop of an optimization process as well as after exiting the loop. Views, Plots, and Reporting mechanisms all behave the same way within an optimization loop as they do in any other context; FreeFlyer's suite of Optimization Sample Mission Plans contain numerous examples of output generation within an optimization process. There are various convenient properties and methods on the MultiObjectiveOptimizer object that enable the user to easily retrieve information about the optimization process both during and after an iteration. Reports about the optimization process within an evaluation loop should always be generated after the call to MultiObjectiveOptimizer.Minimize() or MultiObjectiveOptimizer.Maximize() methods to ensure that the most up-to-date values are being reported.
The example below uses the MultiObjectiveOptimizer.OptimizationPhase property to report data only after the evaluation of the first population member, in other words, once per generation. The data being reported in this example is the generation count given by the MultiObjectiveOptimizer.GenerationCount property and an array of objective values for this solution on the Pareto front given by the MultiObjectiveOptimizer.ParetoFront.Solutions.ObjectiveValues property.
![]() Example output from a multi-objective optimization process
Retrieve the Best SolutionOnce the evaluation loop is complete, the user can retrieve the best solution from the Pareto front and use those state variable values and objective values to proceed with their analysis. To retrieve the best solution from the Pareto front, the user can configure solution filters and solution sorting criteria, then report the state variable values and objective values from the filtered solutions.
Filter and Sort SolutionsSolution filters prevent any solutions that do not meet the specified threshold from appearing in the filtered solution array. Solution filters can be added to the process via the MultiObjectiveOptimizer.ParetoFront.AddSolutionFilter() method. Solution sorting criteria arranges the elements of the solution array according to the specified criteria. Maximizing objectives are sorted greatest to least and minimizing objectives are sorted least to greatest. Sorting criteria can be added to the process via the MultiObjectiveOptimizer.ParetoFront.SetSolutionSortingCriteria() method.
Retrieve SolutionsOnce filters or sorting criteria are applied to the Pareto front, the user can report the state variable values and objective values from the filtered Pareto front. The state variable values can be retrieved via the MultiObjectiveOptimizer.ParetoFront.FilteredSolutions.GetContinuousStateVariableValue() or the MultiObjectiveOptimizer.ParetoFront.FilteredSolutions.GetIntegerStateVariableValue() methods. The objective values from the filtered Pareto front can be retrieved via the MultiObjectiveOptimizer.ParetoFront.FilteredSolutions.GetObjectiveValue() method.
See Also
|