Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Export sdp_solve only when compiling with csdp!
[simgrid.git] / src / include / surf / maxmin.h
index 82ee074..705cb9d 100644 (file)
@@ -9,6 +9,13 @@
 #define _SURF_MAXMIN_H
 
 #include "xbt/misc.h"
+#include "portable.h" 
+static XBT_INLINE void double_update(double *variable, double value) 
+{
+  *variable -= value;
+  if(*variable< 0.00001) *variable = 0.0;
+}
+
 typedef struct lmm_variable *lmm_variable_t;
 typedef struct lmm_constraint *lmm_constraint_t;
 typedef struct lmm_system *lmm_system_t;
@@ -19,6 +26,8 @@ void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var);
 
 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
                                    double bound_value);
+void lmm_constraint_shared(lmm_constraint_t cnst);
+
 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
 
 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
@@ -32,6 +41,8 @@ void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
                lmm_variable_t var, double value);
 void lmm_expand_add(lmm_system_t sys, lmm_constraint_t cnst,
                    lmm_variable_t var, double value);
+void lmm_elem_set_value(lmm_system_t sys, lmm_constraint_t cnst,
+                       lmm_variable_t var, double value);
 
 lmm_constraint_t lmm_get_cnst_from_var(lmm_system_t sys,
                                       lmm_variable_t var, int num);
@@ -60,4 +71,8 @@ void lmm_update_constraint_bound(lmm_system_t sys, lmm_constraint_t cnst,
 int lmm_constraint_used(lmm_system_t sys, lmm_constraint_t cnst);
 
 void lmm_solve(lmm_system_t sys);
+#ifdef HAVE_SDP
+void sdp_solve(lmm_system_t sys);
+#endif /* HAVE_SDP */
+
 #endif                         /* _SURF_MAXMIN_H */