Dear Dax

Thanks a lot for your favor.

in my model the MCPS is the same as ini_pi that you mentioned correctly in the above pseudo code just I want to clarify the MCPS as an output for my program. but I have the problem that the tprofit does not converge to a specific value and after 4 or 5 iteration the tprofit value fluctuate between 2 values . for example fluctuate between 4.59E8 and 1.103e8 and never converge to a specific value . and now I want to determine the maximum tprofit as an output of my program. I test this condition for several initial price (ini_pi) and I found that after 4 or 5 iteration these values are repeated until the end of the iteration that has been determined for the loop. Could you please help me that how could I define it for my program?

it means that after solve the loop problem automatically found the maximum profit after the 5 iteration, and also save and keep it ?

it means If (iter>5,then put tprofit=max )

thanks a lot for your favor in advance

regards

Mohammad

On Wednesday, July 24, 2013 4:49:27 PM UTC+8, dax wrote:

dear mohammad,

before trying to iterate over price levels, I think you should consider verifying the “physical” modelling first. it looks a little weird.

further, you do not mention how you intend to update your price – is it the MCPS parameter ?

if so, you just have to apply the pseudo-code I was mentioning yesterday, which yields something like :

*-----------------------------------

model mohammad /all/;

parameter MCPS(s,l);

set iter /it01*it10/ ;

loop(iter,

solve mohammad using NLP maximazing tprofit;

loop ((s,l),MCPS(s,l) =

-(sum(e,g.l(e,s,l))/refpi(s,l))+(refdem(s,l)/refpi(s,l));

if (MCPS(s,l) 0),

SOLVE …

- compute the new initial prices :

PRICE = …

IF (…, CONTINUE = 0 ; );

);

Hope this helps

cheers

dax

Le dimanche 21 juillet 2013 19:00:50 UTC+2, m asgary a Ã©crit :

hi

I am a beginner in gams. I write a program in gams to solve an optimization problem . and then use the output in an equation to calculate the price. in continue I should put the outputs as an input parameters to solve the optimization problem and continue this iteration until the optimization problem converge.

for example :

I solve the problem and get the following results:

benefit = 250

g1=10

g2=20

…

and then put the g outputs in to the equation and get the price as follows

price(1,1) =2

price(1,2)=3

…

now I want to use these data as an input parameters that I specified them before as an initialprice and now I want to upgrade these initial price with these new results and then solve my model with them.

## could you please help me ?

regards

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/groups/opt_out.

\