You can assign initial values in a variable's definition, as in this
example:
var Buy {j in FOOD} := (buy_min[j] + buy_max[j]) / 2;
Or you can assign initial values in a data file in the same way that you
give values to parameters. Alternatively you can write an AMPL script to
compute initial values and assign them to variables using let statements. A
simple example would be
let {j in FOOD} Buy[j] := (buy_min[j] + buy_max[j]) / 2;
but you can have much more complex logic in a script.
Bob Fourer
4...@ampl.com
> -----Original Message-----
> From: am...@googlegroups.com [mailto:am...@googlegroups.com]
> On Behalf Of Feng
> Sent: Wednesday, July 27, 2011 4:29 PM
> To: AMPL Modeling Language
> Subject: [AMPL 4844] How do I specify an initial feasible solution for a
MIP
> problem in AMPL with Cplex as the solver?
>
> Is that possible?
>
> Thanks
>