Originally posted by: SystemAdmin
[prubin said:]
The interactive optimizer does not understand subscripting. If you are typing the problem in, you need to substitute integers for subscripts as you type. So you enter
c1: Y111 + Z11 - X11 = 0
c2: Y121 + Z11 - X11 = 0
etc.
(Incidentally, you might want to reconsider that particular set of constraints: it forces Yi,j,t to equal Yi,k,t.)
Presumably you do not want to mess with all this yourself, so you might want to consider either (a) writing a program that expands your model and outputs it in either LP or MPS format, which you can then read into CPLEX or (b) use a modeling language (AMPL, GAMS, Mosel, OPL, MPL, ZIMPL, GMPL, ...) to convert your algebraic model to LP or MPS format and read it into CPLEX. The first n-2 of those are commercial products, although I think there are free student versions (limited capacity) for some if not all of them. ZIMPL and GMPL (part of GLPK) are open-source. I think both implement a subset of the AMPL language.
/Paul
#CPLEXOptimizers#DecisionOptimization