Initializing help system before first use

setinitval

Purpose
Set an initial value (start value) for a variable.
Synopsis
procedure setinitval(x:mpvar, val:real)
Arguments
A decision variable
val 
A real number to be used as initial value
Example
The following sets an initial value of 0 for variable x. For y its solution from the preceding optimization is set as its new initial value.
uses "mmnl"
declarations
 x,y: mpvar
end-declarations
setinitval(x, 0)
setinitval(y, getsol(y))
Further information
This procedure sets an initial value for a decision variable. Initial values are used by nonlinear solvers as a (good) starting point for the search. It is in general not required that the initial values be part of a feasible solution to the optimization problem. All previously set initial values can be removed by calling clearinitvals. The procedure copysoltoinit can be used to turn the solution of a previous optimization run into initial values for the next run.
Related topics
Module

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.