Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

Optimize Wrapper

A VIKTOR wrapper to wrap your optimization function and make it the fitness function for a Genetic Algorithm.

Installation

You can install this package directly from GitHub:

pip install git+https://github.com/viktor-platform/optimize_wrapper.git

Usage

importviktorasvktfromoptimize_wrapperimportgenetic_optimizeclassParametrization(vkt.Parametrization):
section=vkt.Section("Section")
section.x=vkt.NumberField("X")
section.y=vkt.NumberField("Y")
classController(vkt.Controller):
parametrization=Parametrization@genetic_optimize(optimized_parameters=Parametrization,path="section",sol_per_pop=250,num_generations=100,amount_of_solutions=100 )defoptimize_x_and_y(self, optimized_params, params, **kwargs):
returnoptimized_params.x+optimized_params.y

Requirements

  • Python >= 3.8
  • munch >= 4.0.0
  • pygad >= 3.5.0
  • viktor >= 14.24.0
  • matplotlib
  • numpy

Development

To install in development mode:

git clone https://github.com/viktor-platform/optimize_wrapper.git
cd optimize_wrapper
pip install -e .

License

This project is part of the VIKTOR platform.

About

A VIKTOR wrapper, to wrap your optimization function, to make it the fitness function for a Genetic Algorithm

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages