How to write evaluate(IChromosome a_subject) function for Mini F(x) problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to write evaluate(IChromosome a_subject) function for Mini F(x) problem

ShankhaB
Hi

I try to solve some simple minimization problem with constraints.
Problem :

Minimize Z = 2x1+ 8x2  
Subject To -   5x1+x2>=10  
                    2x1+2x2>=14
                    x1+4x2>=12
                    x1,x2>=0   and 1<x1<=7    |   0<x2<=4



What I understand I have to check the my Fitness function or objective function (Z) in the

public double evaluate(IChromosome a_subject)  method , where a_subject  is the one of the potential solution.

from the "a_subject"  object I have to get the value of X1 and X2 then , I have to chek all the above mentioned constraints as well as the Fitness function (Z).

What should be the logic for which IChromosome ( a_subject) - Z will be minimized ?

Please guide me?

Thank you,
shankha
Loading...