[Cmpl] Problem with "unexpected SYMBOL_VAR"

Paolo Grossi smoldino at gmail.com
Fri May 6 05:44:17 EDT 2016


Good morning,
We are working on a University of Pisa project.
First of all, we are dealing with CMPL model.
So, thanks in advance for your help!

Using:
http://cmpl.th-wildau.de/cmpl-net.php

To try few very basic examples, like the following:

########################################

parameters:

Nodes := set(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
bal[Nodes] := (-397.57, 136.639, 0, 137.667, 123.265, 0, 0, 0, 0, 0);
v[Nodes] := (9999999999, 200000, 200000, 200000, 200000, 200000, 200000,
200000, 200000, 200000);
Arcs := set([1, 5], [3, 7], [4, 8], [2, 5], [6, 8], [9, 8], [0, 2], [0, 5],
            [5, 1], [7, 3], [8, 4], [5, 2], [8, 6], [8, 9], [2, 0], [5, 0]);
f[Arcs] := (42314, 22802.8, 58790.7, 11875.2, 93940, 58777.3, 114089,
121121,
            42314, 22802.8, 58790.7, 11875.2, 93940, 58777.3, 114089,
121121);
B := 100;
k := 4;

variables:

x[Nodes,Nodes] : binary;
o[Nodes]: binary;
b[Arcs] : real[0..B];

objectives:

costs: sum{[w,s] in Arcs: x[w,s]*f[w,s]} + sum{w in Nodes: o[w]*v[w]} ->
min;

constraints:

csnt_1 {w in Nodes : sum{s in Nodes, s != w: x[w,s]} <= 2 + o[w]*(k-2); }
csnt_2 {w in Nodes : sum{s in Arcs *> b[w,*] : b[w,s]}
                   - sum{s in Arcs *> b[*,w] : b[s,w]} = bal[w]; }
csnt_3 {[w,s] in Arcs: b[w,s] + b[s,w] <= B*x[w,s]; }

########################################

We receive this error regarding the flow conservation constraints (named as
"csnt_2"):

error (compiler): file clp-5574.cmpl line 26: syntax error, unexpected
SYMBOL_VAR

Best regards,
Paolo Grossi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20160506/40294382/attachment.html>


More information about the Cmpl mailing list