Changelog¶
All notable changes to pycsp3-scheduling will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.4.0] - 2026-01-23¶
Added¶
Bounds Constraints:
release_date,deadline,time_windowConvenience constraints for setting time bounds on intervals
release_date(interval, time)- interval cannot start before given timedeadline(interval, time)- interval must complete by given timetime_window(interval, earliest_start, latest_end)- combined release + deadlineProperly handles optional intervals with presence escape clauses
State Helpers:
requires_state,sets_stateConvenience functions for working with state functions
requires_state(interval, state_func, state)- interval requires specific state (simpler API for always_equal)sets_state(interval, state_func, before_state, after_state)- interval transitions state
IntervalVar Comparison Operators
interval >= time- shorthand forrelease_date(interval, time)interval <= time- shorthand fordeadline(interval, time)interval > time- strict release (start > time)interval < time- strict deadline (end < time)Works in list comprehensions:
satisfy(t >= 0 for t in tasks)
Changed¶
Consolidated internal validation functions into
_pycsp3.pyto reduce code duplicationTest files renamed to follow module-based naming convention
[0.3.0] - 2026-01-21¶
Renamed
type_of_next/type_of_prevtonext_arg/prev_arg(old names still work as aliases)Forbidden Time Constraints:
forbid_start,forbid_end,forbid_extentPrevent intervals from starting, ending, or spanning during specific time periods
Presence Constraints:
presence_implies,presence_or,presence_xorExpress logical relationships between optional interval presence
Group Presence Constraints:
all_present_or_all_absent,presence_or_all,if_present_thenHandle all-or-nothing groups and conditional constraints
Cardinality Constraints:
at_least_k_present,at_most_k_present,exactly_k_presentControl how many optional intervals must be present
Chain Constraints:
chain,strict_chainEnforce sequential execution with optional delays
Overlap Constraints:
must_overlap,overlap_at_leastRequire intervals to share time or overlap by minimum duration
Disjunctive Constraint:
disjunctiveUnary resource constraint (at most one interval active at a time)
No-Overlap Pairwise:
no_overlap_pairwiseSimple pairwise no-overlap without sequence variable overhead
Aggregate Expressions:
count_present,earliest_start,latest_end,span_length,makespanAggregate expressions over interval collections for constraints and objectives
Updated documentation
[0.1.7] - 2026-01-05¶
Fixed VRPTW example notebook with distance minimization objective
Updated documentation for ElementMatrix and type_of_next/prev
Complete SeqNoOverlap support with transition matrix
[0.1.6] - 2026-01-04¶
Added¶
ElementMatrix class for 2D array indexing with expressions
Supports indexing with pycsp3 variables (like CP Optimizer’s
IloNumArray2)Built-in
last_valueandabsent_valuefor boundary casesProperties:
last_type,absent_typefor column indicesget_value()method for debugging/constant access
next_arg / prev_arg (formerly
type_of_next/type_of_prev) now return pycsp3 variablesReturns the ID of the next/previous interval in a sequence (similar to pycsp3’s
maximum_arg)Can be used directly in
ElementMatrixindexingEnables CP Optimizer-style distance objectives:
M[id_i, next_arg(route, interval, last_value, absent_value)]
element() and element2d() helper functions
Array indexing with variable indices
Fixed¶
XCSP3 variable ID naming (must start with letter, not underscore)
Fixed prefixes:
tonext,toprev,tm,elem,elem2d
Changed¶
VRPTW example updated to use
ElementMatrix+next_argfor distance objectiveVRPTW notebooks updated with working distance minimization
[0.1.5] - 2026-01-04¶
Added ElementMatrix expression for 2D array indexing
Add vrptw example
[0.1.4] - 2026-01-03¶
Added Visualization module and statistics functions
[0.1.2] - 2026-01-03¶
IntervalVarintensity functions with granularity scaling
[0.1.0] - 2026-01-01¶
Added¶
Core Variable Types
IntervalVarclass for representing tasks/activitiesSequenceVarclass for ordered sequences on disjunctive resourcesIntervalVarArrayandIntervalVarDictfactory functionsSequenceVarArrayfactory function
Expression Functions
start_of(),end_of(),size_of(),length_of(),presence_of()overlap_length()for computing interval overlapexpr_min(),expr_max()utility functionsSequence accessors:
start_of_next(),end_of_prev(), etc.
Precedence Constraints
Before constraints:
end_before_start(),start_before_start(), etc.At constraints:
start_at_start(),end_at_end(), etc.Support for delay parameter
Grouping Constraints
span()- main interval spans sub-intervalsalternative()- select from alternative intervalssynchronize()- synchronize intervals with a main interval
Sequence Constraints
SeqNoOverlap()with optional transition matrixOrdering:
first(),last(),before(),previous()Consistency:
same_sequence(),same_common_subsequence()
Cumulative Functions
CumulFunctionclass for resource consumption modelingElementary functions:
pulse(),step_at(),step_at_start(),step_at_end()Constraints:
cumul_range(),always_in()for cumulativeAccessors:
height_at_start(),height_at_end()
State Functions
StateFunctionclass for discrete resource statesTransitionMatrixfor state transition timesConstraints:
always_equal(),always_constant(),always_no_state()
Interop Helpers
start_time(),end_time()for pycsp3 integrationpresence_time()for optional interval handlinginterval_value()for extracting solution valuesIntervalValuefor attribute/dict-style interval resultsmodel_statistics()andsolution_statistics()for model/solve stats
Examples
Job Shop Scheduling
Flow Shop Scheduling
Open Shop Scheduling
Flexible Job Shop
RCPSP and variants (MRCPSP, CyclicRCPSP, MSPSP)
Aircraft Landing
Employee Scheduling
Notes¶
First public release
Requires Python >= 3.10
Requires pycsp3 >= 2.5