help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] cannot convert 1..720 to floatin-point number


From: Meketon, Marc
Subject: Re: [Help-glpk] cannot convert 1..720 to floatin-point number
Date: Tue, 3 Jul 2012 06:48:49 -0500

The issue is that set’s contain objects (like numbers, strings, other sets).  They are not considered as really having numeric entries.  But param’s do.  So the trick is to create a param array that translates the object in the set to the numeric value.

 

Try (look for the red bold where the param array tt is used):

 

param tmax;

set T:= 1..tmax;

param tt{t in T} := t;

 

subject to PrecTemp{i in A,j in A}: sum{t in T} tt[t]*x[j,t] >= sum{t in T} tt[t]*x[i,t] + d[i] ;

 

data;

param tmax := 720;

end;

 

From: help-glpk-bounces+address@hidden [mailto:help-glpk-bounces+address@hidden On Behalf Of Daniele Micarelli
Sent: Tuesday, July 03, 2012 7:38 AM
To: address@hidden; address@hidden; address@hidden; address@hidden
Subject: [Help-glpk] cannot convert 1..720 to floatin-point number

 

 [Help-glpk] cannot convert 1..720 to floatin-point number

tried the recommended changes, but nothing to do

the error "cannot convert 1..720 to floatin-point number" occurs in the bond "subject to PrecTemp{i in A,j in A}: sum{t in T} t*x[j,t] >= sum{t in T} t*x[i,t] + d[i] ;  /* vincolo precedenze temporali */ "

x[i,t] is the variable
d[i] is the numeric parameter

thank yuo very much



This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]