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. We will demonstrate the modeling methodology and implementation techniques, following an optimization application example. By design, the syntax of CoJava is identical to the programming language Java, extended with special constructs to (1) make a non-deterministic choice of a numeric value, (2) assert a constraint, and (3) designate a program variable as the objective to be optimized. A CoJava program thus defines a set of nondeterministic execution paths, each being a program run with specific selection of values in the choice statements. The semantics of CoJava interprets a program as an optimal nondeterministic execution path, namely, a path 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). Thus, to run a CoJava program amounts to first finding an optimal execution path, and then procedurally executing it. To optimize a process, each real-world device or facility is modeled, tested and debugged in pure Java as a class of objects with private state and public methods which change the state. A process is described as a method of a separate class, which invokes methods of the model objects passing non-deterministic choices for arguments, and which designates an optimization objective. For model developers, it appears as if the program has simply followed a single execution path which coincidentally produces the optimal objective value. Thus the learning curve for software developers is minimal. To find an optimal non-deterministic execution path, we have developed a reduction to a standard constraint optimization formulation. Constraint variables represent values in program variables that can be created at any state of a non-deterministic execution. In addition to explicit constraints in assert statements, constraints are constructed to represent transitions from one CoJava program state to the next. Based on the reduction, we have developed a CoJava constraint compiler. The compiler operates by first translating the Java program into a similar Java program in which the primitive numeric operators and data types are replaced by symbolic constraint operators and data types. This intermediate Java program is executed to produce a symbolic decision problem, which is then submitted to an external optimization solver. © Springer-Verlag Berlin Heidelberg 2005.
Cite
CITATION STYLE
Brodsky, A., & Nash, H. (2005). CoJava: A unified language for simulation and optimization. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 3709 LNCS, p. 877). https://doi.org/10.1007/11564751_115
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.