moptipyapps package

Applications of Metaheuristic Optimization in Python.

Currently, the following applications are implemented:

  • binpacking2d provides methods to solve two-dimensional bin packing instances,

  • dynamic_control can simulate controlled dynamic systems of differential equations and our goal is to synthesize controllers that can steer such systems into beneficial states,

  • mod:~moptipyapps.tsp offers instances of the well-known Traveling Salesperson Problem (TSP) and some very basic algorithms to tackle it.

The following additional tools are implemented:

  • tests offers unit tests to try out optimization algorithms and other instances of component on the different problems that are provided above.

  • shared offers shared constants and tools.

Subpackages

Submodules

moptipyapps.shared module

Some shared variables and constants.

moptipyapps.shared.SCOPE_INSTANCE: Final[str] = 'inst'

the instance scope

moptipyapps.shared.moptipyapps_argparser(file, description, epilog)[source]

Create an argument parser with default settings.

Parameters:
  • file (str) – the __file__ special variable of the calling script

  • description (str) – the description string

  • epilog (str) – the epilogue string

Return type:

ArgumentParser

Returns:

the argument parser

>>> ap = moptipyapps_argparser(
...     __file__, "This is a test program.", "This is a test.")
>>> isinstance(ap, argparse.ArgumentParser)
True
>>> "Copyright" in ap.epilog
True

Print the standard csv footer for moptipyapps.

Parameters:
  • _ – the setup object, ignored

  • additional (str | None, default: None) – any additional output string

Return type:

Iterable[str]

Returns:

the comments

>>> for s in motipyapps_footer_bottom_comments(None, "bla"):
...     print(s[:49])
This data has been generated with moptipyapps ver
bla
You can find moptipyapps at https://thomasweise.g
>>> for s in motipyapps_footer_bottom_comments(None, None):
...     print(s[:49])
This data has been generated with moptipyapps ver
You can find moptipyapps at https://thomasweise.g

moptipyapps.version module

An internal file with the version of the moptipyapps package.