[Cmpl] Error
Oscar Augusto Téllez Sánchez
oskarts at gmail.com
Sun Jun 1 10:45:18 EDT 2014
Good day,
here is my problem… when i run my program this is the message
create model instance ...
error (compiler): file biomass.cmpl line 16: syntax error, unexpected ASSIGN_ITER, expecting ':'
error (compiler): file biomass.cmpl line 20: syntax error, unexpected ASSIGN_ITER, expecting ':'
error (compiler): file biomass.cmpl line 20: syntax error, unexpected '}', expecting end of file
CMPL model generation - failed
I am following the standard and i don´t know why is asking me to put (:) any idea how to solve it? (in bold are the referred lines)
thank you in advance ;) my code is below
Oscar
Program:
%data biomass-data.cdat : FARMS set, SIZE set, SP,TC,PC,CF[SIZE], Q[FARMS], K[SIZE],d[FARMS,FARMS], gamma[FARMS]
variables:
#Quantity of waste treated at plant i
X[FARMS]: real[0..];
#Quantity of waste send from farm j to plant i
XS[FARMS,FARMS]: real[0..];
#1 if plant i is installed with capacity k
Y[FARMS,SIZE]: binary;
#1 if we send waste from farm j to plant i
W[FARMS,FARMS]: real[0..];
objectives:
Profit: sum{i in FARMS: (SP-PC)* X[i] }
+ sum{i in FARMS, j in FARMS : TC * XS[i,j] * d[i,j]}
+ sum{i in FARMS, K in SIZE : Y[i,k] * CF[k] } ->max;
constraints:
#Maximum one plant per site
nPlants {i in FARMS : sum{k in SIZE: Y[i,K]} <= 1;}
#A farm can only send to one plant
exclusivity {i in FARMS : sum{j in FARMS: W[i,j]} = 1;}
#You can send to i only if there is a plant there
cond1 {i in < FARMS: sum{j in FARMS: W[i,j]} <= sum{k in SIZE: Y[i,K]};}
# Equivanlence between what is send (waste) and what is produce (methane)
equivalence {i in < FARMS: gamma[i]*X[i] = sum{j in SIZE: XS[i,j]};}
#Production capacity
ProductionCap {i in < FARMS: x[i] <= sum{k in SIZE: Y[i,K]*KP[K]};}
# you cannot send more than farm´s capacity
farmsCapacity {j in < FARMS: sum{i in FARMS: X[i,j]} <= sum{i in FARMS: W[i,j]*Q[j]};}
> _______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20140601/be37c010/attachment.html>
More information about the Cmpl
mailing list