moptipy package¶
moptipy is the Metaheuristic Optimization in Python Package.
This is the basic package of our moptipy project. It provides several sub-packages:
moptipy.algorithms
hosts implementations of several metaheuristic optimization algorithmsmoptipy.api
defines the API for implementing optimization algorithms and -problemsmoptipy.evaluation
offers evaluation utilities for the results of experimentsmoptipy.mo
provides utilities for multi-objective optimizationmoptipy.operators
implements search operators for various search spacesmoptipy.spaces
includes several pre-defined search spacesmoptipy.tests
provides several unit tests for moptipy componentsmoptipy.utils
has utility classes for, e.g., logging and naming
Subpackages¶
- moptipy.algorithms package
- Subpackages
- moptipy.algorithms.mo package
- moptipy.algorithms.modules package
- moptipy.algorithms.so package
- Subpackages
- Submodules
- moptipy.algorithms.so.ea module
- moptipy.algorithms.so.fitness module
- moptipy.algorithms.so.general_ea module
- moptipy.algorithms.so.general_ma module
- moptipy.algorithms.so.greedy_2plus1_ea_mod module
- moptipy.algorithms.so.hill_climber module
- moptipy.algorithms.so.hill_climber_with_restarts module
- moptipy.algorithms.so.ma module
- moptipy.algorithms.so.marls module
- moptipy.algorithms.so.ppa module
- moptipy.algorithms.so.record module
- moptipy.algorithms.so.rls module
- moptipy.algorithms.so.simulated_annealing module
- Submodules
- moptipy.algorithms.luby_restarts module
- moptipy.algorithms.random_sampling module
- moptipy.algorithms.random_walk module
- moptipy.algorithms.restarts module
- moptipy.algorithms.single_random_sample module
- Subpackages
- moptipy.api package
- Submodules
- moptipy.api.algorithm module
- moptipy.api.component module
- moptipy.api.encoding module
- moptipy.api.execution module
Execution
Execution.execute()
Execution.set_algorithm()
Execution.set_encoding()
Execution.set_goal_f()
Execution.set_log_all_fes()
Execution.set_log_file()
Execution.set_log_improvements()
Execution.set_max_fes()
Execution.set_max_time_millis()
Execution.set_objective()
Execution.set_rand_seed()
Execution.set_search_space()
Execution.set_solution_space()
- moptipy.api.experiment module
- moptipy.api.logging module
ERROR_SECTION_PREFIX
FILE_SUFFIX
KEY_ALGORITHM
KEY_ARCHIVE_F
KEY_ARCHIVE_MAX_SIZE
KEY_ARCHIVE_PRUNE_LIMIT
KEY_ARCHIVE_SIZE
KEY_BEST_F
KEY_BEST_FS
KEY_CLASS
KEY_COMMAND_LINE
KEY_CPU_AFFINITY
KEY_EXCEPTION_STACK_TRACE
KEY_EXCEPTION_TYPE
KEY_EXCEPTION_VALUE
KEY_F_LOWER_BOUND
KEY_F_UPPER_BOUND
KEY_GOAL_F
KEY_HW_BYTE_ORDER
KEY_HW_CPU_MHZ
KEY_HW_CPU_NAME
KEY_HW_MACHINE
KEY_HW_MEM_SIZE
KEY_HW_N_LOGICAL_CPUS
KEY_HW_N_PHYSICAL_CPUS
KEY_INNER_CLASS
KEY_INSTANCE
KEY_LAST_IMPROVEMENT_FE
KEY_LAST_IMPROVEMENT_TIME_MILLIS
KEY_MAX_FES
KEY_MAX_TIME_MILLIS
KEY_NAME
KEY_NODE_IP
KEY_NODE_NAME
KEY_OS_NAME
KEY_OS_RELEASE
KEY_OS_VERSION
KEY_PROCESS_ID
KEY_PYTHON_IMPLEMENTATION
KEY_PYTHON_VERSION
KEY_RAND_BIT_GENERATOR_TYPE
KEY_RAND_GENERATOR_TYPE
KEY_RAND_SEED
KEY_SESSION_START
KEY_SPACE_NUM_VARS
KEY_TOTAL_FES
KEY_TOTAL_TIME_MILLIS
KEY_WORKING_DIRECTORY
PREFIX_SECTION_ARCHIVE
PROGRESS_CURRENT_F
PROGRESS_FES
PROGRESS_TIME_MILLIS
SCOPE_ALGORITHM
SCOPE_ENCODING
SCOPE_HARDWARE
SCOPE_OBJECTIVE_FUNCTION
SCOPE_OP0
SCOPE_OP1
SCOPE_OP2
SCOPE_OS
SCOPE_PROCESS
SCOPE_PRUNER
SCOPE_PYTHON
SCOPE_SEARCH_SPACE
SCOPE_SESSION
SCOPE_SOLUTION_SPACE
SCOPE_VERSIONS
SECTION_ARCHIVE_QUALITY
SECTION_ERROR_BEST_F
SECTION_ERROR_INVALID_X
SECTION_ERROR_INVALID_Y
SECTION_ERROR_IN_CONTEXT
SECTION_ERROR_IN_LOG
SECTION_ERROR_IN_RUN
SECTION_ERROR_TIMING
SECTION_FINAL_STATE
SECTION_PROGRESS
SECTION_RESULT_X
SECTION_RESULT_Y
SECTION_SETUP
SECTION_SYS_INFO
SUFFIX_SECTION_ARCHIVE_X
SUFFIX_SECTION_ARCHIVE_Y
- moptipy.api.mo_algorithm module
- moptipy.api.mo_archive module
- moptipy.api.mo_execution module
- moptipy.api.mo_problem module
- moptipy.api.mo_process module
- moptipy.api.mo_utils module
- moptipy.api.objective module
- moptipy.api.operators module
- moptipy.api.process module
Process
Process.add_log_section()
Process.evaluate()
Process.get_best_f()
Process.get_consumed_fes()
Process.get_consumed_time_millis()
Process.get_copy_of_best_x()
Process.get_copy_of_best_y()
Process.get_last_improvement_fe()
Process.get_last_improvement_time_millis()
Process.get_log_basename()
Process.get_max_fes()
Process.get_max_time_millis()
Process.get_random()
Process.has_best()
Process.has_log()
Process.initialize()
Process.register()
Process.should_terminate()
Process.terminate()
check_goal_f()
check_max_fes()
check_max_time_millis()
- moptipy.api.space module
- moptipy.api.subprocesses module
- moptipy.evaluation package
- Submodules
- moptipy.evaluation.axis_ranger module
- moptipy.evaluation.base module
DESC_ALGORITHM
DESC_ENCODING
DESC_INSTANCE
DESC_OBJECTIVE_FUNCTION
EvaluationDataElement
F_NAME_NORMALIZED
F_NAME_RAW
F_NAME_SCALED
KEY_ENCODING
KEY_N
KEY_OBJECTIVE_FUNCTION
MultiRun2DData
MultiRunData
PerRunData
TIME_UNIT_FES
TIME_UNIT_MILLIS
check_f_name()
check_time_unit()
get_algorithm()
get_instance()
motipy_footer_bottom_comments()
sort_key()
- moptipy.evaluation.ecdf module
- moptipy.evaluation.end_results module
CsvReader
CsvWriter
DESC_BEST_F
DESC_GOAL_F
DESC_LAST_IMPROVEMENT_FE
DESC_LAST_IMPROVEMENT_TIME_MILLIS
DESC_MAX_FES
DESC_MAX_TIME_MILLIS
DESC_RAND_SEED
DESC_TOTAL_FES
DESC_TOTAL_TIME_MILLIS
EndResult
EndResult.best_f
EndResult.get_best_f()
EndResult.get_fes_per_time_milli()
EndResult.get_goal_f()
EndResult.get_last_improvement_fe()
EndResult.get_last_improvement_time_millis()
EndResult.get_max_fes()
EndResult.get_max_time_millis()
EndResult.get_normalized_best_f()
EndResult.get_scaled_best_f()
EndResult.get_total_fes()
EndResult.get_total_time_millis()
EndResult.goal_f
EndResult.last_improvement_fe
EndResult.last_improvement_time_millis
EndResult.max_fes
EndResult.max_time_millis
EndResult.success()
EndResult.total_fes
EndResult.total_time_millis
from_csv()
from_logs()
getter()
to_csv()
- moptipy.evaluation.end_statistics module
CsvReader
CsvWriter
EndStatistics
EndStatistics.best_f
EndStatistics.best_f_scaled
EndStatistics.ert_fes
EndStatistics.ert_time_millis
EndStatistics.get_best_f()
EndStatistics.get_best_f_scaled()
EndStatistics.get_ert_fes()
EndStatistics.get_ert_time_millis()
EndStatistics.get_goal_f()
EndStatistics.get_last_improvement_fe()
EndStatistics.get_last_improvement_time_millis()
EndStatistics.get_max_fes()
EndStatistics.get_max_time_millis()
EndStatistics.get_n()
EndStatistics.get_n_success()
EndStatistics.get_success_fes()
EndStatistics.get_success_time_millis()
EndStatistics.get_total_fes()
EndStatistics.get_total_time_millis()
EndStatistics.goal_f
EndStatistics.last_improvement_fe
EndStatistics.last_improvement_time_millis
EndStatistics.max_fes
EndStatistics.max_time_millis
EndStatistics.n_success
EndStatistics.success_fes
EndStatistics.success_time_millis
EndStatistics.total_fes
EndStatistics.total_time_millis
KEY_BEST_F_SCALED
KEY_ERT_FES
KEY_ERT_TIME_MILLIS
KEY_N_SUCCESS
KEY_SUCCESS_FES
KEY_SUCCESS_TIME_MILLIS
aggregate_over_parameter()
create()
from_csv()
from_end_results()
getter()
to_csv()
- moptipy.evaluation.ert module
- moptipy.evaluation.ertecdf module
- moptipy.evaluation.frequency module
- moptipy.evaluation.ioh_analyzer module
- moptipy.evaluation.log_parser module
ExperimentParser
LogParser
SetupAndStateParser
SetupAndStateParser.best_f
SetupAndStateParser.encoding
SetupAndStateParser.end_file()
SetupAndStateParser.goal_f
SetupAndStateParser.last_improvement_fe
SetupAndStateParser.last_improvement_time_millis
SetupAndStateParser.lines()
SetupAndStateParser.max_fes
SetupAndStateParser.max_time_millis
SetupAndStateParser.needs_more_lines()
SetupAndStateParser.objective
SetupAndStateParser.process()
SetupAndStateParser.setup_section()
SetupAndStateParser.start_file()
SetupAndStateParser.start_section()
SetupAndStateParser.state_section()
SetupAndStateParser.total_fes
SetupAndStateParser.total_time_millis
- moptipy.evaluation.plot_ecdf module
- moptipy.evaluation.plot_end_results module
- moptipy.evaluation.plot_end_statistics_over_parameter module
- moptipy.evaluation.plot_ert module
- moptipy.evaluation.plot_progress module
- moptipy.evaluation.progress module
- moptipy.evaluation.selector module
- moptipy.evaluation.stat_run module
- moptipy.evaluation.styler module
- moptipy.evaluation.tabulate_end_results module
- moptipy.evaluation.tabulate_end_stats module
- moptipy.evaluation.tabulate_result_tests module
- moptipy.examples package
- Subpackages
- moptipy.examples.bitstrings package
default_instances()
- Submodules
- moptipy.examples.bitstrings.binint module
- moptipy.examples.bitstrings.bitstring_problem module
- moptipy.examples.bitstrings.ising1d module
- moptipy.examples.bitstrings.ising2d module
- moptipy.examples.bitstrings.jump module
- moptipy.examples.bitstrings.labs module
- moptipy.examples.bitstrings.leadingones module
- moptipy.examples.bitstrings.linearharmonic module
- moptipy.examples.bitstrings.nqueens module
- moptipy.examples.bitstrings.onemax module
- moptipy.examples.bitstrings.plateau module
- moptipy.examples.bitstrings.trap module
- moptipy.examples.bitstrings.twomax module
- moptipy.examples.bitstrings.w_model module
- moptipy.examples.bitstrings.zeromax module
- moptipy.examples.jssp package
- Submodules
- moptipy.examples.jssp.demo_examples module
- moptipy.examples.jssp.evaluation module
- moptipy.examples.jssp.experiment module
- moptipy.examples.jssp.gantt module
- moptipy.examples.jssp.gantt_space module
- moptipy.examples.jssp.instance module
- moptipy.examples.jssp.instance_selector module
- moptipy.examples.jssp.makespan module
- moptipy.examples.jssp.ob_encoding module
- moptipy.examples.jssp.plot_gantt_chart module
- moptipy.examples.jssp.plots module
- moptipy.examples.jssp.spaces_sizes module
- moptipy.examples.jssp.worktime module
- moptipy.examples.vectors package
- moptipy.examples.bitstrings package
- Subpackages
- moptipy.mo package
- moptipy.mock package
- Submodules
- moptipy.mock.components module
Algorithm
BasePerformance
Experiment
Experiment.algorithm_applications()
Experiment.algorithm_names
Experiment.algorithms
Experiment.applications
Experiment.create()
Experiment.get_algorithm()
Experiment.get_instance()
Experiment.instance_applications()
Experiment.instance_names
Experiment.instances
Experiment.per_instance_seeds
Experiment.seeds_for_instance()
Instance
fixed_random_generator()
get_run_seeds()
- moptipy.mock.end_results module
- moptipy.mock.mo_problem module
- moptipy.mock.objective module
MockObjective
MockObjective.evaluate()
MockObjective.fattractors
MockObjective.fmax
MockObjective.fmin
MockObjective.for_type()
MockObjective.is_always_integer()
MockObjective.is_int
MockObjective.lb
MockObjective.log_parameters_to()
MockObjective.lower_bound()
MockObjective.name
MockObjective.sample()
MockObjective.seed
MockObjective.ub
MockObjective.upper_bound()
- moptipy.mock.utils module
- moptipy.operators package
- Subpackages
- moptipy.operators.bitstrings package
- moptipy.operators.ordered_choices package
- moptipy.operators.permutations package
- Submodules
- moptipy.operators.permutations.op0_shuffle module
- moptipy.operators.permutations.op1_insert1 module
- moptipy.operators.permutations.op1_swap2 module
- moptipy.operators.permutations.op1_swap_exactly_n module
- moptipy.operators.permutations.op1_swap_try_n module
- moptipy.operators.permutations.op1_swapn module
- moptipy.operators.permutations.op2_gap module
- moptipy.operators.permutations.op2_ox2 module
- moptipy.operators.signed_permutations package
- moptipy.operators.vectors package
- Submodules
- moptipy.operators.op0_forward module
- moptipy.operators.tools module
- Subpackages
- moptipy.spaces package
- Submodules
- moptipy.spaces.bitstrings module
- moptipy.spaces.intspace module
- moptipy.spaces.nparrayspace module
- moptipy.spaces.ordered_choices module
- moptipy.spaces.permutations module
- moptipy.spaces.signed_permutations module
KEY_UNSIGNED_MIN
SignedPermutations
SignedPermutations.blueprint
SignedPermutations.create()
SignedPermutations.has_repetitions()
SignedPermutations.is_dense()
SignedPermutations.log_parameters_to()
SignedPermutations.n()
SignedPermutations.n_points()
SignedPermutations.standard()
SignedPermutations.unsigned_min_value
SignedPermutations.validate()
SignedPermutations.with_repetitions()
- moptipy.spaces.vectorspace module
- moptipy.tests package
- Submodules
- moptipy.tests.algorithm module
- moptipy.tests.component module
- moptipy.tests.encoding module
- moptipy.tests.fitness module
- moptipy.tests.mo_algorithm module
- moptipy.tests.mo_archive_pruner module
- moptipy.tests.mo_problem module
- moptipy.tests.objective module
- moptipy.tests.on_bitstrings module
bitstrings_for_tests()
dimensions_for_tests()
random_bit_string()
validate_algorithm_on_bitstrings()
validate_algorithm_on_leadingones()
validate_algorithm_on_onemax()
validate_fitness_on_bitstrings()
validate_mo_algorithm_on_2_bitstring_problems()
validate_mo_algorithm_on_3_bitstring_problems()
validate_mo_algorithm_on_bitstrings()
validate_op0_on_1_bitstrings()
validate_op0_on_bitstrings()
validate_op1_on_1_bitstrings()
validate_op1_on_bitstrings()
validate_op1_with_step_size_on_1_bitstrings()
validate_op1_with_step_size_on_bitstrings()
validate_op2_on_1_bitstrings()
validate_op2_on_bitstrings()
verify_algorithms_equivalent()
- moptipy.tests.on_jssp module
- moptipy.tests.on_ordered_choices module
- moptipy.tests.on_permutations module
make_permutation_valid()
permutations_for_tests()
validate_op0_on_1_permutations()
validate_op0_on_permutations()
validate_op1_on_1_permutations()
validate_op1_on_permutations()
validate_op1_with_step_size_on_1_permutations()
validate_op1_with_step_size_on_permutations()
validate_op2_on_1_permutations()
validate_op2_on_permutations()
- moptipy.tests.on_signed_permutations module
- moptipy.tests.on_vectors module
- moptipy.tests.op0 module
- moptipy.tests.op1 module
- moptipy.tests.op1_with_step_size module
- moptipy.tests.op2 module
- moptipy.tests.selection module
- moptipy.tests.space module
- moptipy.utils package
- Submodules
- moptipy.utils.formatted_string module
- moptipy.utils.help module
- moptipy.utils.html module
- moptipy.utils.lang module
- moptipy.utils.latex module
- moptipy.utils.logger module
- moptipy.utils.markdown module
- moptipy.utils.math module
- moptipy.utils.nputils module
DEFAULT_BOOL
DEFAULT_FLOAT
DEFAULT_INT
DEFAULT_NUMERICAL
DEFAULT_UNSIGNED_INT
INTS
KEY_NUMPY_TYPE
array_to_str()
dtype_for_data()
fill_in_canonical_permutation()
int_range_to_dtype()
is_all_finite()
is_np_float()
is_np_int()
np_ints_max()
np_to_py_number()
numpy_type_to_str()
rand_generator()
rand_seed_check()
rand_seed_generate()
rand_seeds_from_str()
- moptipy.utils.number_renderer module
- moptipy.utils.plot_defaults module
- moptipy.utils.plot_utils module
- moptipy.utils.strings module
- moptipy.utils.sys_info module
- moptipy.utils.table module
- moptipy.utils.text_format module
MODE_NORMAL
MODE_SECTION_HEADER
MODE_TABLE_HEADER
TextFormatDriver
TextFormatDriver.begin_table_body()
TextFormatDriver.begin_table_cell()
TextFormatDriver.begin_table_header()
TextFormatDriver.begin_table_row()
TextFormatDriver.begin_table_section()
TextFormatDriver.begin_table_section_header()
TextFormatDriver.end_table_body()
TextFormatDriver.end_table_cell()
TextFormatDriver.end_table_header()
TextFormatDriver.end_table_row()
TextFormatDriver.end_table_section()
TextFormatDriver.end_table_section_header()
TextFormatDriver.filename()
TextFormatDriver.text()
Submodules¶
moptipy.version module¶
An internal file with the version of the moptipy package.