title: Encoding of N objects distributed into containers
body: <p>Does anyone have an idea on how to use binary enconding for distributing <code>N</code> objects into <code>C</code> containers?</p>
  
  <p>I have 70 objects to distribute into 25 containers. </p>
  
  <p>All can store up to 6 objects, except for one, which can store up to 14 objects.</p>
  
  <p>I tried to solve it like this:</p>
  
  <ul>
  <li>Chromossome with 25 genes, sized 2^4 each.</li>
  <li>Now given an individual, I divide all numbers in the chromossome by their sum.</li>
  <li>Now I have 25 floating point numbers representing the proportion of objects in each container</li>
  <li>When I multiply these proportions by 70 I have how many objects should go to each container, but my results aren't integers, so I round them up or down, which is closest.</li>
  </ul>
  
  <p>Since the amount of rounding ups and down aren't the same, my final distribution can have anything between ~65-75. </p>
  
  <p>I know I could create a penalty system to penalize the solutions in which the amount of distributed objects is not equal to 70. But I was wondering If I could fix this using another enconding logic.</p>
  
  <p>Does anyone have a better idea?</p>