Skip to main content

CoJava: Optimization Modeling by Nondeterministic Simulation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4204))

Abstract

We have proposed and implemented the language CoJava, which offers both the advantages of simulation-like process modeling in Java, and the capabilities of true decision optimization. By design, the syntax of CoJava is identical to the programming language Java, extended with special constructs to (1) make a nondeterministic choice of a numeric value, (2) assert a constraint, and (3) designate a program variable as the objective to be optimized. A sequence of specific selections in nondeterministic choice statements corresponds to an execution path. We define an optimal execution path as one that (1) satisfies the range conditions in the choice statements, (2) satisfies the assert-constraint statements, and (3) produces the optimal value in a designated program variable, among all execution paths that satisfy (1) and (2). The semantics of a CoJava program amounts to first finding an optimal execution path, and then procedurally executing it. To find an optimal execution path, the implemented CoJava compiler reduces the problem to a standard optimization formulation, and then solves it on an external solver. Then, the CoJava program is run as a Java program, where the choice statements select the found optimal values, and the assert and optimization statements are ignored. We illustrate the usage and semantics of CoJava using a simple supply-chain example, in which elastic demand, a manufacturer and a supplier are modeled as Java classes.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Goldberg, A., Robson, D.: Smalltalk-80: the language and its implementation. Addison-Wesley Longman Publishing Co., Inc., Boston (1983)

    MATH  Google Scholar 

  2. Gosling, J., Joy, B., Steele, G.: The Java language specication. Addison-Wesley Longman Publishing Co., Inc., Boston (1996)

    Google Scholar 

  3. Dahl, O.-J., Nygaard, K.: Simula: an algol-based simulation language. Commun. ACM 9, 671–678 (1966)

    Article  MATH  Google Scholar 

  4. Thomasma, T., Madsen, J.: Object oriented programming languages for developing simulation-related software. In: WSC 1990: Proceedings of the 22nd conference on Winter simulation, Piscataway, NJ, USA, pp. 482–485. IEEE Press, Los Alamitos (1990)

    Google Scholar 

  5. Healy, K.J., Kilgore, R.A.: Introduction to silk and java-based simulation. In: WSC 1998: Proceedings of the 30th conference on Winter simulation, pp. 327–334. IEEE Computer Society Press, Los Alamitos (1998)

    Google Scholar 

  6. Bizarro, P., Silva, L.M., Silva, J.G.: Jwarp: A java library for parallel discrete-event simulations. In: Proceedings of the ACM Workshop on Java for High- Performance Network Computing, pp. 999–1005 (1998)

    Google Scholar 

  7. Fourer, R., Gay, D.M., Kernighan, B.W.: A modeling language for mathematical programming. Manage. Sci. 36, 519–554 (1990)

    Article  MATH  Google Scholar 

  8. Boisvert, R.F., Howe, S.E., Kahaner, D.K.: Gams: a framework for the management of scientific software. ACM Trans. Math. Softw. 11, 313–355 (1985)

    Article  MATH  Google Scholar 

  9. Van Hentenryck, P., Michel, L., Perron, L., Régin, J.C.: Constraint programming in opl. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 98–116. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Jaffar, J., Lassez, J.-L.: Constraint logic programming. In: POPL 1987: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pp. 111–119. ACM Press, New York (1987)

    Chapter  Google Scholar 

  11. Caseau, Y., Josset, F.X., Laburthe, F.: CLAIRE: combining sets, search and rules to better express algorithms. Theory and Practice of Logic Programming 2, 769–805 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  12. Smolka, G., Henz, M., Wurtz, J.: Object-oriented concurrent constraint programming in Oz. Principles and Practice of Constraint Programming, 29–48 (1995)

    Google Scholar 

  13. Wallace, M., Novello, S., Schimpf, J.: ECLiPSe: A platform for constraint logic programming. ICL Systems Journal 12, 159–200 (1997)

    Google Scholar 

  14. Puget, J.F., Leconte, M.: Beyond the glass box: Constraints as objects. In: International Logic Programming Symposium, pp. 513–527 (1995)

    Google Scholar 

  15. Apt, K., Schaerf, A.: Search and imperative programming. In: Conference Record of POPL 1997: The 24TH ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Paris, France, New York, NY, pp. 67–79 (1997)

    Google Scholar 

  16. Jayaraman, B., Tambay, P.: Semantics and applications of constrained objects. Technical Report 2001-15 (2001)

    Google Scholar 

  17. Horn, B.L.: Siri: a constrained-object language for reactive program implementation. School of Computer Science, Carnegie Mellon University, Pittsburgh (1991)

    Google Scholar 

  18. Puget, J.F.: A c++ implementation of clp. In: Proceedings of SPICIS (1994)

    Google Scholar 

  19. Laburthe, F.: Choco: Implementing a cp kernel. In: CP00 Post Conference Workshop on Techniques for Implementing Constraint programming Systems (TRICS), Singapore, pp. 71–85 (2000)

    Google Scholar 

  20. Schulte, C., Tack, G.R.: Views and iterators for generic constraint implementations. In: Hnich, B., Carlsson, M., Fages, F., Rossi, F. (eds.) CSCLP 2005. LNCS, vol. 3978, pp. 118–132. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  21. Brodsky, A., Segal, V.E., Chen, J., Exarkhopoulo, P.A.: The ccube constraint object-oriented database system. Constraints 2, 245–277 (1997)

    Article  MATH  Google Scholar 

  22. Borning, A.: The programming language aspects of thinglab, a constraint-oriented simulation laboratory. ACM Trans. Program. Lang. Syst. 3, 353–387 (1981)

    Article  Google Scholar 

  23. Freeman-Benson, B.N.: Kaleidoscope: mixing objects, constraints, and imperative programming. In: OOPSLA/ECOOP 1990: Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications, pp. 77–88. ACM Press, New York (1990)

    Chapter  Google Scholar 

  24. Fritzson, P.A., Engelson, V.: Modelica - A unified object-oriented language for system modeling and simulation. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 67–90. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Brodsky, A., Nash, H. (2006). CoJava: Optimization Modeling by Nondeterministic Simulation. In: Benhamou, F. (eds) Principles and Practice of Constraint Programming - CP 2006. CP 2006. Lecture Notes in Computer Science, vol 4204. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11889205_9

Download citation

  • DOI: https://doi.org/10.1007/11889205_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-46267-5

  • Online ISBN: 978-3-540-46268-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics