PaulRubin 270002PQ1162 Posts
Re: how to programme an objective function and constraints2013-05-20T22:17:04ZThis is the accepted answer. This is the accepted answer.
First, when you say "write these two in CPLEX", do you mean in OPL (the modeling language that ships with the IDE), or do you mean write them in a form that you can type into the interactive optimizer, or do you mean write them in C/C++/Java/Python/MATLAB using the Concert interface? (I'm guessing you meant OPL, but the question is ambiguous, as CPLEX is not a language.)
Second, which symbols are variables and which are parameters?
Third, which if any variables are restricted to integers (may make a difference in how the constraint is written)?