[SCIP] reading in indexed sets with ZIMPL
James Cussens
james.cussens at york.ac.uk
Mon Jul 4 12:08:09 CEST 2016
I am having trouble reading in indexed sets with ZIMPL. The following ZIMPL
input:
STARTS
set Q := { <"ab",1,2>, <"bc",2,3>, <"de",4,5> };
#set cost[Q] := { read "haha.txt" as "<3s,1n,2n> 4s" };
param cost[Q] := read "haha.txt" as "<3s,1n,2n> 4s" ;
ENDS
works fine with these 3 lines in haha.txt:
1:2:ab:con1
2:3:bc:con2
4:5:de:con3
So all is well with an indexed parameter. But when I uncomment the set
definition line (and comment out the param one) I get:
****************************************************
* Zuse Institute Mathematical Programming Language *
* Release 3.3.3 Copyright (C)2012 by Thorsten Koch *
****************************************************
* This is free software and you are welcome to *
* redistribute it under certain conditions *
* ZIMPL comes with ABSOLUTELY NO WARRANTY *
****************************************************
Reading test.zpl
Reading haha.txt
*** Error 214: Wrong type of set elements -- wrong read template?
*** File: test.zpl Line 3
*** set cost[Q] := { read "haha.txt" as "<3s,1n,2n> 4s" };
*** ^^^
I notice that none of the examples in the ZIMPL manual involve reading in
indexed sets.
Any help gratefully received!
James
--
James Cussens
Dept of Computer Science &
York Centre for Complex Systems Analysis
Room 326, The Hub, Deramore Lane Tel +44 (0)1904 325371
University of York Fax +44 (0)1904
500159
York YO10 5GE, UK http://www.cs.york.ac.uk/~jc
http://www.york.ac.uk/docs/disclaimer/email.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160704/14c655f4/attachment.html>
More information about the Scip
mailing list