Solvers and Study Steps > Solution Object Data > For, EndFor

For, EndFor
Add for loops to a solver sequence.
Syntax
model.sol("sol1").create("for1", "For");
model.sol("sol1").create("endfor1", "EndFor");
Description
model.sol("sol1").create("for1", "For") adds the start of a for loop.
model.sol("sol1").create("endfor1", "EndFor") adds the end of a for loop.
Use For and EndFor to enclose a sequence of solver commands that you want to iterate in a for loop. You can add more than one for loop, but they must be balanced so that each For ends with a corresponding EndFor.
You control the number of iterations in the loop using the following property: