1 /* Authors: Arnaud Legrand */
3 /* This program is free software; you can redistribute it and/or modify it
4 under the terms of the license (GNU LGPL) which comes with this package. */
6 typedef long double xbt_maxmin_float_t;
7 #define XBT_MAXMIN_FLOAT_T "%Lg" /* for printing purposes */
9 typedef struct lmm_variable *lmm_variable_t;
10 typedef struct lmm_constraint *lmm_constraint_t;
11 typedef struct lmm_system *lmm_system_t;
13 lmm_system_t lmm_system_new(void);
14 void lmm_system_free(lmm_system_t sys);
16 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
17 xbt_maxmin_float_t bound_value);
18 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
20 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
21 xbt_maxmin_float_t weight_value,
22 xbt_maxmin_float_t bound,
23 int number_of_constraints);
24 void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
25 xbt_maxmin_float_t lmm_variable_getvalue(lmm_variable_t var);
28 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
29 lmm_variable_t var, xbt_maxmin_float_t value);
31 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
32 lmm_variable_t var, xbt_maxmin_float_t value);
33 void lmm_update_variable_bound(lmm_variable_t var,
34 xbt_maxmin_float_t bound);
35 void lmm_update_variable_weight(lmm_variable_t var,
36 xbt_maxmin_float_t weight);
37 void lmm_update_constraint_bound(lmm_constraint_t cnst,
38 xbt_maxmin_float_t bound);
40 void lmm_solve(lmm_system_t sys);