Constraints and Cell References in Advanced Entry Mode

Specifying Constraints in Simple Entry Mode describes how you can create formulas in spreadsheet cells and then reference them when creating constraints. You can also use cell references in Advanced Entry mode to simplify constraint formulas.

  To do this in Advanced Entry mode:

  1. Enter a formula for the left side of the constraint into a spreadsheet cell. The example in Specifying Constraints in Simple Entry Mode has =SUM(C13:C16) entered into cell G13.

  2. Consider what to use for the right side of the formula. It can be a single value or a formula that resolves to a constant.

  3. Decide on the relationship between the left and right side: =, <=, >=.

  4. Run OptQuest and display the Constraints panel.

  5. With the cursor in a constraint formula edit box, click Insert Reference. Point to the cell with the left side of the formula and then click OK.

  6. Following the cell reference, type the relationship operator.

  7. Click Insert Reference again and point to the cell for the right side of the formula. Click OK again. Alternately, you can type a numeric value instead of using a cell reference

You can add additional constraints or other OptQuest settings and run the optimization when settings are complete.

For best results, avoid putting an entire formula, including operator, in a cell and then referencing that cell in a constraint formula that tests whether the formula is true or false. For example, suppose cell G6 contains =SUM(B2:E2) >= 10. You should avoid defining a constraint as G6 = TRUE. This method does not provide OptQuest with the information it needs to improve the solution.

Instead, you should break up the left-hand and right-hand parts of the equation and make sure the conditional operator (=, >=, <=) is entered in the constraints panel. In this example, cell G6 could contain =SUM(B2:E2) and the constraint could be written G6 >= 10.