David Hadka
David Hadka
Yes, this should be possible by setting the `directions`: ``` problem.directions[0] = Problem.MINIMIZE problem.directions[1] = Problem.MINIMIZE problem.directions[2] = Problem.MAXIMIZE ```
Oh, lol...thanks for pointing that out :) I don't remember why I didn't add support for maximizing... Alternatively, you can negate the objective value instead. Maximizing objective `f(x)` is the...
Hi @fab6, The documentation is now updated with a working example. You can also find these examples in the new `examples/` folder.
Also print out `solution.constraints` and/or `solution.feasible`. I would guess that you would see the solutions you're getting are not feasible (violate one or more constraints). The first thing I would...
Hi, it can support mixed types, but you (the developer) are responsible for creating the variation operator appropriate for the mixed type. All of the operators are type-safe, meaning they...
You are seeing 100 results since the population_size argument is 100 by default. You can increase this with `NSGAII(problem, population_size=250)` for example.
Hi, thanks for the question and feedback. To call an external program, your evaluation function would look something like: ```python def call_external(vars): # Write vars to input.txt # Call the...
One option is to define a custom type for constants: ```python class Constant(Type): def __init__(self, value): super(Constant, self).__init__() self.value = value def rand(self): return self.value def __str__(self): return "Constant(%s)" %...
Try using [InjectedPopulation](https://github.com/Project-Platypus/Platypus/blob/d6aabe9bef6eca4087a26df8eca36406aacb9dac/platypus/operators.py#L41). For example: algorithm = NSGAII(problem, generator = InjectedPopulation(init_pop)) I added this today, so please pull the latest changes from master. Edit: This seeds the initial population and...
You would need to do something like: ```python from platypus import * def mixed_type(x): print("Evaluating", x) return [x[0], x[1]] problem = Problem(2, 2) problem.types[0] = Real(0, 10) problem.types[1] = Integer(0,...