+#include "surf/datatypes.h"
+#include <math.h>
+
+
+/** @addtogroup SURF_lmm
+ * @details
+ * A linear maxmin solver to resolves inequations systems.
+ *
+ * Most SimGrid model rely on a "fluid/steady-state" modeling that
+ * samount to share resources between actions at relatively
+ * coarse-grain. Such sharing is generally done by solving a set of
+ * linear inequations. Let's take an example and assume we have the
+ * variables \f$x_1\f$, \f$x_2\f$, \f$x_3\f$, and \f$x_4\f$ . Let's
+ * say that \f$x_1\f$ and \f$x_2\f$ correspond to activities running
+ * and the same CPU \f$A\f$ whose capacity is \f$C_A\f$ . In such a
+ * case, we need to enforce:
+ *
+ * \f[ x_1 + x_2 \leq C_A \f]
+ *
+ * Likewise, if \f$x_3\f$ (resp. \f$x_4\f$) corresponds to a network
+ * flow \f$F_3\f$ (resp. \f$F_4\f$) that goes through a set of links
+ * \f$L_1\f$ and \f$L_2\f$ (resp. \f$L_2\f$ and \f$L_3\f$), then we
+ * need to enforce:
+ *
+ * \f[ x_3 \leq C_{L_1} \f]
+ * \f[ x_3 + x_4 \leq C_{L_2} \f]
+ * \f[ x_4 \leq C_{L_3} \f]
+ *
+ * One could set every variable to 0 to make sure the constraints are
+ * satisfied but this would obviously not be very realistic. A
+ * possible objective is to try to maximize the minimum of the
+ * \f$x_i\f$ . This ensures that all the \f$x_i\f$ are positive and "as
+ * large as possible".
+ *
+ * This is called *max-min fairness* and is the most commonly used
+ * objective in SimGrid. Another possibility is to maximize
+ * \f$\sum_if(x_i)\f$, where \f$f\f$ is a strictly increasing concave
+ * function.
+ *
+ * Constraint:
+ * - bound (set)
+ * - shared (set)
+ * - usage (computed)
+ * Variable:
+ * - weight (set)
+ * - bound (set)
+ * - value (computed)
+ * Element:
+ * - value (set)
+ *
+ * A possible system could be:
+ * - three variables: `var1`, `var2`, `var3`
+ * - two constraints: `cons1`, `cons2`
+ * - four elements linking:
+ * - `elem1` linking `var1` and `cons1`
+ * - `elem2` linking `var2` and `cons1`
+ * - `elem3` linking `var2` and `cons2`
+ * - `elem4` linking `var3` and `cons2`
+ *
+ * And the corresponding inequations will be:
+ *
+ * var1.value <= var1.bound
+ * var2.value <= var2.bound
+ * var3.value <= var3.bound
+ * var1.weight * var1.value * elem1.value + var2.weight * var2.value * elem2.value <= cons1.bound
+ * var2.weight * var2.value * elem3.value + var3.weight * var3.value * elem4.value <= cons2.bound
+ *
+ * where `var1.value`, `var2.value` and `var3.value` are the unknown values
+ *
+ * if a constraint is not shared the sum is replace by a max
+ *
+ * Its usefull for the sharing of resources for various models.
+ * For instance for the network model the link are associated
+ * to consrtaint and the communications to variables.
+ */
+
+extern double sg_maxmin_precision;
+extern double sg_surf_precision;