Changeset 1101


Ignore:
Timestamp:
03/10/21 20:04:56 (4 years ago)
Author:
Maciej Komosinski
Message:

Import simulation settings only once in the beginning, not on every evaluation (so changes in parameter values will now persist forever)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/FramsticksLib.py

    r1095 r1101  
    4545                if not self.DETERMINISTIC:
    4646                        frams.Math.randomize();
    47                 frams.Simulator.expdef = "standard-eval"  # this expdef must be used by EVALUATION_SETTINGS_FILE
     47                frams.Simulator.expdef = "standard-eval"  # this expdef (or fully compatible) must be used by EVALUATION_SETTINGS_FILE
    4848                if simsettings is not None:
    4949                        self.EVALUATION_SETTINGS_FILE = simsettings
     50                frams.Simulator.ximport(self.EVALUATION_SETTINGS_FILE, 4 + 8 + 16)
    5051
    5152
     
    6768
    6869                frams.GenePools[0].clear()
    69                 frams.Simulator.ximport(self.EVALUATION_SETTINGS_FILE, 2 + 4 + 8 + 16)
    70 
    7170                for g in genotype_list:
    7271                        frams.GenePools[0].add(g)
     
    178177        framsDLL = FramsticksLib(parsed_args.path, parsed_args.lib, parsed_args.simsettings)
    179178
    180         print("Sending a direct command to Framsticks CLI that calculates \"4\"+2 yields", frams.Simulator.eval("return \"4\"+2;"))
     179        print("Sending a direct command to Framsticks library that calculates \"4\"+2 yields", frams.Simulator.eval("return \"4\"+2;"))
    181180
    182181        simplest = framsDLL.getSimplest('1' if parsed_args.genformat is None else parsed_args.genformat)
Note: See TracChangeset for help on using the changeset viewer.