On 08/06/2017 09:40 PM, Andrew Makhorin wrote:
>> FORMULA *op1;
>> FORMULA *op2;
>> ...
>> case O_ADD:
>> /* addition */
>> op1 = eval_formula(mpl, code->arg.arg.x);
>> op2 = eval_formula(mpl, code->arg.arg.y);
>> value = linear_c
> FORMULA *op1;
> FORMULA *op2;
> ...
> case O_ADD:
> /* addition */
> op1 = eval_formula(mpl, code->arg.arg.x);
> op2 = eval_formula(mpl, code->arg.arg.y);
> value = linear_comb(mpl,
>+1.0, op1,
>+
On 08/06/2017 08:20 PM, Andrew Makhorin wrote:
>
>> In the first two cases evaluation of pt precedes evaluation of xt while
>> in the last three cases xt is evaluated before pt. At the moment I
>> cannot say why this happens...
>
> I'm sure that this happens, because in the first two cases argume
> In the first two cases evaluation of pt precedes evaluation of xt while
> in the last three cases xt is evaluated before pt. At the moment I
> cannot say why this happens...
I'm sure that this happens, because in the first two cases arguments
passed to a function (I mean C code, not MathProg) a
Hi Heinrich,
Thank you for your help.
> The following model is sufficient to demonstrate it:
>
> param xt := Uniform01();
> param pt := Uniform01();
>
> var y, >= 0;
> minimize obj : y + pt + xt;
>
> solve;
>
> printf "%f ", pt;
> printf "%f\n", xt;
> end;
>
>
>
> x86: (32-bit LSB executab
On 08/06/2017 05:52 PM, Andrew Makhorin wrote:
>
>> The important thing is that I observed a difference for model parameters.
>>
>> ./glpsol --wlp test.lp -m test.mod --check
>>
>> yields totally different files test.lp and different objective values.
>> So this is a problem in model generation.
>
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 *
> The important thing is that I observed a difference for model parameters.
>
> ./glpsol --wlp test.lp -m test.mod --check
>
> yields totally different files test.lp and different objective values.
> So this is a problem in model generation.
>
> If I take one of the lp files as input I get the
On 08/06/2017 01:51 PM, Andrew Makhorin wrote:
> Hi Heinrich,
>
>> the appended file test.mod is examples/threads/clustering.mod with
>> appended line
>>
>> printf {t in T} "%d -> %d\n", t, pt[t];
>>
>> Essentially the line prints out part of the generated problem.
>>
>> The output on x86-64 ends
Hi Heinrich,
> the appended file test.mod is examples/threads/clustering.mod with
> appended line
>
> printf {t in T} "%d -> %d\n", t, pt[t];
>
> Essentially the line prints out part of the generated problem.
>
> The output on x86-64 ends with:
>
> 49 -> 608
> 50 -> 334
> Model has been succe
10 matches
Mail list logo