martinwholtmon / IT3708-2023

Simple Genetic Algorithm (SGA) as feature selector, route optimization for home care service with SGA and semantic segmentation using Multiobjective Genetic Algorithm (MOGA)
0 stars 0 forks source link

Represent a solution/population/individuals #35

Closed martinwholtmon closed 1 year ago

martinwholtmon commented 1 year ago

How a solution should be represented to make it feasable to check for the constraints

  1. A population of solutions where each index represent a patient and the value reprent a visit from a nurse
  2. A population of n nurses where each value represent whether to visit a patient or not (binary) (one feasable solution per generation)
  3. A population of patients where each index in the bitstring represent a visit from a nurse.
martinwholtmon commented 1 year ago

Start with 2. A population of n nurses where each value represent whether to visit a patient or not (binary) (one feasible solution per generation):

[
[0,0,0,1,...,1],  // Nurse 1
[1,1,0,0,...,0],  // Nurse 2
...
]

Will have two populations, one feasible that satisfies the constraints and one unfeasible.

martinwholtmon commented 1 year ago

Might have to rethink this one. Probably best to select 1 to have a population of multiple solutions (individuals)