Question: beginning with the project we started in class, do the following 1 . Replace the code inside the generateChild method of the GAHeuristic java class.

beginning with the project we started in class, do the following
1. Replace the code inside the "generateChild" method of the GAHeuristic java class. The
In constructing child, we will begin by selecting the first job completed, tollowed by the
b. rosend one
co completed in the ith position of child, begin by identifying the jobs select job
inS assigned to
(with equally likely probability) from among the lobs not vet assigned to a
object in which each job
een assigned to some position in child. The code should then return the Solution object
Problem 3.
In this problem, you will create a new class called "Demo 2". In the main method of this class, write
code to do the tollowing
1. Initialize a random number generator with seed =1. You can do this by importing
ava.utll. Random and using the command
Random r = new Random (11 :
2. Define three Solution obiects using the data in JobsData-small, esy. The solutions should
soll: 1
NofinomtstinnDenk = n 15
3. Add the command
Susten.out.orintin/"Children of soll and sol?.").
4. fyecute GenerateChildisolt, sol?, mutationProh, o) tentimes. foreach of the ten Solution obiects produced. call the obiert's orintabhrul) method to print out the solution's inh sequence
5. Add the command
6 Evoruto Conorsto0hildieni1 eni? mutstinnDenh ri tontimos Eoroach
7. Add the commanc
Cuatan out cedatlattehildrag af colt and collant.
8 frocuto ConorstoChildlealtealt mutationDrah altontimes Coreachos
the ton Solution shiects produced call the chiors nrintAkhrut) mothod to print out tho
calution's inh caruionen
Thue hu follouine the done shous runnina thana! a mothod of tha Name? dace chould cocult in thirte
beginning with the project we started in class,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!