Recent Releases of Choco-solver

Choco-solver - 5.0.0-beta.1

5.0.0-beta.1 - 17 Feb 2025

Major features:

This version introduces CP-SAT in Choco-solver which replaces the previous explanation framework. The Lazy Clause Generation (LCG) is a technique that allows the solver to generate clauses during search. The current implementation is inspired by Chuffed and "Lazy Clause Generation Reengineered" - Feydy, T., Stuckey, P.J. (2009). This new version has necessitated a rather intrusive revision of the way propagators filter.

By default, LCG is not enabled. The following code shows how to enable it: java Model model = new Model(Settings.init().setLCG(true));

At this stage, this is a beta version. First, only integer and boolean variables are supported. Second, some constraints are explained with dedicated functions and others are decomposed into explained ones. More importantly, others are neither explained nor decomposed (for the moment). In the latter case, an exception is raised to inform the user of the situation.

Other closed issues and pull requests:

See milestone 5.0.0

Contributors to this release:

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 1 year ago

Choco-solver - v4.10.18

4.10.18 - 27 Jan 2025

Major features:

  • Fix unexpected behaviour when using neg() intvar in arithm #1115
  • Fix bin packing initial propagation (#1113)
  • Fixed an error in increasing constraint documentation and updated decreasing constraint documentation (#1103)

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.17...v4.10.18

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 1 year ago

Choco-solver - v4.10.17

4.10.17 - 23 Sep 2024

Hotfix

  • Fix bug in PropHybridTable (#1102)

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.16...v4.10.17

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 1 year ago

Choco-solver - v4.10.16

4.10.16 - 12 Sep 2024

Hotfix

  • Fix bug in IntAffineView (#1101)

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.15...v4.10.16

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 1 year ago

Choco-solver - v4.10.15

4.10.15 - 09 Sep 2024

Major features:

  • Add PickOnDom and variants (see Search.pickOnDom)
  • Enhance MiniZinc output
  • Revamp scripts to solver flatzinc files
  • Fix bugs (see closed issues)

Other closed issues and pull requests:

See milestone 4.10.15

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.14...v4.10.15

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 1 year ago

Choco-solver - v4.10.14

4.10.14 - 02 Nov 2023

Major features:

  • NEW: solver..showRestarts(); to display the number of restarts during the search.
  • NEW: hybrid table constraints (see model.table(...))
  • NEW: partial assignement generator for COP (see Search.generatePartialAssignment())
  • NEW: Add Blackbox configuration (#1058)
  • Revamp views (#564)
  • Improve pow(base, exponent, result)
  • Remove BitsetArrayIntVarImpl now managed in BitSetIntVarImpl

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

See milestone 4.10.14

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.13...v4.10.14

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 2 years ago

Choco-solver - v4.10.13

4.10.13 - 05 Jun 2023

Major features:

Mainly bug fixes and improvements of Pareto front performances.

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

See milestone 4.10.13

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.12...v4.10.13

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 3 years ago

Choco-solver - v4.10.12

4.10.12 - 06 Mar 2023

Major features:

  • Fix bugs #1006, #1011 and #1014

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

See milestone 4.10.12

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/v4.10.11...v4.10.12

Scientific Software - Peer-reviewed - Java
Published by cprudhom about 3 years ago

Choco-solver - v4.10.11

4.10.11 - 07 Feb 2023

From this version on, only one library will be available for direct download, namely choco-solver-4.10.11. This library contains both the core (a.k.a, choco-solver module) and the extension for parsing model files (a.k.a, choco-parsers). However, it is still possible (and recommended) to use Maven.

Major features:

  • Correcting the lack of filtering in PropIncreasing
  • Change the SetType for the undirected graph stored in DiffN for efficiency reason
  • SparseBitSet for a backtrackable bitset with mostly 0s (#935)
  • Change the way restarting works: not a Move anymore, directly included in Solver (#950)
  • Simplification of objective manager (#949)
  • Calling getValue() on an uninstantiated variable throws an IllegalStateException (#957)
  • Change the MiniZinc complementary search to a FirstFail (instead of DomOverWDeg) (#958)
  • Reduce object creation during solving (#985)
  • Reduce object creation during propagation (#969)
  • Reduce memory footprint of Model (#964)
  • Add model.getEstimatedMemory() method
  • Add Model analysis (#939)
  • Add log file as RegParser option (for parsers)
  • creation of PropPower propagators with exponent as int

Deprecated API (to be removed in next release):

From Solver: - Propagate getPropagate() - void setPropagate(Propagate p) - Closeable outputSearchTreeToCPProfiler(boolean domain)

Others: - Propagate class - IntEventType: int combine(IntEventType... evts)

Other closed issues and pull requests:

See milestone 4.10.11

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.10...v4.10.11

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 3 years ago

Choco-solver - v4.10.10

4.10.10 - 11 Oct 2022

Major features:

  • Fix performance issue of ViewDeltaMonitor
  • Fix lack of filtering in STR2+ when domain is bounded
  • Fix issue relative to OR and AND in LogOp
  • Add missing checks in OneWordS32BitSet and OneWordS64BitSet + update constructors
  • Add new API to VariableUtils
  • Add CITATION.cff
  • Update paper.md

Other closed issues and pull requests:

See milestone 4.10.10

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.9...v4.10.10

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 3 years ago

Choco-solver - 4.10.9

4.10.9 - 22 Aug 2022

Major features:

  • It is now possible to declare hints to help the search finding a first solution. See solver.addHint(var, val).
  • Add Solver.tableSampling resolution policy which returns a stream of Solution randomly sampled.
  • Add increasing and decreasing constraints
  • Add costFlow constraint, which is composed of scalar products and a MinCostMaxFlow propagator
  • Revamp pow constraint
  • Add threshold for element with array of variables signature
  • Add a propagator for 0/1-knapsack (thanks to @PoltyPoltou)
  • Remove CPProfiler since the project is not active anymore.
  • Make possible to deal with large domains for some constraints (#894)
  • Add a LinearProgram class to deal with linear program (!) and a two-phase Simplex (not connected yet)
  • Fix bug related to delta in boolean views
  • Improvements relative to reified propagators
  • Change signature of AtLeastNValues
  • Record time to best in Measures(IMeasures measures) constructor

Change the way propagators are stored in variables to ease swapping (#889)

Each variable is in charge of scheduling its propagators. This impacts the way propagators are stored in a variable. Consequently, the getPropagators() and getPropagator(int) methods are deprecated, streamPropagators() replaces them. Unless otherwise stated, a propagator that can be entailed is automatically swapped in its variables' internal structure.

SetVar

  • Extend some black-box strategies to SetVar
  • Add union(SetVar unionSet, SetVar indices, SetVar[] sets) constraint
  • Add free strategy for SetVar (RegParser and ParallelPortfolio)
  • Fix SetVar#getDomainSize
  • Add SetDomainMax
  • Add 'setLe' and 'setLt' constraint (as a decomposition) in ISetConstraintFactory

Flatzinc, XCSP3 and MPS

  • Change default search of Flatzinc
  • Increase interval for Flatzinc unbounded intvar
  • Remove default ANSI in parsers
  • Update FZN grammar to deal with 'set of int'
  • Flatzinc: deal with warm_start
  • Add ignored search annotation warning in FGoal
  • Update XCSPParser + add model.amongDec

JAR Files

Since 4.10.9, a new jar file is available for download. This is a lighter version of the one with dependencies, namely choco-parsers-light-VERSION.jar. The following dependencies have been excluded from this archive: - org.apache.pdfbox:pdfbox - org.apache.fontbox:fontbox - com.ibm.icu:icu4j

This results in 82% smaller archive. Note that the non-alleged versions are still available for download.

Deprecated API (to be removed in next release):

  • IOutputFactory.outputSearchTreeToCPProfiler(boolean domain)

Other closed issues and pull requests:

See milestone 4.10.9

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.8...v4.10.9

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 4 years ago

Choco-solver - 4.10.8

4.10.8 - 07 Jan 2022

Major features:

  • Propagation is now observable, solver.observePropagation(PropagationObserver). Consequently, it is now possible to profil the propagation by calling solver.profilePropagation(). See Javadoc for details and usages (#832).
  • Release 4.10.7 introduces a bug related to delta monitors, which is now fixed (#837).
  • Add new black-box strategy: failure based variable ordering heuristics (@lihb905)
  • Add model.streamVars() and model.streamCstrs()
  • Bounded domains checking for table constraints
  • Change complementary search in FlatZincParser
  • Bump XCSP3

Other closed issues and pull requests:

See milestone 4.10.8

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.7...v4.10.8

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 4 years ago

Choco-solver - 4.10.7

4.10.7 - 11 Oct 2021

Major features:

  • Simplify the way deltamonitors work. There is no need to freeze and unfreeze them before calling forEach... methods. But, a call to forEach... consumes all values stored.
  • Fix a bug related to incremental propagators, views and missing events.
  • STR2+ now deals with STAR tuples. Can be used when CT+ is not efficient (mainly due to very large domain size)
  • Resetting cutoff strategies now possible
  • Change restart behavior to reset cutoff on solutions (can be disabled though, calling solver.setRestarts(..) API).
  • Display occurrences of variable types and occurrences of propagator types
  • Now IntDomainBest offers API to break ties (see Search.ValH.BLAST for an example).
  • Add solver.defaultSolution() which creates lazily a solution recording everything, plugs it and returns it. This is helpful when a Solution object is required in many places.
  • Modification of the management of expressions in order to reduce the number of created variables (WIP).
  • Add IntVar.stream() that streams a variable's values (in increasing order)
  • Add Search.ValH.BMIN and Search.ValH.BLAST
  • Add DIMACS CNF parser (org.chocosolver.parser.mps.ChocoDIMACS)
  • Add Logger (solver.log()) to trace from Model/Solver.
  • Change some default settings
  • Revamp Settings, now is defined as a factory pattern + add Settings.dev() and Settings.prod() profiles.
  • Make half reification possible. Seed c.implies(b) or c.impliedBy(b) where c is a Constraint and b a BoolVar.
  • Update MiniZinc constraints definition + flatzinc files (for testing).
  • Update choco.msc (for MiniZinc IDE) + ./minizinc/README.md
  • Add Argmax and Argmin constraints
  • Add IfThenElse as a decomposed constraint
  • Improvement of solver.findParetoFront()

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

See milestone 4.10.7

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.6...v4.10.7

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 4 years ago

Choco-solver - 4.10.6

4.10.6 - 11 Dec 2020

Major features:

  • Add new resolution helper in Solver, namely findOptimalSolutionWithBounds. See Javadoc for details and usages.
  • ParallelPortfolio now allows to add unreliable models, that is models whose resolution is deliberately made incomplete. These models should not stop the parallel resolution process when they no longer find a solution. Only complete models can inform the portfolio that they have proven the full exploration of the search space.
  • Add org.chocosolver.util.tools.PreProcessing class, and a first preprocessing rule: equalities detection
  • Upgrade ibex integration to support ibex-java v1.2.0. Fixes for issues #653 and #740.
  • Add QuickXPlain algorithm to find the Minimum Conflicting Set (see issue #509)
  • Update XCSP3 parser.
  • Fix InDomainMedian when domain size is even
  • Add new way to watch solving: solver.verboseSolving()
  • Deal with annotations for some Flatzinc constraints (allDifferent and inverse)
  • Add MultiArmedBandit strategy sequencer

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

See milestone 4.10.6

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.5...v4.10.6

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 5 years ago

Choco-solver - 4.10.5

4.10.5 - 02 Oct 2020

Major features:

  • add IN arithmetic int expression.

Deprecated API (to be removed in next release):

  • Settings.enableACOnTernarySum() removed
  • Settings.setEnableACOnTernarySum(boolean) removed

Other closed issues and pull requests:

See milestone 4.10.5

Contributors to this release:

Full Changelog: https://github.com/chocoteam/choco-solver/compare/4.10.4...v4.10.5

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 5 years ago

Choco-solver - 4.10.4

4.10.4 - 08 Sep 2020

Major features:

  • Change search strategies in ParallelPortfolio
  • Make "CT+" available to binary table constraint
  • Update Dockerfile, now automatically released in hub.docker.com
  • Migrate to ANTLR 4.8-1
  • Support nested seq_search in FlatZinc file
  • Add missing operations in model.unpost(c)
  • Add new constraint, named conditional, that posts constraints on condition
  • Merge cutoffseq in solver
  • Merge pf4cs in parsers
  • Remove geost from parsers

Deprecated API (to be removed in next release):

Other closed issues and pull requests:

#692, #698, #700, #702, #703, #704, #705

Contributors to this release

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 5 years ago

Choco-solver - 4.10.3

Multi-modules and JPMS-ready.

Major features:

  • Move cutoffseq, choco-sat, choco-solver, pf4cs, choco-parsers and samples projects into a (maven) multi-modules project
  • JPMS-ready

Choco-solver can now be run with either JDK 8 or JDK 9+.

Additions

  • Add Conflict History Search ("Conflict history based search for constraint satisfaction problem." Habetand Terrioux,SAC 19 (#676)
  • Add dom/wdeg with refinement ("Refining Constraint Weighting." Wattez et al. ICTAI 2019.)
  • Default AC algorithm for AllDifferent is now from IJCAI-18 "A Fast Algorithm for Generalized Arc Consistency of the Alldifferent Constraint", Zhang et al. (#644)
  • Add a pure java alternative to Ibex (#666)
  • LNS can now be defined with a solution as bootstrap.
  • Add simplify API for current Solver operations (#659)
  • Simplify code for the nValues constraint (using a watching/witnessing reasoning) (#674)
  • Replace former Bin Packing propagators by Paul Shaw propagator (#671)
  • Improving PropDiffN performance (#663)
  • Add nogood stealing for ParallelPortfolio (#669)
  • Adding of new constructors for Task objects (#662) #### Removals
  • Remove JSON writer/parser (which was actually partially supported and not maintained) (#664)

Deprecated API (to be removed in next release):

  • Task(IntVar s, IntVar d, IntVar e, boolean declareMonitor)
  • AbstractProblem.readArgs(String... args)

Other closed issues and pull requests:

#617, #633, #637, #639, #645, #646, #647, #648, #658, #665, #667, #678, #682, #686, #689, #691

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 6 years ago

Choco-solver - 4.10.2

Major features:

  • fix issues relative to propagation
  • change constraints' status checking
  • change stop conditions in ExplanationForSignedClause
  • add stable module name

Closed issues and pull requests:

#618

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 6 years ago

Choco-solver - 4.10.1

Major features:

  • LNS on other variables (e.g. SetVarLNS)
  • Continuous integration fixed
  • IntDomainMiddle now allows an external definition of what middle is, thanks to ToDoubleFunction<IntVar>
  • Add specific propagators for modulo
  • Add views of differences between solutions (see solver.printDistance(...) and solver.printDifferenceMatrix(...))

Deprecated API (to be removed in next release):

Closed issues and pull requests:

#538, #600, #611, #612, #613, #614, #615, #617, #619, #627, #630

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 7 years ago

Choco-solver - 4.10.0

This release comes with several major modifications. The most important one is related to explanations. The previous framework is replaced by a new one based on "A Proof-Producing CSP Solver", M.Vesler and O.Strichman, AAI'10.

See notebooks for an example of use.

Major features:

  • Update statistic dashboard (see solver.showDashboard())
  • Fix Settings.load on missing property
  • Fix issue in Cumulative simplified API
  • Add additional views model.intEqView(x,c), model.intNeView(x,c), model.intLeView(x,c) and model.intGeView(x,c)
  • Detect when the same views is created twice on the same pair
  • Revamp the way LNS' neighbor is declared (simplication)
  • Add AbstractStrategy.remove() method to remove a declared strategy and its dependencies
  • Add new strategies to Search
  • Add new decomposition to IDecompositionFactory
  • Improve initialization of CT+ and CT*
  • Improve IntVar#isInstantiatedTo(int)

Deprecated API (to be removed in next release):

  • INeighbor interface is deprecated and replaced by Neighbor abstract class
  • INeighborFactory#explanationBased(IntVar...) is deprecated, no replacement.
  • ILearnFactory#setCBJLearning(boolean,boolean) and ILearnFactory#setDBTLearning(boolean,boolean) are deprecated, see ILearnFactory#setLearningSignedClauses() instead

Closed issues and pull requests:

#604, #605, #606

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 7 years ago

Choco-solver - 4.0.9

Minor release

Major features:

  • Offer possibility to store and load Settings from a property file.
  • Add API for cumulative when only starts are variable
  • Add decomposition of cumulative: model.cumulativeTimeDecomp(...)
  • Logical expression XOR manages more than 2 variables
  • Add new API to IOutputFactory (to Gephi and to Graphviz)
  • Add constraint network output (to gexf format), see solver.constraintNetworkToGephi(file)
  • add ParallelPortfolio.streamSolutions (#579)

Deprecated API (to be removed in next release):

Closed issues and pull requests:

#596, #600, #601, #602

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 7 years ago

Choco-solver - 4.0.8

Update DefaultSettings with right version

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 8 years ago

Choco-solver - 4.0.7

JAR file names have changed:
- the suffix 'with-dependencies' disappears, - the suffix '-no-dep' (for no dependencies) appears.

This should intends to clarify the selection for new comers.

Add a PayPal button for donations.

Move to Ibex-2.6.5.

Major features:

  • Revamp Settings: no default method anymore, add setters. A concrete class DefaultSettings provides the default behavior.
  • IViewFactory.intScaleView now manages negative constants,
  • IViewFactory.intAffineView is now available
  • add new constraint for mixed linear equation (over real/int variables and double/int coefficients)
  • Dow/WDeg now manages variables in a bipartite set (instantiated variables are swaped)
  • Assert that a propagator that is passive is not allowed to filter anymore
  • An exception is thrown when a sum (or scalar) constraint is candidate for integer over/underflow (an alternative should be provided later)
  • BoolVar now handles modifications in different way (may impact performances)
  • Propagation engine has changed: no alternative to seven-queue one anymore + simplification of code (may impact performances)
  • add new relation expression ift(e1,e2)

Deprecated API (to be removed in next release):

  • Model.set(Settings) is deprecated. Now settings are declared in the Model constructor.
  • Settings.debugPropagation() is deprecated. There is no alternative.

Closed issues and pull requests:

#527, #564, #569, #576, #578, #581, #586

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 8 years ago

Choco-solver - 4.0.6

Move to Ibex-2.6.3.

Major features:

  • Ibex instance is no longer static, that offers better stability and reduce memory consumption when adding/removing functions. Reification no longer managed by Choco but delegated to Ibex.
  • Search.realVarSearch(...) offers possibility to define minimal range size, known as epsilon
  • Search.ibexSolving(model) let Ibex iterates over solutions once all integer variables are instantiated
  • add detection of min/max sub-cases
  • add simple dashboard in Swing to show resolution statistics, see solver.showDashboard()

Deprecated API (to be removed in next release):

  • IntEqRealConstraint will be removed in next release, Ibex managed this concept (int to real)
  • Model.getIbex() should not be used. A IbexHandler manages Ibex instances (one per model).

Closed issues and pull requests:

#558, #561, #565, #566, #568, #570

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 8 years ago

Choco-solver - 4.0.5

The current release was submitted to MiniZinc Challenge 2017 and at XCSP3 Competition 2017 and won medals.

choco-parsers provides utility to export a Model to JSON format and or import JSON data into a Model.

Major features:

  • Compact-Table now deals with short tuples (#531)
  • Checking if a created constraint is free (neither posted or reified) is now possible with Settings.checkDeclaredConstraints()
  • Improvements on BoolVarImpl and BoolNotView.
  • Remove code deprecated in last release.
  • Fix error in Views.
  • Add scalar detection in BiReExpression
  • fix errors in Impact-based Search
  • update Search.intVarSearch() + Search.defaultSearch(Model)
  • update ParallelPortfolio default strategies

Deprecated API (to be removed in next release):

Closed issues and pull requests:

  • fix bug in PropNogoods when dealing with negative values (impact solver..setNoGoodRecordingFromRestarts() and solver..setNoGoodRecordingFromSolutions(...))
  • fix bug in model.sum(...) and model.scalar(...) when dealing with arity greater than 100 and all operators except =
  • fix bug in model.table(...) with binary scope and universal value
  • fix bug related to Ibex and GC.

531 ,#545, #546.

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 8 years ago

Choco-solver - 4.0.4

Major features:

  • add logical operator to expression (#520). Now it is possible, f-ex., to declare expression like: x.eq(y.add(1)).or(x.eq(y).and(x.eq(1)))
  • add new API to Solver to print features in a single line
  • enable ignoring passivate propagators when iterating over propagators of a modified variable (false by default; see Settings)

Deprecated API (to be removed in next release):

  • IPropagationEngine.fails(c,v,m) is replaced by Solver.throwsException(c,v,m) (#524)
  • IPropagationEngine.getContradictionException() is replaced by Solver.getContradictionException() (#524)
  • MathUtils.bounds(values) is replaced by a call to MathUtils.min(values) and MathUtils.max(values)

Remove dead code:

  • SparseSet
  • IFeatures, Features, IAttribute and Attribute

Closed issues and pull requests:

#516, #517, #518, #519, #520, #521, #524.

Scientific Software - Peer-reviewed - Java
Published by cprudhom about 9 years ago

Choco-solver - 4.0.3

Major features:

  • arithm(IntVar,String,IntVar,String,int) and arithm(IntVar,String,IntVar,String,IntVar) manage '*' and '/'
  • add new APIs to ArrayUtils
  • fix error in PropBoolMin and PropBoolMax

Deprecated API:

Closed issues and pull requests:

#500, #502, #507, #510, #512, #514, #515.

Scientific Software - Peer-reviewed - Java
Published by cprudhom about 9 years ago

Choco-solver - 4.0.2

4.0.2 - 20 Jan 2017

Major features:

  • restrict calls to Solver.setEngine(...) when propagation started. See javadoc for details.
  • remove global constructive disjunction, only local constructive disjunction is allowed.
  • add Solution.restore() to restore a solution (#354).
  • deep reset of Solver (#490, #491)

Deprecated API:

  • Solver.getState() (#485)
  • Measures.IN_SEC (related to #486)
  • Settings.outputWithANSIColors, IOutputFactory.ANSI_*
  • IMoveFactory.setLubyRestart(int, int, ICounter, int)

Closed issues and pull requests:

468, #479, #480, #481, #484, #487, #488, #489, #492, #493, #494, #495, #496, #497, #499.

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 9 years ago

Choco-solver - 4.0.1

This release is the continuation of 4.0.0. - upgrade CPProfiler monitor to communicate more information (see #458)

Fix issues:

452 #455 #457 #458 #462 #463 #464 #465 #470 #471 #472 #473 #474 #476 #478

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 9 years ago

Choco-solver - 4.0.0

This release is mainly dedicated to API migration. In the following, the major modifications are reported in order to ease code migration.

See also closed issues.

Even though we first wanted to provide an automatic script to help migration, we finally preferred to list the code modifications needed to move from 3 to 4. The documentation is up-to-date and may be a good starting point.

Note that most IDEs now provide helpful tools to help code migration.

At a glance

In order to distinguish resolution steps, Solver and SearchLoop now move to respectively Model and Solver. - Model aims at declaring a problem on the basis of variables and constraints, and replaces the dedicated factories. - Solver mainly focuses on the resolution of the declared problem, using less factories .

In details

Model

| v3.3.3 | v4.0.0 | | --- | --- | | Solver solver = new Solver("my problem"); | Model model = new Model("my problem"); |

BoolVar

Any BoolVar is now created thanks to model.boolVar(...) APIs.

| v3.3.3 | v4.0.0 | | --- | --- | | BoolVar x = VF.bool("X", solver); | BoolVar x = model.boolVar("X"); | | | BoolVar x = model.boolVar(); | | BoolVar[] xs = VF.boolArray("XS", 4, solver); | BoolVar[] xs = model.boolVar Array("XS", 4); | | BoolVar[] xs = VF.boolMatrix("XS", 3, 4, solver); | BoolVar[] xs = model.boolVar Matrix("XS", 3, 4); |

IntVar

Any IntVar is now created thanks to model.intVar(...) APIs.

integer

| v3.3.3 | v4.0.0 | | --- | --- | | IntVar x = VF.integer("X", 0, 10, solver); | IntVar x = model.intVar("X", 0, 10); | | | IntVar x = model.intVar(0, 10); | | IntVar[] xs = VF.integerArray("XS", 4, 0, 10, solver); | IntVar[] xs = model.intVarArray("XS", 4, 0, 10); | | IntVar[] xs = VF.integerMatrix("XS", 3, 4, 0, 10, solver); | IntVar[] xs = model.intVarMatrix("XS", 3, 4, 0, 10); |

When one wants to chose between bounded or enumerated, he/she has to set the bounded domain boolean.

bounded

| v3.3.3 | v4.0.0 | | --- | --- | | IntVar x = VF.bounded("X", 0, 10, solver); | IntVar x = model.intVar("X", 0, 10, true); | | | IntVar x = model.intVar(0, 10, true); | | IntVar[] xs = VF.boundedArray("XS", 4, 0, 10, solver); | IntVar[] xs = model.intVarArray("XS", 4, 0, 10, true); | | IntVar[] xs = VF.boundedMatrix("XS", 3, 4, 0, 10, solver); | IntVar[] xs = model.intVarMatrix("XS", 3, 4, 0, 10, true); |

enumerated

| v3.3.3 | v4.0.0 | | --- | --- | | IntVar x = VF.enumerated("X", 0, 10, solver); | IntVar x = model.intVar("X", 0, 10, false'); | | | IntVar x = model.intVar(0, 10, false'); | | IntVar x = VF.enumerated("X", new int[]{0,2,4}, solver); | IntVar x = model.intVar("X", new int[]{0,2,4}); | | | IntVar x = model.intVar(new int[]{0,2,4}); | | IntVar xs = VF.enumeratedArray("XS", 4, 0, 10, solver); | IntVar x = model.intVarArray("XS", 0, 10, false'); | | IntVar xs = VF.enumeratedArray("XS", 4, new int[]{0,2,4}, solver); | IntVar x = model.intVarArray("XS", new int[]{0,2,4}); | | IntVar xs = VF.enumeratedMatrix("XS", 3, 4, 0, 10, solver); | IntVar x = model.intVarMatrix("X", 3, 4, 0, 10, false'); | | IntVar xs = VF.enumeratedMatrix("XS", 3, 4, new int[]{0,2,4}, solver); | IntVar x = model.intVarMatrix("X", 3, 4, new int[]{0,2,4}); |

fixed

The way constants are declared does not depend on the type (fixed or variable) but on the kind (integer, set, ...).

| v3.3.3 | v4.0.0 | | --- | --- | | IntVar zero = VariableFactory.fixed(0, solver); | IntVar zero = model.intVar(0); | | IntVar zero = VariableFactory.fixed("0", 0, solver); | IntVar zero = model.intVar("0", 0); |

SetVar and RealVar

Similar modifications were applied to SetVar and RealVar declaration, e.g.:

| v3.3.3 | v4.0.0 | | --- | --- | | SetVar s = VariableFactory.set("S", new int[]{0,3}, new int[]{0, 1, 2, 3}, solver); | SetVar s = model.setVar("S", new int[]{0,3}, new int[]{0, 1, 2, 3}); | | RealVar r = VariableFactory.real("R", 0.1d, 2.2d, solver); | RealVar r = model.realVar("R", 0.1d, 2.2d); |

Task

A TaskVar now have to be created calling new Task(IntVar start, IntVar duration, IntVar end).

Views

Ways to create views evolved too, the signature are now : - model.intAbsView(IntVar), - model.intMinusView(IntVar), - model.intOffsetView(IntVar), - model.intScaleView(IntVar), - model.boolNotView(IntVar), - model.realIntView(IntVar)

Constraints

Constraints can be created thanks to a model. For example,

java solver.post(IntConstraintFactory.alldifferent(xs));

now becomes:

java model.post(model.allDifferent(xs));

or, in a more convenient way:

java model.allDifferent(xs).post();

Most of the names and signatures remain the same between the two versions (but not all, see for instance alldifferent is now allDifferent).

Reifying

Nothing really change here, expect the way constraints are created:

java BoolVar b = model.allDifferent(xs).reify();

Note that Model provides APIs like model.ifThenElse(Constraint, Constraint, Constraint).

Clauses

Model offers possibilities to directly add clauses to the clause-store, like model.addClauses***(...) where *** indicates the expression to turn into clauses.

Solver

SearchLoop now becomes Solver.

java Solver solver = model.getSolver();

This class provides APIs to configure the search and the resolution process.

v3.3.3 APIs to solve problem, like solver.findSolution(). However, the returning value has changed, from boolean to Solution.

Solver now provides another API to solve a problem, named solve() which looks for a feasible solution. It can be called as long as it returns true. In that case, the resolution process stops on a solution state, which means that variables are instantiated and their domain can be read.

Printing solutions or resolution statistics is not done thanks to a factory anymore, but directly with the solver, e.g.: solver.showDecisions();

The same goes with measures, directly reachable from the solver, e.g: solver.getBackTrackCount();

Solver hasReachedLimit() moved to isStopCriterionMet() (since limit were renamed criterion so far, both method act similarly). Moreover, Solver.getState() which returns one of those states: - NEW: when the problem is established but the resolution has not been triggered yet ; - RUNNING: when the solver is searching for a solution ; - TERMINATED: the search ends normally, a solution is found or the entire search tree was explored without finding any solution ; - STOPPED : the search was stopped by a limit ; - KILLED : the resolution was killed from the outside (eg, thread interruption, JVM killed)

Solver's setters signatures have changed to be more accurate, e.g.: solver.set(mySearchStrategy) becomes solver.setSearch(mySearchStrategy)

IntSearchStrategy and similar were merged into Search, which provides widely used search strategies. Making dedicated combination of variable selector and value selector may imply to create object calling new instruction.

Closed issues

427, #433, #438, #448, #450, #456

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 9 years ago

Choco-solver -

This is a pre-release of version 4.0.0. This version is about a deep refactoring of the API, on modeling part mainly, but not only.

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 10 years ago

Choco-solver - 3.3.3

3.3.3 - 22 Dec 2015

All:

  • remove deprecated interfaces, classes and methods.

Solver:

  • add new APIs with an argument named restoreLastSolution which allow to indicate whether or not the last solution found, if any, should be restored on exit; Previous APIs (without the argument) restore the last solution by default (#354)
  • update javadoc (in particular: #347)
  • add default name to Solver + setter, modify measures printing to include the name.
  • SetVar toString implementation has changed

Explanations

  • refactor PropNogoods to deal with generalized no-goods

Bug fixes:

346, #348, #349, #350, #351, #352, #353, #354, #355, #356, #357, #358, #359

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 10 years ago

Choco-solver - 3.3.2

3.3.2 - 17 Nov 2015

Solver:

  • ISolutionRecorder implementations do not restore automatically the last/best solution found on exit. This now has to be done calling either solver.restoreLastSolution() or solver.restoreSolution(Solution).
  • remove MasterSolver and SlaveSolver (#293)
  • Solver.duplicate(), Propagator.duplicate(Solver solver, THashMap<Object, Object> identitymap) and Variable.duplicate(Solver solver, THashMap<Object, Object> identitymap) has been removed. The expected way to duplicate a model is to create a method which creates a Solver, fills it with variables and contraints and returns it. Doing so, the models are sure to the same and reduces the risk of errors
  • add a search monitor helper for parallel resolution with Java8 lambda (#293)
  • lazy creation of ZERO, ONE, TRUE and FALSE through methods of Solver (#293)
  • refactor Solution (#306)
  • improve propagator iteration in propagation engine
  • revamp IMeasures to avoid declaring its concrete class as monitor
  • remove deprecated classes: GenerateAndTest, LastConflict_old
  • add new API to Solver to declare eagerly the objective variable(s) and the precision
  • enable printing decisions and solutions in ANSI colors (see Settings.outputWithANSIColors())
  • add connection to cp-profiler (#341)

Search:

  • Deeply revamp the search loop to offer more flexibility
  • SearchLoop.interrupt()is now forbidden
  • AbstractStrategy.init() cannot throw ContradictionException anymore but returns false instead
  • revamp decisions to enable IntMetaDecision
  • change Decision's API, getDecisionVariable() becomes getDecisionVariables()
  • move FastDecision to ../IntDecision
  • revamp IntDecision.toString()
  • set DecisionOperator as an interface (instead of an abstract class)
  • org.chocosolver.solver.search.limits.ICounter and its concrete class have been revisited, a Solver is now needed to create them.

Variables:

  • add IntVar.removeValues(IntIterableSet, ICause), IntVar.removeAllValuesBut(IntIterableSet, ICause) and IntVar.updateBounds(int, int, ICause) (#270)
  • improve IntVar.removeInterval(int, int, ICause) for enumerated domain integer variables
  • prevent the user from using ISF.random_value on bounded vars

Constraints:

  • add keysorting() constraint
  • add int_value_precede_chain() constraint
  • improve "DEFAULT" option for ICF.alldifferent()
  • revamp scalar and sum (#324)
  • fix lack of filtering in PropMin
  • simplify and improve basic element propagator (#325)
  • remove aCause from Propagator, should be replaced by this
  • simplify Propagation.contradiction(...)
  • add new setting to Settings to allow to not clone variables array input to Propagator's constructor
  • Propagator.getPropagationConditions() becomes public

Explanations:

  • deal with unary decision (when once is set to true)
  • add PoolManager for Rules and Propagators
  • explain PropCount_AC
  • fix lack of explanations in SatSolver
  • fix PropLessOrEqualXY_C to add the right rule

Bug fixes:

152, #153, #164, #176, #296, #297, #298, #301, #303, #309, #311, #313, #314, #317, #320, #323, #326, #327, #331, #333, #334, #337, #338, #342

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 10 years ago

Choco-solver - 3.3.1

3.3.1 - 11 May 2015

Java 7 compliant jars are available in the choco-3.3.1-j7.zip file. - Change the default propagation engine (default is now SevenQueuesPropagatorEngine) - Add clause_channeling constraint - Remove IntVar.wipeOut(...) - Enable hot variable addition to propagator - Move nogood recording from solution and restart from constraint pkg to monitor +(revamp) + SMF API (#261) - Explanations are enabled on initial propagation (#247) - Improvement of the solution object (#254) - add DBT for explanations - Improve explanation engine - Add an additional "worldPush" instruction after initial propagation to be coherent with restarts (#55) - Remove restarts from ABS (#282) - one-shot decision are not reinitialized (#283) - Remove Propagation count (#284) - Change the default search strategy (#290) - Add possibility to complete the declared search strategy (#291) - Add new methods to Chatterbox (#292)

Bug fixes: #168, #221, #239, #259, #262, #264, #265, #267, #269, #271, #273, #275, #279, #281, #295

Scientific Software - Peer-reviewed - Java
Published by cprudhom about 11 years ago

Choco-solver - 3.3.0

3.3.0 - 04 Dec 2014

  • Preparation to MCR (#248)

A script is available (move322to330.sh) to ease migration of your code.

Remove deprecated methods from Variable and SearchMonitorFactory. - Update User Guide (#226, #243, #245) - Add modifiable settings (#250) - Simplify search binder (#229) - All propagators of constraint factory allow duplication (#217) - Update license and header (#241) - Rollback to old release process (#246) - Change the default propagation engine (from SevenQueuesProapgatorEngine to TwoBucketPropagationEngine)

Bug fixes: #215, #252, #253, #255, #256, #258

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 11 years ago

Choco-solver - Choco-3.2.2

3.2.2 - 17 Nov 2014

  • Fix #240: add notmember(IntVar, SetVar) constraint (more efficient than not(member))
  • Fix #225: fix PropCostRegular, wrt to S.Demassey instructions.
  • Fix #229: create MasterSolver and SlaveSolver classes to deal with multi-thread resolution + add external configuration of the search strategy through a binder
  • Fix #227: deal with initial propagation
  • fix #230: update release script
  • fix #231: correct addTrue in SatFactory
  • fix #234: improve reification (presolve and less overheads). As a side effect, reification constraints are automatically posted and cannot be reified directly.
  • fix #233: remove java8 compliant code (temporary)
  • Add a MDD-based propagator (ICF.mddc).
  • fix #235: refactor logging fmwk. Add Chatterbox class as a unique entry point for messaging. Logging still relies on SLF4J.
  • fix #236: bug in SatSolver

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 11 years ago

Choco-solver - Choco 3.2.1

  • Graph vars externalized into choco-graph module (https://github.com/chocoteam/choco-graph)
  • Fix PropSymmetric (set vars)
  • Fix #206: fix lack of robustness in eucl_div
  • Better circuit constraint
  • incremental and coarse propagation of graph variable degrees
  • better samples for Hamiltonian cycle problems
  • NValue now split into atleast and atmost
  • fix LOGGER usage in parser (allows different levels of logging)
  • integer signature for the Lagrangian 1-tree relaxation constraint (good for solving the TSP)
  • Table constraint refactoring (STR2+) (seems to be not idempotent however)
  • Table reformulation of small scalar products
  • Minimum and Maximum over boolean arrays
  • Issue #215: Fix generation of relation based on tuples
  • Fix #214: Fix problems related to propagators dynamic addition and deletion
  • Add a GenerateAndTest search strategy which can be combined with others
  • Fix #218: return null when all variables are instantiated
  • Fix #219: fix range iterator of enumerated integer variable
  • Refactor IEventType (use interface and a concrete implementation for each variable type)
  • Fix bug in CoupleTable due to wrong range use
  • Issue #191: disable buildFakeHistory by default (add a condition to build fake history)
  • Space are not filtered anymore from Operator
  • Remove vars.clone() in Propagator constructor.
  • Remove DSLEngine and dependencies
  • Add a set constraint to get the set of values of an array of integer variables (SCF.intvaluesunion)

Scientific Software - Peer-reviewed - Java
Published by cprudhom over 11 years ago

Choco-solver - Choco 3.2.0

  • Fix #148: update release script
  • Refactoring #149
  • Less Java Genericity:
  • Remove Delta type from Variable
  • Remove Propagator type from Constraints
  • Remove Variable type from views
  • StrategySequencer now created automatically
  • Strong constraints refactoring: A Constraint is defined as a set of propagators which can be reified
  • propagators must all be given to the super constructor
  • Remove IntConstraint
  • Remove many constraint classes
  • Remove isEntailed() from Constraint (isSatisfied does the job)
  • RealConstraint slightly changes
  • Move obsolete code to extra module
  • Associate variables with the solver in AbstractVariable super constructor
  • Unique ObjectiveManager (merge of IntObjectiveManager and RealObjectiveManager)
  • Default implementation of Propagator.getPropagationConditions(int vIdx) which reacts to all kinds of fine event.
  • Fix #146: a new propagation engine is now available which manages coarse propagations
  • Fix #159: avoid stackoverflow using GCC_fast
  • Fix #160: speed up count propagator
  • Fix #161: Propagator: fine_evt and default implementation of propagate(int,int)
  • Fix #162: update filtering algorithm of PropFivXYZ
  • Fix #163: Constraint#isSatisfied() handles stateless propagators
  • Fix #158 fix bug in PropMemberEnum
  • Fix #165: reset AbstractSearchLoop.decision on a call to reset()
  • Fix #152: manage dynamic (temporarily and permanently) addition of constraints
  • Fix #167: ObjectiveManager toString able to handle real values
  • new implementation of Among propagator
  • Fix #176: bug fixed in PropMin/PropMax
  • Fix #175: IMeasure objects can be cloned
  • Fix #182: Set propagators manage ISetDeltaMonitors
  • Fix #183: change release script
  • Fix #177-#179: add a ContradictionException to NoPropagatioEngine to handle with empty domain variables
  • Fix #173: modify default failure message in initial propagation
  • Fix #172: fix retriveXXXvars() + tests
  • Fix #171: define VF.MININTBOUND and VF.MAXINTBOUND
  • Fix #170: update dependencies
  • Fix #95-#186: simplify search strategies and enable tie breaking
  • Fix #187: patch Once
  • Fix #174: a default search strategy is now available, dealing with each type of variables present
  • Fix #189: Added methods to enumerate and store all optimal solutions
  • Fix #190: Entailment of PropBoolChannel
  • Fix #191: Enable dynamic addition of variables during the resolution (cf. Pareto)
  • Start documentation (see user_guide.pdf and http://chocoteam.github.io/choco3/)
  • NogoodFromRestart now trigger propagation fixpoint
  • Fix #192: NogoodFromSolution now available (only for integer variables)
  • Fix #193: VF.enumerated() now copies the input array of values
  • Strong refactoring of IntStrategyFactory (access to variable and value selectors, decision operators, and more simple to understand search names).
  • Stronger AtMostNValue constraint with automatic detection of disequalities
  • Fix #114: Enable to specify a time unit in time limits (ms, s, m or h)
  • Fix #195: fix bug while using IntViews over BoolVar
  • Fix #17: propagator annotations (PropAnn) have been removed
  • Fix #127: a specific view problem remains (new issue opened)
  • Fix #166: remove constants from default search strategy
  • Fix #196: fix view awakening problem
  • Views are now safe
  • Possibility to reformulate views with channeling constraints
  • Catch some particular cases of times in the factory
  • AC guaranteed for times(X,Y,Z) constraint when Y is a constant
  • Add path and subpath constraints, holding on integer variables
  • Add SORT constraint
  • Changes measure, times are now in second
  • Fix#199: some deltamonitors were desynchronized with delta

Scientific Software - Peer-reviewed - Java
Published by cprudhom almost 12 years ago