|
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 [Help-glpk] cannot convert 1..720 to floatin-point number 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. |
[Prev in Thread] | Current Thread | [Next in Thread] |