PageRenderTime 25ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/farmR/src/java/dox/constraints.dox

https://code.google.com/p/javawfm/
Unknown | 139 lines | 138 code | 1 blank | 0 comment | 0 complexity | a9b2e54e63068d8e497df8d01141a6d4 MD5 | raw file
  1/*! \page constraints Constraints 
  2 * 
  3 * \section coding Coding Constraints
  4 * 
  5 * Each constraint is given its own class in the JFM.  All 
  6 * constraint classes are subclasses of the abstract \link jfm.lp.ConstraintBuilder ConstraintBuilder \endlink
  7 * class, which defines the abstract method \link jfm.lp.ConstraintBuilder.build() build() \endlink. 
  8 * 
  9 * 
 10 * Every constraint will be associated with a particular \link jfm.lp.ModelComponent ModelComponent \endlink 
 11 * . One typically defines a constraint class as a private class to the associated 
 12 * model component class.  Because of this tight associated between model components and 
 13 * constraints it is not possible to arbitrarily swap constraints around (not that one would 
 14 * want to), but it is possible to control which of the constraints for a model 
 15 * component are turned on or off.
 16 * 
 17 * \section builtin Built in Constraints 
 18 * 
 19 * In this documentation, and in the JFM, constraints are grouped into sets that can be 
 20 * written down in a single equation.  Usually the entire set is itself just called a 
 21 * constraint, although in reality it may consist of many rows in the constraint matrix.  
 22 * 
 23 * 
 24 * In the following documentation we use an abbreviated notation to describe sets of constraints, 
 25 * 
 26 * \f[ \{ \Phi(i,k) \}  \forall i,k \in \mathbf{P}  \f] 
 27 * 
 28 * where the constraint equation, \f$ \Phi(i,k) \f$ is a function of \f$ i,k\f$ and we use the \f$ \forall \f$ 
 29 * symbol to denote that there is a constraint of this type for every possible \f$ i \f$ and 
 30 * \f$ k \f$.  The set of possible \f$ i \f$ in this case is just assumed to be the complete 
 31 * set for whatever \f$ i \f$ describes (eg, crops, operations). We use an abbreviated set notation 
 32 * to denote that \f$ k \f$ in this case must come from a restricted set of possibilities which we 
 33 * denote by a boldface capital ( eg. \f$ \mathbf{P} \f$ ). 
 34 * 
 35 * 
 36 * Some further notational definitions are; 
 37 * 
 38 *  - \f$ a_c \f$ : The area of crop \f$ c \f$. \n
 39 *  - \f$ x_{c,o,k} \f$ : The area of operation \f$ o \f$ on crop \f$ c \f$ in period \f$ k \f$. 
 40 *  - \f$ B_d \f$ : The number of years break required between crops of disease type \f$ d \f$.
 41 *  - \f$ r_{t,f,k} \f$ : The area rotating from crop \f$ f \f$ to crop \f$ t \f$ in period \f$ k \f$.
 42 *  - \f$ R_{c,o,k,w} \f$ is the number of hours required for worker \f$ w \f$ on crop \f$ c \f$ 
 43* , operation \f$ o \f$ and in period \f$ k \f$.
 44*  - \f$ H_{w,k} \f$ is the number of hours available for worker \f$ w \f$ in period \f$ k \f$.
 45 *  - \f$ N_w \f$ is the number of workers of type \f$ w \f$. 
 46*  - \f$ \mathbf{P}_{c,o} \f$ : Is the set of periods in which operation \f$ o \f$ can be carried out on crop \f$ c \f$.
 47 *  - \f$ \mathbf{R}_{t,f} \f$ is the set of crops \f$ t \f$ for which the rotation from crop \f$ f \f$ is allowed.
 48
 49 * \subsection clist Complete list of constraints in JFM
 50 * 
 51* \subsubsection Cropping 
 52* 
 53 * - 1 \anchor cnstrTotalArea \link jfm.model.Cropping.TotalAreaConstraint Total Area \endlink. Constrains the 
 54 * sum of areas of all crops to be equal to the total area cropped.
 55 * \f[ \left \{ \sum_{c} a_{c} = A \right \} \forall c \f]
 56 * where \f$ A \f$ is the total area cropped.
 57 * 
 58 * - 2 \link jfm.model.Cropping.OperationAreaConstraint Operation Area \endlink Constrains the 
 59 * area of the first operation on any crop to equal the crop area.
 60 * \f[ \left \{ \sum_{k \in \mathbf{P}_{c,1} } x_{c,1,k} = a_c \right \}   \forall c  \f]
 61 * 
 62 * - 3 \link jfm.model.Cropping.NonSequentialOperationConstraint Non Sequential Operation Area \endlink
 63 * Constrain the total area of each operation on a crop (regardless of sequence) to equal the crop area. 
 64 * \f[
 65 * 		\left \{ \sum_{k \in \mathbf{P}_{c,o} } x_{c,o,k} = a_c \right \} \forall c,o
 66 * \f]
 67 * 
 68 * - 4 \link jfm.model.Cropping.OperationSequencingConstraint Constraint on Operation sequencing \endlink
 69 * Constrain the operational areas to conform to sequencing requirements. The sum of operation areas in a given period cannot exceed 
 70 * the sum of areas of the preceeding operation up to that period
 71 * \f[
 72 * 	\left \{ \sum_{k \leq K} x_{c,o,k} \leq \sum_{k \leq K} x_{c,(o-1),k} \right \} \forall c, (o > 1 ), K \in \mathbf{P}_K
 73 * \f]
 74 * where the set \f$ \mathbf{P}_K = \mathbf{P}_{c,o} \cap \mathbf{P}_{c,o-1} \f$ is 
 75 * the set of periods in which both operations \f$ o \f$ and \f$ o-1 \f$ can be carried out 
 76* on crop \f$ c \f$.  Note that the set \f$ \mathbf{P}_K \f$ should be a continuous sequence.  
 77 * 
 78* 
 79*  - 5 \link jfm.model.Cropping.OperationMinAreaConstraint Minimum area of constraints required in period \endlink
 80* Constrain the area of certain operations in each period to be at least some minimum (rarely used constraint ). 
 81* \f[ 
 82* 	x_{c,o,k} \geq x_{c,o,k}^{min}  
 83* \f]
 84*
 85* - 6 \link jfm.model.Cropping.DiseaseConstraint Constraint on crop areas due to Disease \endlink. Constrain 
 86* the area of crops with a certain disease type and/or associated disease to be no greater than the area of all 
 87* other crops divided by the number of years break required between crops with the disease. 
 88* \f[
 89*	\left \{ \sum_{c \in \mathbf{C}^d} a_c B_d + \sum_{c \in \mathbf{C}^{d'}} a_c Min(B_{d'},B_d)  
 90	\leq \sum_{c \notin \mathbf{C}^d \cup \mathbf{C}^{d'} }  \right \}  \forall d
 91* \f]
 92* where the set of crops with a particular disease is written as \f$ \mathbf{C}^d \f$.
 93* 
 94- 7 \link jfm.model.Cropping.AreaLimitConstraint Limits on individual crops \endlink. Constrains the area of specific individual crops. 
 95* \f[
 96*	a^{min}_c \leq a_c \leq a_c^{max} 
 97* \f]
 98* 
 99* \subsubsection Rotations 
100* 
101* - 8 \link jfm.model.Rotations.LastOpRotationConstraint Rotation sequencing for the last operation on a crop \endlink. 
102* Constrain the total area rotating from a particular crop to all other crops to be equal to the total area 
103* of the last operation of that crop (in a specific period).
104* \f[
105*	\left \{ \sum_t r_{t,f,k} = x_{f,o',k} \right \} \forall f \in \mathbf{R}_{t,f},k \in \mathbf{P}_{f,o'}
106* \f]
107* where \f$ o' \f$ is the last operation on the from crop \f$ f \f$. 
108* 
109* - 9 \link jfm.model.Rotations.NonSeqFirstOpRotationConstraint Rotation constraints on non-sequential operations \endlink. 
110* Constrain the area of the first operation in the to crop \f$ t \f$ to be no greater than the 
111* area rotating from all other crops.  This is a less restrictive constraint than (10), but is 
112* required for cases where there are no overlapping periods between the last operation of \f$ f \f$ 
113* and the first operation of \f$ t \f$.
114* \f[
115*	\left \{ \sum_k x_{t,1,k} \leq \sum_f r_{t,f,k} \right \} \forall t \in \mathbf{R}_{t,f}
116* \f]
117* 
118* - 10 \link jfm.model.Rotations.SeqFirstOpRotationConstraint Rotation constraint on first operation \endlink. Constrain 
119* the total area of the first operation on a crop up to a period to be no more than the total amount 
120* rotating to that crop up to that period. 
121* \f[
122*	\left \{ \sum_{k\leq K} x_{t,1,k} \leq \sum_f r_{t,f,k} \right \} \forall t \in \mathbf{R}_{t,f}, K\in \mathbf{K}_{t,f}
123* \f]
124* where the set \f$ \mathbf{K}_{t,f} = \mathbf{P}_{t,1} \cap \mathbf{P}_{f,o'} \f$ is the set of periods in which 
125* the last operation of crop \f$ f \f$ overlaps with the to crop \f$ t \f$. In the case where the intersection 
126* is null the constraint (9) ensures continuity of operations from one crop to the next.
127* 
128* \subsubsection Workers 
129* 
130* - 11 \link jfm.model.Workers.ResourcesConstraint Constraint on available resources \endlink. Constrain the 
131* total number of hours required for a worker type to be no more than the number of hours available.
132* \f[
133* \left \{ \sum_{o,c} R_{c,o,k,w} \leq N_w H_{w,k} \right \} \forall k,w
134* \f]
135* 
136* 
137* 
138* 
139*/