def add_default_cost_script(self): if self.has_child('cost'): return base_mod='ifigure.add_on.solver.script' mod_path=cbook.GetModuleDir(base_mod) file=os.path.join(mod_path, 'cost_optimizer.py') sc = PyScript() self.add_child('cost', sc) sc._name_readonly = True sc.import_script(file)
def add_default_mergesol_script(self): if self.has_child('merge_sol'): return base_mod='ifigure.add_on.solver.script' mod_path=cbook.GetModuleDir(base_mod) file=os.path.join(mod_path, 'merge_sol_parametric.py') sc = PyScript() self.add_child('merge_sol', sc) sc._name_readonly = True sc.import_script(file)
def add_default_cost_script(self): if self.has_child('cost'): return base_mod = 'ifigure.add_on.solver.script' mod_path = cbook.GetModuleDir(base_mod) file = os.path.join(mod_path, 'cost_optimizer.py') sc = PyScript() self.add_child('cost', sc) sc._name_readonly = True sc.import_script(file)
def add_default_mergesol_script(self): if self.has_child('merge_sol'): return base_mod = 'ifigure.add_on.solver.script' mod_path = cbook.GetModuleDir(base_mod) file = os.path.join(mod_path, 'merge_sol_parametric.py') sc = PyScript() self.add_child('merge_sol', sc) sc._name_readonly = True sc.import_script(file)
def load_default_script(self): base_mod='ifigure.add_on.solver.script' mod_path=cbook.GetModuleDir(base_mod) file=os.path.join(mod_path, 'run_parametric.py') sc = PyScript() self.add_child('solver_script', sc) sc._name_readonly = True sc.import_script(file) sc.setvar("task", 2) self.add_default_mergesol_script()
def load_default_script(self): base_mod = 'ifigure.add_on.solver.script' mod_path = cbook.GetModuleDir(base_mod) file = os.path.join(mod_path, 'run_parametric.py') sc = PyScript() self.add_child('solver_script', sc) sc._name_readonly = True sc.import_script(file) sc.setvar("task", 2) self.add_default_mergesol_script()