Initializing help system before first use

Partial integer variables

  • In general, try to keep the upper bound on integer variables as small as possible. This reduces the number of possible integer values, and so reduces the time to solve the problem.
  • Sometimes this is not possible – a variable has a large upper bound and must take integer values.
    ⇒ Try to use partial integer variables instead of integer variables with a very large upper bound: takes integer values for small values, where it is important to be precise, but takes real values for larger values, where it is OK to round the value afterwards.
  • For example, it may be important to clarify whether the value is 0, 1, 2, ..., 10, but above 10 it is OK to get a real value and round it.
  • Mosel:
  • x is_partint 10        ! x is integer valued from 0 to 10
    x <= 20                ! x takes real values from 10 to 20
  • BCL:
  • x = prob.newVar("x", XPRB_PI, 0, 20);
    x.setLim(10);