Package cplex :: Package _internal :: Module _parameter_classes :: Class RootParameterGroup
[frames] | no frames]
 

Class RootParameterGroup


Class containing all the Cplex parameters.
Instance Methods
 
reset(self)
Sets the parameters in the group to their default values.
 
__repr__(self)
Return 'parameters'.
 
tune_problem_set(self, filenames, filetypes=None, fixed_parameters_and_values=None)
Tunes parameters for a set of problems.
 
tune_problem(self, fixed_parameters_and_values=None)
Tunes parameters for a Cplex problem.
 
read_file(self, filename)
Reads a set of parameters from the file filename.
 
write_file(self, filename)
Writes a set of parameters to the file filename.

Inherited from ParameterGroup: get_changed

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  tuning_status = TuningConstants()
Properties

Inherited from object: __class__

Method Details

reset(self)

 
Sets the parameters in the group to their default values.
Overrides: ParameterGroup.reset

__repr__(self)
(Representation operator)

 
Return 'parameters'.
Overrides: object.__repr__

tune_problem_set(self, filenames, filetypes=None, fixed_parameters_and_values=None)

 

Tunes parameters for a set of problems.

filenames must be a sequence of strings specifying a set of problems to tune.

If filetypes is given, it must be a sequence of the same length as filenames also consisting of strings that specify the types of the corresponding files.

If fixed_parameters_and_values is given, it may be either a ParameterSet instance or a sequence of sequences of length 2 containing instances of the Parameter class that are to be fixed during the tuning process and the values at which they are to be fixed.

tune_problem_set returns the status of the tuning procedure, which is an attribute of parameters.tuning_status.

>>> import cplex
>>> c = cplex.Cplex()
>>> out = c.set_results_stream(None)
>>> out = c.set_log_stream(None)
>>> ps = c.create_parameter_set()
>>> ps.add(c.parameters.lpmethod,
...        c.parameters.lpmethod.values.auto)
>>> status = c.parameters.tune_problem_set(
...     filenames=["lpex.mps", "example.mps"],
...     fixed_parameters_and_values=ps)
>>> c.parameters.tuning_status[status]
'completed'
>>> status = c.parameters.tune_problem_set(
...     filenames=["lpex.mps", "example.mps"],
...     fixed_parameters_and_values=[
...         (c.parameters.lpmethod,
...          c.parameters.lpmethod.values.auto)])
>>> c.parameters.tuning_status[status]
'completed'
>>> status = c.parameters.tune_problem_set(
...     filenames=["lpex.mps", "example.mps"])
>>> c.parameters.tuning_status[status]
'completed'

tune_problem(self, fixed_parameters_and_values=None)

 

Tunes parameters for a Cplex problem.

If fixed_parameters_and_values is given, it may be either a ParameterSet instance or a sequence of sequences of length 2 containing instances of the Parameter class that are to be fixed during the tuning process and the values at which they are to be fixed.

tune_problem returns the status of the tuning procedure, which is an attribute of parameters.tuning_status.

>>> import cplex
>>> c = cplex.Cplex()
>>> out = c.set_results_stream(None)
>>> ps = c.create_parameter_set()
>>> ps.add(c.parameters.lpmethod,
...        c.parameters.lpmethod.values.auto)
>>> status = c.parameters.tune_problem(ps)
>>> c.parameters.tuning_status[status]
'completed'
>>> status = c.parameters.tune_problem([
...     (c.parameters.lpmethod,
...      c.parameters.lpmethod.values.auto)])
>>> c.parameters.tuning_status[status]
'completed'
>>> status = c.parameters.tune_problem()
>>> c.parameters.tuning_status[status]
'completed'