anchor.diff:  [[designPatternsIntroduction]]
   == Design patterns introduction
   
  -The design patterns in this section list and solve common design challenges.
  -//Need to explain what design patterns are.
  +OptaPlanner design patterns are generic reusable solutions to common challenges in the model or architecture of projects that perform constraint solving. The design patterns in this section list and solve common design challenges.
   
   [[domainModelingGuide]]
   == Domain modeling guidelines
  
positive.code: . *Choose the model in which the number of planning entities is fixed during planning*. For example, in the Employee Rostering starter application, it is impossible to know in advance how many shifts each employee will have before Optaplanner solves the model and the results can differ for each solution found.
  On the other hand, the number of employees per shift is known in advance,
  so it is better to make the `Shift` relationship a problem property
  and the `Employee` relationship a planning variable.
  +
  image::DesignPatterns/employeeShiftRosteringModelingGuideB.png[align="center"]
  
  // Not clear just what this diagram is showing:
  
  image::DesignPatterns/entityVariableAndValueExamples.png[align="center"]
  
  [NOTE]
  ====
  Vehicle routing is an exception because it uses a <<chainedPlanningVariable,chained planning variable>>.
  ====
  
  
  [[assigningTimeToPlanningEntities]]
  == Assigning Time to Planning Entities
  
negative.code: 
  
  . *Draw a class diagram of your domain model.*
  .. Make sure there are no duplications in your data model and that relationships between objects are clearly defined.
  
  .. Create sample instances for each class. For example, in the Employee Rostering starter application, the samples for the `Employee` class are `Ann`, `Bert`, and `Carl`.
  
  . *Determine which relationships (or fields) change during planning and color them orange.* One side of these relationships will become a planning variable later on. For example, in the Employee Rostering starter application, the `Shift` to `Employee` relationship changes during planning, so it is orange. However, other relationships, such as from `Employee` to `Skill`, are immutable during planning
  