-/* Copyright (c) 2007-2013. The SimGrid Team.
+/* Copyright (c) 2007-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
tmp += var->value;
}
- if (double_positive(tmp - cnst->bound)) {
+ if (double_positive(tmp - cnst->bound, sg_maxmin_precision)) {
if (warn)
XBT_WARN
("The link (%p) is over-used. Expected less than %f and got %f",
XBT_DEBUG("Checking feasability for variable (%p): sat = %f mu = %f", var,
var->value - var->bound, var->mu);
- if (double_positive(var->value - var->bound)) {
+ if (double_positive(var->value - var->bound, sg_maxmin_precision)) {
if (warn)
XBT_WARN
("The variable (%p) is too large. Expected less than %f and got %f",
obj += var->mu * var->bound;
}
- xbt_swag_foreach(_cnst, cnst_list)
+ xbt_swag_foreach(_cnst, cnst_list) {
cnst = (lmm_constraint_t)_cnst;
obj += cnst->lambda * cnst->bound;
+ }
return obj;
}
* Lagrange Variables.
*/
int max_iterations = 100;
- double epsilon_min_error = MAXMIN_PRECISION;
+ double epsilon_min_error = 0.00001; /* this is the precision on the objective function so it's none of the configurable values and this value is the legacy one */
double dichotomy_min_error = 1e-14;
double overall_modification = 1;
min = max = 0.5;
}
- min_diff = max_diff = middle_diff = 0.0;
overall_error = 1;
if ((diff_0 = diff(1e-16, var_cnst)) >= 0) {