Penalty Methods
Learn how to deal with constraints using penalty methods.
We'll cover the following...
Now, it’s time to deal with bad constraints. Unfortunately, these are the most common kinds of constraints. They’re difficult to get rid of, and it’s also difficult to generate solutions that fulfill them.
For example, let’s see the following problem:
We don’t know any exact or approximate method to solve this problem in this form. To get rid of the constraint, we’d need to make some analysis of the valid region of solutions in the plane. It’s not too hard to do so, but that’s because this is a simple problem.
If we use a genetic algorithm to solve this problem, we can generate valid initial solutions with a simple method. We first generate a random ...