-
Notifications
You must be signed in to change notification settings - Fork 434
Open
Description
Hi,
I am quite new to pymoo and try to adjust my old workflow to the tool. It seems very powerful :-)
At the moment, I define the problem like:
class MyProblem(ElementwiseProblem):
def __init__(self):
super().__init__(n_var=2,
n_obj=2,
n_ieq_constr=0)
+
def _evaluate(self, x, out, *args, **kwargs):
intI = random.randint(0, 900)
x = np.insert(x,0, intI)
parameterNameL = run_SIM.readYaml("run_SETTINGS.yaml")
y = run_SIM.callSIM_script(x, parameterNameL )
f1 = y[0]
f2 = y[1]
out["F"] = [f1, f2]
problem = MyProblem()
algorithm = NSGA2(pop_size=10, sampling=X)
res = minimize(problem,
algorithm,
("n_gen", 10),
verbose=True,
seed=1)
This seems to work fine, but at the moment I need to np.insert
some random id which is used to create running directories for each simulation, e.g. like
This works, but it would be great, if I could pass an id starting with 0
to it.
Is there an option to do this or do you have a hint, how I can do this?
Fab
Metadata
Metadata
Assignees
Labels
No labels