[AMPL 2574] " n undefined in : 350/delay[j,n]

View: New views
2 Messages — Rating Filter:   Alert me  

[AMPL 2574] " n undefined in : 350/delay[j,n]

by Sunday Idowu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Please help!

set CDN;

set OBJ;

set NTWK;

 

#Parameters for delay and bandwidth

 

param delay {CDN, NTWK} > 0;                                                  #parameters for network delay in serving an object from CDN j to a client in a network n

param bwidth {CDN,NTWK} > 0;                                                                #agreed upon bandwidth for the serving of an object from  CDN j to a client in network n

 

 

 

#Decision variables

 

var X{CDN,NTWK,OBJ} >=0;                                                         #the decision variable that indicate that whether a CDN serves a request or not, but in this case it relaxed

 

#Objectives#

 

minimize service_cost:

                                sum{i in OBJ, j in CDN, n in NTWK}unit_cost[j,i,n]*rate[j,i]*X[j,i,n];

                               

#Constraints#

                subject to bdelay {j in CDN}: sum{i in OBJ, n in NTWK}rate[j,i]*size[i]* (bwidth[j,n]/delay[j,n])*X[j,i,n] >= 350/(delay[j,n]*sum{i in OBJ,n in NTWK}rate[j,i]);

               

               


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---


[AMPL 2575] Re: " n undefined in : 350/delay[j,n]

by Paul A. Rubin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Jun 4, 4:49 am, "Sunday Idowu" <saidow...@...> wrote:

> 350/(delay[j,n]*sum{i in OBJ,n in NTWK}rate[j,i]);

delay[j,n] is outside the summation, so AMPL is expecting n to be a
defined parameter.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---