[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [help] syntax error in data section? anyone can help?
From: |
jhihll |
Subject: |
[Help-glpk] [help] syntax error in data section? anyone can help? |
Date: |
Sat, 20 Jun 2009 14:24:19 +0300 |
i am a beginner to use glpk, when load my .mod file, system always alerts me
syntax error in data section?
anyone could help me solve this problem? 3ks a lot!!!
/*sets*/
set PHOTON;
set ELECTRON;
/*parameters*/
param Target{i in PHOTON};
param d{j in ELECTRON};
param hclustter {i in PHOTON, j in ELECTRON};
param unity{i in PHOTON};
/* decision variables*/
var p{i in PHOTON} >= 0;
/* objective function */
maximize delta: sum{i in PHOTON} Target[i]*p[i];
/* Constraints */
s.t. const{j in ELECTRON} : sum{i in PHOTON} hclustter[i,j]*p[i] =
d[j];
s.t. ones: sum{i in PHOTON} unity[i]*p[i] = 1;
/* data section */
data;
set PHOTON := a0 a1 a2 a3 a4 a5 a6 a7 a8 a9;
set ELECTRON := b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ;
param Target:= a0 1
a1 1
a2 1
a3 0
a4 0
a5 0
a6 0
a7 0
a8 0
a9 0;
param d:= b0 0.449329014183911
b1 0.359463211346714
b2 0.143785284531211
b3 0.0383427424619296
b4 0.00766854793429913
b5 0.00122696499067122
b6 0.000163586402700703
b7 1.86751788485518E-05
b8 1.83690283756247E-06
b9 1.3606687685648E-07;
param hclustter: b0 b1 b2 b3 b4 b5 b6 b7 b8 b9:=
a0 1 0 0 0 0 0 0 0 0 0
a1 0.2 0.8 0 0 0 0 0 0 0 0
a2 0.04 0.32 0.64 0 0 0 0 0 0 0
a3 0.008 0.096 0.384 0.512 0 0 0 0 0 0
a4 0.0016 0.0256 0.1536 0.4096 0.4096 0 0 0 0 0
a5 0.00032 0.00639999999999999 0.0512 0.2048 0.4096 0.32768 0 0 0 0
a6 6.39999999999999E-05 0.001536 0.01536 0.08192 0.24576 0.393216 0.262144
0 0 0
a7 1.28E-05 0.0003584 0.0043008 0.028672 0.114688 0.2752512 0.3670016
0.2097152 0 0
a8 2.56E-06 8.19199999999999E-05 0.00114688 0.00917503999999999 0.0458752
0.14680064 0.29360128 0.33554432 0.16777216 0
a9 5.11999999999999E-07 1.8432E-05 0.000294912 0.002752512 0.016515072
0.066060288 0.176160768 0.301989888 0.301989888 0.134217728;
param unity:= 1
1
1
1
1
1
1
1
1
1;
ends;
--
View this message in context:
http://www.nabble.com/-help---syntax-error-in-data-section---anyone-can-help--tp24123062p24123062.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
- [Help-glpk] [help] syntax error in data section? anyone can help?,
jhihll <=