Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why you use random uniform like this in MixedIntegerFloatProblem #154

Closed
mohamedAnterGad opened this issue Nov 13, 2022 · 1 comment
Closed

Comments

@mohamedAnterGad
Copy link
Contributor

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 #153 (comment)

@benhid
Copy link
Collaborator

benhid commented Nov 18, 2022

Hello,

You are right. I just merged the PR.

Thank you, I really appreciate it.

@benhid benhid closed this as completed Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants