jMetal / jMetalPy

A framework for single/multi-objective optimization with metaheuristics
https://jmetal.github.io/jMetalPy/index.html
MIT License
497 stars 150 forks source link

why you use random uniform like this in MixedIntegerFloatProblem #154

Closed mohamedAnterGad closed 1 year ago

mohamedAnterGad commented 1 year ago

in MixedIntegerFloatProblem .py I think it should be : random.uniform(self.float_lower_bound[i] 1.0, self.float_upper_bound[i] 1.0) and in integer_solution.variables it should be : random.uniform(self.int_lower_bound[i], self.int_upper_bound[i])

instead of :

float_solution.variables = [ random.uniform(self.float_lower_bound[i] 1.0, self.float_upper_bound[i] 0.01) for i in range(len(self.int_lower_bound)) ]

    integer_solution.variables = [
        random.uniform(self.float_lower_bound[i], self.float_upper_bound[i])
        for i in range(len(self.float_lower_bound))
    ]

I know it is working in this mixed-integer float problem but just to assure my understanding and in order not to let anyone confused about it I made a pull request to fix this #153 https://github.com/jMetal/jMetalPy/pull/153#issue-1446918624

benhid commented 1 year ago

Hello,

You are right. I just merged the PR.

Thank you, I really appreciate it.