Heinrich,
To see which parameters members are evaluated and in which order please
add a print stmt into the routine take_member_num, file src/mpl/mpl3.c,
as follows (it is marked by #if 1/#endif):
double take_member_num
( MPL *mpl,
PARAMETER *par, /* not changed */
TUPLE *tuple /* not changed */
)
{ MEMBER *memb;
double value;
/* find member in the parameter array */
memb = find_member(mpl, par->array, tuple);
if (memb != NULL)
{ /* member exists, so just take its value */
value = memb->value.num;
}
else if (par->assign != NULL)
{ /* compute value using assignment expression */
value = eval_numeric(mpl, par->assign);
add: /* check that the value satisfies to all restrictions, assign
it to new member, and add the member to the array */
check_value_num(mpl, par, tuple, value);
memb = add_member(mpl, par->array, copy_tuple(mpl, tuple));
memb->value.num = value;
#if 1
xprintf("$$$ %s%s = %g\n",
par->name, format_tuple(mpl, '[', memb->tuple), memb->value.num);
#endif
}
else if (par->option != NULL)
{ /* compute default value */
...
Hope this will shed a light on what really happens.
Best,
Andrew Makhorin
_______________________________________________
Bug-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-glpk