msu-coinlab / pymop

Single- as well as Multi-Objective Optimization Test Problems: ZDT, DTLZ, CDTLZ, CTP, BNH, OSY, ...
https://www.egr.msu.edu/coinlab/blankjul/pymop/
Apache License 2.0
79 stars 13 forks source link

Error when defining typevar as int or float #5

Open lureevnat opened 5 years ago

lureevnat commented 5 years ago

`# define the variable type which will be checked before the evaluation

    self.type_var = np.int

` When I change the self.type_var as np.int when defining custom problem, and running nsga3 algorithm present in pymoo, I am getting below error. Can't I chane the type of variable?

` File "/home/coea/anaconda3/envs/pymoo/lib/python3.6/site-packages/pymop/problem.py", line 132, in evaluate % (self.type_var, type_of_var))

Exception: As variable type for this problem <class 'int'> was defined. However, it is evaluated with float64!`