runseeds#
- runseeds(model, count=30, log_output=True)#
Evaluate variability of a mixed-integer DOcplex model by solving with different random seeds.
This function is a wrapper around CPLEX’s runseeds procedure that reports variability statistics in the output log. Refer to the CPLEX user manual for more details about this functionality.
- Parameters:
- modeldocplex.mp.model.Model
DOcplex model.
- countint
The number of times to solve the model, by default 30 (same as CPLEX).
- log_outputTrue or str or stream object, optional
Log output switch, in one of the following forms:
Trueor'1'or'stdout'or'sys.stdout': Log is output to stdout.'stderr'or'sys.stderr': Log is output to stderr.File path (in form of str): Log is output to the file.
Stream object (a file-like object with a write method and a flush method): Log is output to the stream object.
Default is True.
- Raises:
- ValueError
If the DOcplex model is not mixed-integer (MILP, MIQP, MIQCP).
- ValueError
If count is not a positive number.