source: framspy/evolalg/base/frams_step.py @ 1126

Last change on this file since 1126 was 1113, checked in by Maciej Komosinski, 4 years ago

Added a framework for evolutionary algorithms cooperating with FramsticksLib?.py

File size: 674 bytes
Line 
1from evolalg.base.step import Step
2
3
4class FramsStep(Step):
5    def __init__(self, frams_lib, commands=None):
6        if commands is None:
7            commands = []
8        self.frams = frams_lib
9        self.commands = commands
10
11    def pre(self):
12        for c in self.commands:
13            self.frams.sendDirectCommand(c) #TODO update to use FramsticksLib when needed, pass lambda, import frams module? Maybe pre-lambda returns old value, post-lambda restores what pre-lambda returned. Or pass ExtValue or list of ExtValues and their new values (and either caller saves original values to be restored, or pre() returns a list of original values to be restored in post())
Note: See TracBrowser for help on using the repository browser.