Abstract
The aim of the presented constraint programming library firstCS is the integration of the constraint programming paradigm in the object-oriented programming language Java. This open-box library provides its users with the necessary concepts to model and solve constraint satisfaction problems and even constraint optimization problems over finite integer domains. The application focus of firstCS is constraint-based scheduling and resource allocations (e.g. Sandow in INFORMATIK 2011, LNI, vol. P-192, p. 248, 2011), however, it offers all primitives to realize new constraints and according propagation algorithms as well as problem-specific tree search heuristics to find good or even best solutions. Beyond related work and an overview over the general architecture of the system and the supported constraints, this presentation focuses on new aspects of the current version of firstCS, i.e. redundancy checking and the assembling of new search strategies from existing ones using the implementation language Java. The presentation is completed by code fragments showing interesting implementation details.
Similar content being viewed by others
Notes
Cf. constraint programming libraries for imperative programming languages at http://en.wikipedia.org/wiki/Constraint_programming.
Called iterated propagation in constraint programming.
This is only recommended for a small number of variables and values.
Good/best with respect to an objective function.
References
Apt KR (2003) Principles of constraint programming. Cambridge University Press, Cambridge
Baptiste P, le Pape C, Nuijten W (2001) In: Constraint-based scheduling: applying constraint programming to scheduling problems. International series in operations research & management science, Kluwer Academic, Dordrecht, vol 39
Hoche M, Müller H, Schlenker H, Wolf A (2003) firstCS—a pure java constraint programming engine. In: Hanus M, Hofstedt P, Wolf A (eds) 2nd international workshop on multiparadigm constraint programming languages (MultiCPL’03), 29th September
Hofstedt P, Wolf A (2007) Einführung in die Constraint-Programmierung. eXamen.press. Springer, Berlin. ISBN 978-3-540-23184-4
Holzbaur C (1990) Specification of constraint based inference mechanism through extended Unification. PhD thesis, Dept. of Medical Cybernetics & AI, University of Vienna
Kuhnert S (2009) Efficient edge-finding on unary resources with optional activities (revised and extended version). In: Seipel D, Hanus M, Wolf A (eds) Declarative programming and knowledge management—17th international conference on applications of declarative programming and knowledge management (INAP 2007) and 21st workshop on (constraint) logic programming (WLP 2007). Lecture notes in artificial intelligence, vol 5437. Springer, Berlin, pp 38–53
López-Ortiz A, Quimper C-G, Tromp J, van Beek P (2003) A fast and simple algorithm for bounds consistency of the all different constraint. In: Gottlob G, Walsh T (eds) IJCAI-03, Proceedings of the eighteenth international joint conference on artificial intelligence, Acapulco, Mexico, August 9–15, 2003. San Mateo, Morgan Kaufmann, pp 245–250
Marriott K, Stuckey PJ (1998) Programming with constraints: an introduction. MIT Press, Cambridge
Régin J-C (1994) A filtering algorithm for constraints of difference in CSPs. In: Proceedings of the national conference on artificial intelligence, pp 362–367
Rossi F, van Beek P, Walsh T (eds) (2006) Handbook of constraint programming. Amsterdam, Elsevier
Sandow S (2011) Ressourcenplanung unter Nutzung der Java-Constraint-Bibliothek firstCS. In: INFORMATIK 2011: Informatik schafft Communities, Lecture notes in informatics (LNI)—proceedings series of the Gesellschaft für Informatik (GI), vol P-192, p 248, Gesellschaft für Informatik e.V.
Schutt A, Wolf A (2010) A new \(\mathcal{O}(n^{2} \log n)\) not-first/not-last pruning algorithm for cumulative resource constraints. In: Cohen D (ed) Proceedings principles and practice of constraint programming (CP 2010), 16th international conference, St. Andrews, Scotland, UK, September 6–10, 2010. Lecture notes in computer science, vol 6308. Springer, Berlin, pp 445–459
Schutt A, Wolf A, Schrader G (2006) Not-first and not-last detection for cumulative scheduling in \(\mathcal{ O}(n^{3}\log n)\). In: Declarative programming for knowledge management—16th international conference on applications of declarative programming and knowledge management (INAP 2005), Fukuoka, Japan, October 22–24, 2005. Revised Selected Papers. Lecture notes in artificial intelligence, vol 4369. Springer, Berlin
Vilím P (2004) O(nlogn) filtering algorithms for unary resource constraint. In: Régin J-C, Rueher M (eds) Proceedings integration of AI and OR techniques in constraint programming for combinatorial optimization problems, first international conference (CPAIOR 2004). Lecture notes in computer science, Nice, France, April 20–22 2004, vol 3011. Springer, Berlin, pp 335–347
Vilím P (2009) Edge finding filtering algorithm for discrete cumulative resources in \(\mathcal{O}(kn \log n)\). In: Gent IP (ed) Proceedings principles and practice of constraint programming (CP 2009), 15th international conference, Lisbon, Portugal, September 20–24, 2009. Lecture notes in computer science, vol 5732. Springer, Berlin, pp 802–816
Wolf A (2003) Pruning while sweeping over task intervals. In: Rossi F (ed) Principles and practice of constraint programming (CP 2003), 9th international conference. Lecture notes in computer science, vol 2833. Springer, Berlin, pp 739–753
Wolf A (2006) Object-oriented constraint programming in Java using the library firstCS. In: Fink M, Tompits H, Woltran S (eds) 20th Workshop on logic programming, Vienna, Austria, February 22–24, 2006. INFSYS research report, vol 1843-06-02. Technische Universität, Wien, pp 21–32
Wolf A, Schlenker H (2005) Realizing the alternative resources constraint. In: Seipel D, Hanus M, Geske U, Bartenstein O (eds) 15th international conference on applications of declarative programming and knowledge management (INAP 2004), and the 18th workshop on logic programming (WLP 2004), Potsdam, Germany, March 4–6, 2004, Revised selected papers. Lecture notes in artificial intelligence, vol 3392. Springer, Berlin, pp 185–199
Wolf A, Schrader G (2006) \(\mathcal{O}(n \log n)\) overload checking for the cumulative constraint and its application. In: Declarative programming for knowledge management—16th international conference on applications of declarative programming and knowledge management (INAP 2005), Fukuoka, Japan, October 22–24, 2005. Revised selected papers. Lecture notes in artificial intelligence, vol 4369. Springer, Berlin
Acknowledgements
I like to thank everybody who contributed to the development of firstCS, namely the “core” developers (in alphabetic order): Matthias Hoche, Sebastian Kuhnert, Henry Müller, Hans Schlenker, Gunnar Schrader, Andreas Schutt and Walter Weininger. I further like to thank all firstCS users that helped to improve the system with their valuable feedback.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Wolf, A. firstCS—New Aspects on Combining Constraint Programming with Object-Orientation in Java . Künstl Intell 26, 55–60 (2012). https://doi.org/10.1007/s13218-011-0161-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13218-011-0161-4