Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanups and cosmetics
[simgrid.git] / src / surf / maxmin_private.h
index 6216bc9..947e1c8 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "surf/maxmin.h"
 #include "xbt/swag.h"
+#include "xbt/mallocator.h"
 
 typedef struct lmm_element {
   /* hookup to constraint */
@@ -32,6 +33,8 @@ typedef struct lmm_constraint {
   s_xbt_swag_t element_set;    /* a list of lmm_mat_element_t */
   s_xbt_swag_t active_element_set;     /* a list of lmm_mat_element_t */
   double bound;
+  double lambda;
+  double new_lambda;
   double remaining;
   int shared;
   double usage;
@@ -50,6 +53,13 @@ typedef struct lmm_variable {
   double bound;
   double value;
   void *id;
+  int index; /* FOR SDP ONLY */
+  /* \begin{For Lagrange only} */
+  double mu;
+  double new_mu;
+  double df; /* Total delay of flow */
+  double (* func_fpi)  (struct lmm_variable *var, double x);  /* (f')^{-1}    */
+  /* \end{For Lagrange only} */
 } s_lmm_variable_t;
 
 typedef struct lmm_system {
@@ -61,6 +71,8 @@ typedef struct lmm_system {
 
   s_xbt_swag_t saturated_variable_set; /* a list of lmm_variable_t */
   s_xbt_swag_t saturated_constraint_set;       /* a list of lmm_constraint_t_t */
+
+  xbt_mallocator_t variable_mallocator;
 } s_lmm_system_t;
 
 #define extract_variable(sys) xbt_swag_remove(xbt_swag_getFirst(&(sys->variable_set)),&(sys->variable_set))
@@ -77,4 +89,6 @@ typedef struct lmm_system {
 static void lmm_var_free(lmm_system_t sys, lmm_variable_t var);
 static void lmm_cnst_free(lmm_system_t sys, lmm_constraint_t cnst);
 
+void lmm_print(lmm_system_t sys);
+
 #endif                         /* _SURF_MAXMIN_PRIVATE_H */