Initializing help system before first use

# problem.setControl

Purpose
Sets one or more controls of a problem or objective.
Synopsis
`problem.setControl(control, value, objidx=None)`
`problem.setControl(dict, objidx=None)`
Arguments

control | Name or numeric id of the control whose value to change. If the objidx argument is provided, the control can be either a solver control or one of the following objective controls:
priority | the priority of the objective
weight | the weight of the objective
reltol | the relative tolerance of the objective
abstol | the absolute tolerance of the objective
rhs | the constant part of the objective
value | Value to which to set the control.
dict | A dictionary mapping names or numeric ids of controls to values to which to set them.
objidx | (optional) Index of the objective whose control to modify.

Example

    p = xpress.problem()
    p.setControl('miprelstop', 1e-4)
    p.setControl({'feastol': 1e-4, 'presolve': 0})

Further information
1. As mentioned in the previous chapter, there is an alternative way to set and retrieve controls. It works by querying the data structure controls of each problem or, if one wants to set a control to be used by all problems defined subsequently, the global control object xpress.controls.
2. This function can be used in two ways depending on whether one wants to set one or more controls. In the first case, the arguments form a pair (string, value) where the first element is the lower-case name of a control (see the Xpress Optimizer reference manual for a complete list of controls). In the second case, the argument is a Python dictionary whose keys are control name string and whose values are the value of the control. Instead of control names it is also possible to use their numeric ids.
Related topics
problem.getControl.
Parent Topic Xpress problem object methods

© 2001-2026 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.