Search code examples
c++apioptimizationinitializationampl

AMPL API C++ - How to set initial guess for variables?


I am using AMPL API for C++ which takes AMPL mod file as input. I want to set initial guess for each variable in AMPL mode file, but I am not sure how to do that. Can anyone help me with that?

Thanks in advance!!


Solution

  • To set an initial guess, you just need to assign values to variables with methods such as Variable::setValue.