pyanno4rt.optimization.solvers._pypop7_solver

PyPop7 wrapper.

Overview

Classes

PyPop7Solver

PyPop7 wrapper class.

Classes

class pyanno4rt.optimization.solvers._pypop7_solver.PyPop7Solver(number_of_variables, number_of_constraints, problem_instance, lower_variable_bounds, upper_variable_bounds, lower_constraint_bounds, upper_constraint_bounds, algorithm, initial_fluence, max_iter, tolerance)[source]

PyPop7 wrapper class.

This class serves as a wrapper for the population-based optimization algorithms from the PyPop7 solver. It takes the problem structure, configures the selected algorithm, and defines the method to run the solver.

Parameters:
  • number_of_variables (int) – Number of decision variables.

  • number_of_constraints (int) – Number of constraints.

  • problem_instance (object of class LexicographicOptimization WeightedSumOptimization) – The object representing the optimization problem.

  • lower_variable_bounds (list) – Lower bounds on the decision variables.

  • upper_variable_bounds (list) – Upper bounds on the decision variables.

  • lower_constraint_bounds (list) – Lower bounds on the constraints.

  • upper_constraint_bounds (list) – Upper bounds on the constraints.

  • algorithm (str) – Label for the solution algorithm.

  • initial_fluence (ndarray) – Initial fluence vector.

  • max_iter (int) – Maximum number of iterations.

  • tolerance (float) – Precision goal for the objective function value.

fun

The object representing the optimization algorithm.

Type:

object

arguments

Dictionary with the function arguments.

Type:

dict

Overview

Methods

run(initial_fluence)

Run the PyPop7 solver.

Members

run(initial_fluence)[source]

Run the PyPop7 solver.

Parameters:

initial_fluence (ndarray) – Initial fluence vector.

Returns:

  • ndarray – Optimized fluence vector.

  • str – Description for the cause of termination.