docplex.cp reference manual¶
- Module docplex.cp.model
- Module docplex.cp.expression
- Detailed description
CpoAlias
CpoBoolVar
CpoExpr
CpoFloatVar
CpoFunctionCall
CpoIntVar
CpoIntervalVar
CpoSequenceVar
CpoStateFunction
CpoTransitionMatrix
CpoValue
CpoVariable
DEFAULT_INTEGER_VARIABLE_DOMAIN
DEFAULT_INTERVAL
INFINITY
INTERVAL_MAX
INTERVAL_MIN
INT_MAX
INT_MIN
IntegerDomain
NEGATIVE_INFINITY
POSITIVE_INFINITY
binary_var()
binary_var_dict()
binary_var_list()
build_cpo_expr()
build_cpo_expr_array()
build_cpo_transition_matrix()
build_cpo_tupleset()
compare_expressions()
get_domain_max()
get_domain_min()
get_node_count()
integer_var()
integer_var_dict()
integer_var_list()
interval_var()
interval_var_dict()
interval_var_list()
is_cpo_expr()
pretty_print()
sequence_var()
state_function()
transition_matrix()
tuple_set()
- Module docplex.cp.modeler
- Core CP modeling functions
- Scheduling functions
- Search phases
- Detailed description
abs()
abs_of()
abstraction()
all()
all_diff()
all_min_distance()
all_of()
allowed_assignments()
alternative()
always_constant()
always_equal()
always_in()
always_no_state()
any()
any_of()
before()
bool_abstraction()
ceil()
conditional()
constant()
coordinate_piecewise_linear()
count()
count_different()
cumul_range()
diff()
distribute()
domain_max()
domain_min()
domain_size()
element()
end_at_end()
end_at_start()
end_before_end()
end_before_start()
end_eval()
end_of()
end_of_next()
end_of_prev()
equal()
explicit_value_eval()
explicit_var_eval()
exponent()
false()
first()
float_div()
floor()
forbid_end()
forbid_extent()
forbid_start()
forbidden_assignments()
greater()
greater_or_equal()
height_at_end()
height_at_start()
if_then()
impact_of_last_branch()
in_range()
inferred()
int_div()
inverse()
isomorphism()
last()
length_eval()
length_of()
length_of_next()
length_of_prev()
less()
less_or_equal()
lexicographic()
log()
logical_and()
logical_not()
logical_or()
max()
max_of()
maximize()
maximize_static_lex()
member()
min()
min_of()
minimize()
minimize_static_lex()
minus()
mod()
no_overlap()
overlap_length()
pack()
plus()
power()
presence_of()
previous()
pulse()
range()
round()
same_common_subsequence()
same_sequence()
scal_prod()
search_phase()
select_largest()
select_random_value()
select_random_var()
select_smallest()
sequence()
sgn()
size_eval()
size_of()
size_of_next()
size_of_prev()
slope_piecewise_linear()
span()
square()
standard_deviation()
start_at_end()
start_at_start()
start_before_end()
start_before_start()
start_eval()
start_of()
start_of_next()
start_of_prev()
step_at()
step_at_end()
step_at_start()
strict_lexicographic()
strong()
sub_circuit()
sum()
sum_of()
synchronize()
times()
true()
trunc()
type_of_next()
type_of_prev()
value()
value_impact()
value_index()
value_success_rate()
var_impact()
var_index()
var_local_impact()
var_success_rate()
- Module docplex.cp.function
- Module docplex.cp.parameters
- Module docplex.cp.solution
- Module docplex.cp.config
- Module docplex.cp.solver.solver
- Module docplex.cp.solver.solver_listener
- Module docplex.cp.solver.cpo_callback
- Module docplex.cp.blackbox
- Module docplex.cp.fzn.fzn_parser
- Module docplex.cp.utils
Barrier
Chrono
Context
CpoException
CpoNotSupportedException
FunctionCache
IdAllocator
IdentityAccessor
InfoDict
KeyIdDict
ListDict
ObjectCache
ObjectCacheById
PersistentContext
SafeIdAllocator
TextFileLineReader
assert_arg_int_interval()
check_default()
compare_natural()
create_stdout_logger()
decode_integer_big_endian_4()
encode_csv_string()
encode_integer_big_endian_4()
equals()
format_text()
get_file_name_only()
get_main_file()
get_module_element_from_path()
get_module_version()
get_system_path()
int_to_base()
is_array()
is_array_of_type()
is_bool()
is_exe_file()
is_float()
is_in()
is_in_notebook()
is_int()
is_int_array()
is_int_value()
is_iterable()
is_number()
is_panda_series()
is_string()
is_symbol()
is_symbol_char()
is_tuple()
list_module_public_functions()
make_directories()
make_unicode()
open_utf8()
parse_json_string()
read_string_file()
replace()
replace_in_tuple()
search_exec_file()
string_to_value()
to_compact_SI()
to_internal_string()
to_printable_id()
to_printable_string()
to_string()
write_checking_unicode_errors()
write_string_file()
- Module docplex.cp.utils_visu
- Module docplex.util.environment
AbstractLocalEnvironment
Environment
LocalEnvironment
NotAvailableError
OutputAttachmentTransaction
OverrideEnvironment
SolveDetailsFilter
add_abort_callback()
default_solution_storage_handler()
get_available_core_count()
get_environment()
get_input_stream()
get_output_stream()
get_parameter()
make_attachment_name()
maketrans()
read_df()
remove_abort_callback()
set_output_attachment()
set_output_attachments()
translate()
update_solve_details()
write_df()
The following Python modules are provided in the package docplex.cp:
This module implements the object CpoModel which groups a collection of docplex.cp expressions into a single model before the model is submitted for solving. This module is the only module that needs to be imported before writing a model, as it imports all other necessary modules in order to make their features available (CpoExpression, CpoModeler, CpoFunction, CpoParameters).
This module is automatically imported when CpoModeler is imported. It provides the various atomic expression elements manipulated by DOcplex.CP:
integer variables,
interval variables,
transition matrices,
tuple sets, and
state functions.
It also defines a set of methods that simplify the creation of these expressions.
This module contains a list of methods that construct all possible model expressions from other model expressions. There is one method for each operation, each with possible multiple ways to call it.
This module is dedicated to the particular case of function expressions:
segmented functions and
step functions.
It also contains many operators for manipulating these functions before adding them to a model.
This module contains the definition of the various solving parameters that can be associated with a model in order to to configure the solve. The list of possible values is also given.
This module contains the objects that represent a solution of the model when solved. The root object CpoSolveResult manages a set of solution objects for each variable element of the model.
This module contains the definition of most important configuration parameters with their assignment to appropriate default value.
This module contains the abstraction of what is a solver of CPO models. It is usually not directly visible as long as solving is requested by calling method solve() on the model, but is is required when advanced functions are required.
This module contains the definition of a solver listener that allows to be informed of the different solving steps. It also provides the implementation of some default useful listeners.
This module contains miscellaneous utility classes and methods that are used by other modules of docplex.cp.
This module is a add-on to matplotlib for easy display of CP Optimizer scheduling solutions and structures.
This module handles the different elements that allow to execute the same optimization program independently from the solving environment. This environment may be:
on premise, using a local version of CPLEX Optimization Studio,
on DOcplexcloud, the python program running inside the Python Worker,
As far as possible, the adaptation to the execution environment is done automatically.