The Jacaranda system for automated design and optimisation

Professor Eric S Fraga
Centre for Process Systems Engineering
Department of Chemical Engineering
University College London (UCL)
London, UK


Summary
What to read
Introduction
Java and Packages
The Jacaranda System
EGO: Eric's Generic Object
Expressions
Disclaimer
Using Jacaranda
Text Based Interface
Unit variables
Examples
A detailed example
Units
Client/Server Architecture
Implementation of Jacaranda
Streams
Unit Models
Synthesis
Global Data
Performance Issues **
Flowsheets
Persistent Objects
The Browser
Appendix
Installation
Versions
Current restrictions and known problems
References

Summary

An object oriented framework for automated design (process synthesis), including support for simulation and optimization, has been developed and implemented in the Java language. This framework is known as Jacaranda and is based on the use of implicit enumeration which simultaneously generates and searches the appropriate superstructure. The method is able to generate process flowsheets with heat integration and recycle structures, and is able to handle under-specified problems as they frequently appear in early, conceptual design. Jacaranda, as well as subsequent process optimization procedures, supports multi-criteria optimization.

This document gives an overview of the whole package, intended for both users of the package and developers writing new models and tackling different kinds of problems. Emphasis is placed on the use of the Jacaranda system. The first half of the guide is intended for users of the system while the second half concentrates on the information required to develop new models for tackling new types of problems. This latter section provides a brief overview of the class hierarchy and gives links to the code documentation.

What to read

This document serves two audiences, users of the Jacaranda system for automated design and programmers wishing to develop new models for tackling new problems in design and optimization. As a result, some sections can be safely skipped if the reader is only interested in using the system. Readers intending to simply use Jacaranda should read this introductory section, the section describing the user interface for Jacaranda, including examples, and the installation instructions. Software developers will need to read the whole document however.

Introduction

Automated process synthesis methods have been developed using a wide range of approaches including the use of heuristics, evolutionary methods, and superstructure approaches. We have developed an approach, based on implicit enumeration in combination with dynamic proramming techniques, which simultaneously generates and searches a superstructure. This approach is described elsewhere: see the reference section.

This document primarily describes the Jacaranda Java system for automated design which is part of the FiSH (Fully-integrated Synthesis/Simulation Hierarchy) system. The FiSH system makes use of miscellaneous support tools which are included in the distribution, including for instance tools for heat exchanger network synthesis, genetic algorithm development, graphics, etc. The system is distributed as a set of Java packages with the main entry point being the class uk.ac.ucl.che.esf.Main.

In what follows, there will often be links to the Java documentation associated with each class in Jacaranda. These links will be useful, especially for software developers but also for users of Jacaranda as the documentation will include information about the commands available for each type of object in the system. Specifically, he parseLine method in each class will have some information about the text-based interface for working with instances of that class. The main index for all of the classes in the system is here.

Java and Packages

Java, the object oriented language from Sun Microsystems Inc, is a portable language intended to provide the capability of writing programs once which are then able to be used on a wide range of hardware and software systems. Jacaranda has been written using the features available in the latest (at ime of writing) version of Java, version 1.6. Jacaranda will likely not work with older versions of Java. The latest version of Java can be downloaded, free of charge, from the Sun website.

One of the features of the language, to ensure maximum portability, is the concept of packages, similar to the approach used in the Modula language. A package is a collection of classes and packages may contain other packages in a hierarchical manner. There is an old graphical representation of the full hierarchy of packages and subpackages (shown below in reduced size) in the distribution of Jacaranda rooted at uk.ac.ucl.che.esf.

Annotated Hierarchy of the packages in Jacaranda
Annotated Hierarchy of the packages in Jacaranda

Although this document is directed at explaining how to use Jacaranda, an understanding of some aspects of the Java packages is required. The distribution of Jacaranda contains a large amount of code written by the author while at the Department of Chemical Engineering in UCL (University College London) since 1996. The development of the majority of this code has been motivated by the research into synthesis methods. However, some parts are not directly related to synthesis yet are in the distribution of the package. This document does not aim to describe all the classes, concentrating instead on those relevant to process synthesis and the Jacaranda system.

The Jacaranda System

The set of object classes for process synthesis are loosely grouped into a system known as Jacaranda. Jacaranda includes all the classes defined in the uk.ac.ucl.che.esf.fish.ps package. Jacaranda is not an acronym. Jacaranda also includes tools for process optimisation, typically applied after the synthesis step. These tools are mostly based on the use of stochastic optimization procedures, such as genetic algorithms and Simulated Annealing and are not described in this document. Further information can be obtained by contacting the author.

The synthesis procedures in Jacaranda are based on the use of discretization to convert the mixed-integer nonlinear programme (MINLP), used to describe a superstructure representation of a synthesis problem, into a discrete problem which can be described by a finite, albeit possibly large, directed graph. The optimization procedures use implicit enumeration to create this graph as it is traversed and result in ranked lists of N-best solutions. The best of these solutions is globally optimum with respect to the discretization parameters used.

At the core of the system are three classes:

  1. The Stream class used to represent nodes which need processing to achieve a target. For example, a stream in the classical process engineering sense which may have to be processed to separate the stream into its constituent components. In the state-task network view, the Stream class represents a state node.
  2. a set of unit models which represent the processing steps which generate new streams given a set of feed streams. Unit nodes are equivalent to task nodes in the state-task network representation.
  3. and the problem classes which are used to solve particular types of problems in process synthesis.
Search graph
Search graph

The search graph, generated implicitly, has two types of nodes: Stream nodes and Unit design nodes. These correspond, in the state-task network view, to states and tasks respecively. In the graph, Stream nodes are reprented by boxes and unit nodes by boxes with rounded corners. Any stream node may have any number of edges emanating out from it. Each such edge leads to an instance of unit which performs some action on the stream. For example, the stream AD is shown being processed by a distillation unit which separates A from D and also by a reactor unit which converts A and B into C. The latter unit has an implicit make-up stream consisting of B.

Unit nodes have a number of edges equal to the number of outputs for the particular unit. For any given stream, there will be a number of unit designs, each of which differs in the operating conditions. These operating conditions are discretized by the underlying base unit model class, as described below. Likewise, he outputs of a unit are streams which are mapped to discrete space and therefore may lead to streams which are already present in the graph (eg. the outputs of left reactor unit and he distillation unit BC/D both lead to the same stream node, BC).

At the core of the Jacaranda system is the concept of discretization. All continuous quantities (e.g. component flows, unit operating conditions) are mapped to and from discrete space as appropriate. Developing new types of streams, in particular, requires specific attention to this aspect of the system, as will be described below.

The intention in developing the framework was to define a set of classes for the implementation of a generic solution procedure. As a result, the synthesis methods in Jacaranda are applicable to a wide range of problems, not limited to, for instance, phase equilibria problems. The system has been applied to problems in bioprocess synthesis (Steffens et al, 1999a,b) and for simple scheduling problems in brewing (Fraga et al., 1999). This last reference gives an overview of the generic object-oriented framework.

The stream, unit model and synthesis classes which form the core of the generic search procedures are described in more detail below. The rest of this section describes more general aspects of Jacaranda.

EGO: Eric's Generic Object

Underlying Jacaranda is the EGO class. All major classes in Jacaranda are subclasses of the EGO class. EGO provides basic functionality for the text input interface, the creation of persistent objects, and a rudimentary graphical interface. These aspects are all described in following sections, particularly in the input/output section.

Expressions

In what follows, there will often be a reference to expressions. These are algebraic expressions which are evaluated by an instance of the uk.ac.ucl.che.esf.util.expr.Expression object. The uk.ac.ucl.che.esf.util.expr.Expression object is a fully capable expression evaluator, allowing the definition of variables and the use of predefined functions (such as trigonometric and exponential functions). All variables are intrinsically vectors. However, the expression evaluator does not solve systems of equations. It is essentially a highly functional vector calculator.

Disclaimer

Jacaranda comes with absolutely no guarantee or warranty, either implicit or explicit. The software is provide as is and the user should be aware that there may be errors in the code, as distributed. The author takes no responsibility for the use of this software. Please see the README and LICENCE files that come with the distribution for further details.

The software is typical academic software in that it is intended for use as a test-bed for novel ideas in process synthesis and is not intended to be a production quality system. In particular, the user interface may not be as refined as one would like but it is suitable for the job intended. In any case, use this system at your own risk! Any and all comments, suggestions, bug reports and criticisms are most welcome.

Finally, the licence to use this software does not include the right to give copies to anybody else. If other people are interested in the software, please direct them to the author.

Using Jacaranda

The main interface for the Jacaranda system is based on text input files. There is a graphical interface:

Graphical interface for the Jacaranda system
Graphical interface for the Jacaranda system

but this is only a simple interface to either input files or objects previously created using text input files.

Text Based Interface

The uk.ac.ucl.che.esf.Main= class is a simple front-end to the uk.ac.ucl.che.esf.ui.Input= class which is itself a simple Java based dynamic class loader. This provides an interface which allows objects to be created and modified. To use the text based interface, issue he command:

java uk.ac.ucl.che.esf.Main [options] input files...

This assumes that you have set your CLASSPATH environment variable correctly so that the Java virtual machine (JVM) can find the class uk.ac.ucl.che.esf.Main. See the installation instructions in the Appendix for more information on this. Alternatively, if you have the Jacaranda distribution in the form of a JAR file, you can run the system by executing the following command:

java -jar jacaranda-20020701.jar [options] input files...

where the 20020701 in the example above will vary as it is the date (in ISO format) of the release of the version of Jacaranda you have.

If no input files are given, the simple graphical interface is created and presented to the user.

Command line arguments

The list of available options can be found interactively by giving the '-h' option alone. Briefly, the options available include:

-b
After the last input file has been processed, bring up a graphical browser which gives access to all objects defined during the processing of the last input file. It should be noted at this point that the system has been written with the assumption that only one synthesis job will be run for a given java command run.
-d N
Set the debug level to the value N. The default is -1 which simply shows a running total of the number of subproblems encountered during the synthesis search procedure and the number nodes created in the search graph. Higher values give more (very verbose) information typically only useful for the author of this document when debugging his code!
-h
List the options that are available.
-n N
Specify the number of solutions to generate in the synthesis procedure. The default is to generate the best solution only (N=1). Values of N up to about 5 or 10 are reasonable. Note that computer memory use is directly related to this value. Computational time goes up as well but much less slowly for small values of N. N must be strictly greater than 0.
-o filename
Direct all console output to the file whose name is specified. If the filename is window, the output is directed to a graphical window that is created automatically.
-r
Generate an HTML based report of all the objects created in the current run at the end of the run. This will create a sub-directory (sub-folder) whose name is defined by the project name, if given. If no project name is given, the folder name is jacaranda.
-s
At the end of the run, save all existing objects as individual files using the default persistent object store (the default being the directory esfobjects in the user's home directory). Note: make sure this directory exists before using this option!
—server
Start up the Jacaranda system in server mode. In this mode, client applications may request the evaluation of process flowsheets. For more information, check out the description below.
—soe
Tell the input processor to stop immediately when an error occurs (stop on error). This is particularly useful when writing large input files for complex problems.
-t N
Specify the number of threads to use during the synthesis procedure. This is very experimental and only applies to the symmetric multiprocessing procedures which are currently under development. Only included here for completeness!

The rest of the command line consists of input files which contain commands as described below. At the end of any invocation of Jacaranda which terminates normally (i.e. not interrupted by ^C), there is a summary of the run including an indication of any error or warning conditions that may have arisen.

Output

The majority of the output generated by Jacaranda will be indented by 4 spaces. However, some lines will have some characters in the first three locations. The following cases are possible:

ESF :: Indicates the dynamic loading of special Jacaranda objects. Subsequent use of the same class will not be flagged. The purpose of this line is to give an indication of the version of the class, especially useful for reporting errors to the author.

>>> :: A new input file has been opened. Subsequent output relates to this input file.

<<< :: The current input file has been read completely and execution returns to the input file which redirected input to the current file.

Three digit number
The line number in the current input file responsible for the creation of a new object.
***
Typically an important warning or error but also descriptive information generated by the current input file (e.g. the project title or description).
DDD
A debug output line.

Input file commands

There are two types of commands in the input files. The majority of an input file will consist of the definition of new objects. This is described below after a description of some special commands:

define
Enter a mode that allows the user to define new global variables. These variables are available to all unit models through the expression evaluator. The global variables include the definition of measurement units and new ones can be defined. Variables can be made to be constant so that their values cannot be subsequentialy changed. The following commands are available in this sub-mode:
constant name value comment
Create a new constant variable (I know: a contradiction in terms...) with name and value given. The value may be an expression which is evaluated before assigning its value to the new variable. The comment field is optional. For example,

constant km " 1000*m"

will define the unit km using the predefined variable m which defines the value of a metre.

print
Displays all variables and constants currently defined.
set name value
Set the value of a currently defined variable.
variable name value comment
Define a new variable. This command has the same syntax as the constant command above. The only difference is that the variable that is created can have its value altered afterward definition.
description
Alias for the 'title' command (see below).</DD>
input
Read in commands from another file, the name of which is given as an argument to this command.
load
Load an object from persistent store. This command has two versions. The first expects the fully qualified name (excluding the directory) which has the form name.date.user.type. For example, saving a stream called feed will create a persistent object that has a name like feed.19980609195411.ucecesf.stream, where ucecesf happens to be the author's userid. The date is stored in ISO format (concatenation of year, month, day, hours, minutes, and seconds). The second version of this command is easier to use; it expects two arguments. The first argument is the type of object and the second argument is the name. This version will retrieve the most recent instance of an object of the correct type and with the given name, regardless of the user field.
name
Alias for the project command.
project
Give the current project a name (the next word on this input line). This name will be used by the report command (see below). The command name is an alias for this command.
report
Generate an HTML report for the current project. The project name is used to create a new folder (in the folder from which the java command was run) and the contents of all the objects created in this project are exported to this folder. Use your favourite web browser to look at these objects after running Jacaranda.
save
Save all objects as separate files in the currently active directory (the default is objects), which must have been created prior to use of this command. Alternatively, the user may specify given objects to save by listing them on the same line. Each object is stored in a file whose name is automatically created, as described for the load command above.
set
General settings for the input system. The set command enters a new command mode where the following are valid (as in all other command modes, the end command will terminate the mode):
directory
Specify a new location for the persistent object store (see previous section for a description of persistent objects and the associated browser and immediately above for the '-s' option).
print
List out all currently defined settings (in particular, all known unit definitions).
pfmt
Specify the format for text output of pressure values. Default specification is #0.00. The format specification is based on the standard java.text.DecimalFormat. An example is #.0 which means any number of digits before the decimal place, including none, and only one and exactly one after the decimal place.
qfmt
Specify the format for output of duty and energy amounts. See pfmt for format specification. Default value is #0.#.
tfmt
The format for output of temperature values. See above for description of formats for the variable qfmt. Default value is #0.0.
threads
Specifying either true or false indicates whether the system will allow the use of multiple threads when possible. Most users need not worry about this option at this stage.
show
Display the list of all objects created in the input file to this point.
stats
Display some statistics about object creation. This output is only really useful for the developer of the package...
title
Give the title (the rest of this input line) of the project. An alias for this command is description.
use
Specify a directory (actually, a Java class path prefix) to search when the user requests the creation of a new object (see below). This command may be repeated to specify a list of directories to search (one directory per use command).
variables
Alias for the define command.

Other than these special commands, the rest of an input file consists of new object definitions. Each object definition starts with a line which specifies the actual type of object (the Java class) and a unique name to give the object created from that class. Following this line comes a set of zero or more lines which modify the contents of the particular object created and finally a line with end on it alone. For example, the following creates an instance, which we will name propane, of the KistaComponent class which is found in the uk.ac.ucl.che.esf.fish.ps package:

uk.ac.ucl.che.esf.fish.ps.KistaComponent propane
  flow "45.36/10 * kmol/h"
  bp 230.8
  cpv -4.224 3.062e-1 -1.586e-4 3.214e-8
end

The flow, bp, and cpv commands are specific to the KistaComponent class. Each class has its own set of commands and these are described in the parseLine method every EGO object has. The class name has to be a fully qualified Java name including the package hierarchy. The only requirement on the type of object to be created is that it be a sub-class of the uk.ac.ucl.che.esf.base.EGO class. The objects need not be part of the Jacaranda system.

The definition of the flow value in the example above illustrates the ability to use previously defined variables. The values of kmol and h are previously defined; other variables, defined by the user, could have been used in this example.

To make typing in the commands easier, the user can specify default class paths to use when looking for the classes to create new objects. This is done using the use command. The example given above could be re-written as follows:

use uk.ac.ucl.che.esf.fish.ps        # specify class path directory
KistaComponent propane
  flow "45.36/10 * kmol/h"
  bp 230.8
  cpv -4.224 3.062e-1 -1.586e-4 3.214e-8
end

Unit variables

Interaction with the unit models is handled through the unit variables associated with each unit model. The list of unit variables for any unit model can be listed using an input file of the following form:

uk.ac.ucl.che.esf.fish.units.vle.Distillation
  print
end

where of course the first line is replaced by the actual class for the unit model of interest. See the sample output which would be generated by this sequence of commands.

The unit variables that can be modified by the user in an input file are those listed under 'General Unit Settings'. The 'Unit Design Specifications' may also be modified. The latter will be used by the Jacaranda synthesis procedure for generating unit design alternatives.

Unit variables are given new values by specifying the type of variable and the name of the variable followed (on the same line) by the value and optionally information describing the discretization parameters for the variable. Only variables which he unit model knows can be given new values. The commands above show how to find the list of variables that the unit recognizes. The type of variable must be consistent with the type expected by the unit model. For instance, if the unit model expects the particular variable to be a real number, then only types which generate real values can be used (e.g. Real, LogReal and RealSet).

The following input defines two unit variables as well as the equations used to evaluate the model after the design method has been successfully applied:

use uk.ac.ucl.che.esf.fish.units.vle
Distillation dist
  model
    V = 0.761*sqrt(1/P)
    diam = sqrt( 4*( 0.621*(1+RR)*D*sqrt($(mw*y)/(P/8.314/Tdd))) / Pi)
    height = 0.7 * ns
    colcost = msindex/280 * 101.9 * (diam/0.3)^1.066 * (height/0.3)^0.802 * 5.48
    traycost = msindex/280 * 4.7 * (diam/0.3)^1.55 * (height/0.3) * 2.7
    instrcost = 0
    maintcost = 0
    capcost = colcost+traycost+instrcost
    opercost = maintcost
  end
  LogReal    P  1 10 5
  Real       rec  0.98 0.98 1
end

The distillation unit model (in fact, all unit models) expects the model to be a set of equations evaluated sequentially (essentially, an expression calculator). The equations can make use of variables defined earlier in the input file and variables which the unit itself defines. All real valued unit variables are automatically mirrored by expression variables. For instance, the model equations listed above make reference to the P variable (the operating pressure).

In the expression given in the example, the capital and operating costs are defined by calculating the velocity of the vapour in the column and the diameter and the height of the column. The expression makes reference to example-defined variables, such as the msindex variable, a global variable defined by the system (but which can be altered by the user) and variables such as RR and D which are defined by the unit itself.

The first unit variable, P, is meant to be a real valued variable. The LogReal type defines a set of values uniformly discretized, on a log basis, between 1 and 10 atm. There are five values in the set. Finally, the recovery (rec) variable is given just one value. The operating pressure could have been specified as a Real variable or even a RealSet variable. The latter is particularly useful when one wishes to consider a diverse set of values for a particular variable. For instance, we may wish to have the synthesis procedure consider the design of distillation units with both low and high recoveries of the key components:

use uk.ac.ucl.che.esf.fish.units.vle
Distillation dist
  LogReal    P    1 10 5
  RealSet    rec  0.98 0.999  # consider two different recoveries
end

Please note that the use command must be used so that the input parser can find the definition of the different unit variables. In particular, if the unit variable types are to be the standard ones in the package, the line

use uk.ac.ucl.che.esf.fish.units.vle

will be required somewhere above the definition of the units.

New unit variables can also be defined using the new command. The syntax for this command is:

new TYPE DESCRIPTION SingleLineDefinition

where TYPE is one or more of input, specification, tunable, and continuation, concatenated with plus signs. The DESCRIPTION is a general description of the variable in double quotes, and SingleLineDefinition corresponds to the syntax described above for single line re-definitions of existing variables. A full example could look like:

new continuation "Continuation variable for optimization" Real theta 1

Examples

Some example input files are included as part of the standard distribution. These can be found in the examples directory of the documentation tree. Briefly, the following examples are available:

hen-10sp1.in
An example of one of the post-synthesis tools available in Jacaranda. This case demonstrates the use of a novel visualization tool for heat exchanger network design. The visualization itself forms the basis for user interaction and for automated optimization procedures. The tool can also be used for heat integrated process design but this example demonstrates its use only for HEN synthesis.
penicillin.in
This example, the generation of a process for the production of penicillin, was described in detail by Steffens et al. (1999a). This example uses a completely different set of stream and unit classes from the VLE type of entities used in the other examples. The class definitions for the bioprocessing objects are also found in a different hierarchy which is not fully documented at this stage. If you have questions about this example, please email Professor E S Fraga.
rathore.in
An example of separation sequence synthesis. This example is based on the problem described by Rathore et al. (1974). The problem is to generate a sequence of distillation columns to separate a five component feed into pure component streams. All the columns in this example run at the same pressure (6.8 atm). Discrete heating and cooling utilities are available and both capital and operating costs are included in the objective function. In fact, three criteria are specified for solution ranking: one based purely on capital cost, one on operating cost alone, and the third providing an annualized cost based on a 2.5 year amortization period. The best solution for each different criterion is generated. This example is described in greater detail in the next section below.
rathore_hen.in
Similar example to the previous one except for two aspects: the columns are allowed to operate within a range of pressures defined to be from 1 to 32 atm and the system generates a heat integrated sequence. This problem takes significantly longer to run than the previous problem but arguably generates better designs.
reaction-with-purge.in
A purely conceptual level reaction-separation problem with pseudo-components (fixed constant physical properties) with a purge unit available.
simple-flowsheet.in
Simple example showing how a flowsheet can be defined directly in the system, skipping the synthesis procedures completely. This is useful for accessing the stochastic nonlinear optimization procedures in Jacaranda.

A detailed example

The first example above (rathore.in) will now be described in detail. It will be useful to refer to the document showing he input file with line numbers.

17  project Rathore
18  title "Separation sequence synthesis [Rathore et al., 1974]"

These two lines define the name of the project the input file represents along with a one line description of the project. This information is only used if you ask for an HTML report to be generated (either via the report command later in the input file or through the -r option on the command line). The report will be created in a subdirectory (sub-folder) given the name of the project.

24  use uk.ac.ucl.che.esf.fish.ps
25  use uk.ac.ucl.che.esf.fish.units

These lines tell the input parser that, for the rest of the input file and any input files accessed thereafter, all objects that are not given fully qualified class names will be looked for in these packages. The second of these lines is necessary if you intend to define any unit variables using the standard types (Real, RealSet, Expression, etc).

30  variables
31          constant Base 10 "Percentage component flow discretization"
32          # define the flows of the components in the feed
33          constant Fpropane  " 45.36 *kmol/hr"
34          constant Fibutane  "136.08 *kmol/hr"
35          constant Fnbutane  "226.8  *kmol/hr"
36          constant Fipentane "181.44 *kmol/hr"
37          constant Fnpentane  "317.52 *kmol/hr"
38          constant FeedFlow "Fpropane+Fibutane+Fnbutane+Fipentane+Fnpentane"
39  end

We now define some variables which will be available to both the input that follows (including any other input files referenced by this input file) and to the unit models. In this particular case, we define the base discretization to use for component flows in the system. We will see the use of this variable (Base) below when we define the components. The rest of the variables are the flows of the components in the feed stream, as we shall also see below.

48  KistaComponent propane
49          base "Fpropane/Base"
50          bp 230.8
51          cpv -4.224 3.062e-1 -1.586e-4 3.214e-8
52          lhtc "0.583 *kW/m^2/K"
53          vhtc "5.0 *kW/m^2/K"
54  end

This is the first instance of creating a new object. In this case, we ask for an object, named "propane", to be created based on the uk.ac.ucl.che.esf.fish.ps.KistaComponent class. The base flow (the smallest amount of flow that will be represented in any stream) is defined using two variables defined earlier. The other two commands specify the 1 atm boiling point and the 4 coefficients for estimating the vapour heat capacity. The liquid and vapour heat transfer coefficients are also specified. All other physical properties required by VLE systems will be estimated from the values defined here.

87  Phase feedphase
88          comps propane ibutane nbutane ipentane npentane
89          x 0.05 0.15 0.25 0.2 0.35
90          flow "FeedFlow"
91          phase liquid
92  end

We now define a Phase object. The phase will consist of the five components given with a total flow and specified mole fractions. This phase will be used to define the feed stream:

97  PStream feed
99          add feedphase
102          prange "6.8 *atm" "6.8 *atm"
103          nstates 1
105          P "6.8 *atm"
109          map
110  end

The PStream object is used to represent multi-phase streams. In this case, we only specify a single phase, the feedphase object defined above. We then define the range of pressures that streams will be using in this problem. In this case, we only allow one pressure level (nstates) equal to 6.8 atm. The actual pressure of this stream is set to this same value. If any unit encountered during synthesis or simulation later on creates a stream which is at a different pressure, the pressure will be set to the nearest value in the set of discrete values defined by the prange and nstates commands. In this case, no matter what value the pressure of a stream may be given by a unit, it will be mapped to 6.8 atm. One should be careful in defining a synthesis problem that the ranges of pressures used by units be consistent with the range allowed for streams.

126  DiscreteUtilities utils
127      hot  "Steam @ 28.23 atm"    503.5 503.5 "5000 *W/m^2/K" "1.0246 / GJ"
128      hot  "Steam@11.22atm"       457.6 457.6 "5000 *W/m^2/K" "0.773824 / GJ"
129      hot  "Steam@4.08atm"        417.0 417.0 "5000 *W/m^2/K" "0.573203 / GJ"
130      hot  "Steam@1.70atm"        388.2 388.2 "5000 *W/m^2/K" "0.41796 / GJ"
131      cold  "CooldWater@32.2degC" 305.2 305.2 "500 *W/m^2/K" "0.0668737 / GJ"
132      cold  "Ammonia@1degC"       274.00 274.00 "500 *W/m^2/K" "1.65035 / GJ"
133      cold  "Ammonia@-17.68degC"  255.32 255.32 "500 *W/m^2/K" "2.96871 / GJ"
134      cold  "Ammonia@-21.67degC"  251.33 251.33 "500 *W/m^2/K" "3.96226 / GJ"
135  end

For evaluating flowsheets, we often need to estimate operating costs. A significant operating cost is based on the utilities required for cooling and heating. The DiscreteUtilities object is used to define a set of discrete utilities, each of which is for either heating (a hot utility) or cooling (a cold utility). The specification of each utility consists of inlet temperature, outlet temperature, the heat transfer coefficient, and a cost per unit of energy.

145  Distillation dist
146    Real P "6.8 *atm"
147  end

These three lines define a Distillation unit model. We accept the defaults for all the variables the unit has defined, except for the operating pressure. The default is to consider 4 discrete pressures, uniformly spread in a log basis in the range 1 to 32 atm. Instead of the default, we ask this unit to only consider a single operating pressure of 6.8 atm. This is consistent with the range of pressures we can represent in streams, as described above.

152  ProductTank pure
164    Expression spec "$(x&gt;0.90)"
173    interesting           # interesting leaf node for n-best diversity
174  end

The product tank unit is used to define the allowable outputs of any process. The main specification is the expression which is used to determine whether a feed to this unit is a valid product stream. The expression can make use of several values (see the documentation for the ProductTank unit for a full list). In this example, the variable x, which is a vector of mole fractions, is compared to the value 0.9. The result is a vector of 0's and 1's, with 1's corresponding to the values in x which are greater than 0.9. Given that mole fractions must add up to 1, only at most one such element in the vector will meet this constraint. The $ operator returns the sum of the elements in the vector that results from the comparison. If the value is non-zero, this expression is assumed to return a true value. therefore, if any mole fraction has a value greater than 0.9, the specification will have been met.

The next line is necessary for the Jacaranda synthesis procedure. In order to provide the user with some control over the diversity of solutions returned by the synthesis procedure, the user can specify which outputs of the process are interesting. There must be at least one product tank which has this property in order for the synthesis procedure to return any useful results.

179  FeedTank feedTank
180    Stream feed feed
181  end

As well as product tanks, we need at least one feed tank. These lines define a feed tank which produces the stream defined earlier in the input file.

193  Criteria criteria
200    criterion Capital sum capcost "$" 0.0 "#,##0"
201    criterion Operating sum opercost "$/yr" 0.0 "#,##0"
202    criterion Annualized sum "capcost/2.0 + opercost" "$/yr" 0.0 "#,##0"
203  end

Synthesis procedures need a means of comparing solutions in order to choose the best one. The comparisons are done using the criteria specified. Jacaranda is able to generate multiple solution lists where the solutions in each list are ranked according to different criteria. In the example above, there are three criteria defined: the capital cost, the operating cost, and an annualized cost where the capital is assumed to be amortized over two years. The specification of a criterion includes the name, the operation (either sum or max), the actual expression (which for the first two criteria is given as a single variable), the units of the criterion, the minimum value expected, and finally the formatting information using the format expected by Java's java.util.DecimalFormat class.

Any variable can be used so long as it is generated by a unit, either as a unit variable or as an expression variable. Heat exchangers are evaluated in the same manner and the model equations for these can be overridden as in the case of unit models:

HeatExchanger he
  model
    deltain = abs(T1in-T2out)
    deltaout = abs(T1out-T2in)
    eps = abs(deltain/deltaout-1)
    if eps < 4e-4
       lmtd = (1+eps/2-eps^2/12)*deltaout
    else
       lmtd = (deltain - deltaout)/log(deltain/deltaout)
    endif
    A = Q/U/lmtd
    capcost = 2000 + 35*A
    opercost = Cu*Q*h*hpy
  end
  print
end

This example replaces the default model by a better one which caters for the difficulties that can arise when the inlet and outlet temperature differences are the same. The model used here comes from Morton (2002). Again, the variables available for use by the model have been defined either in the global data object (e.g. hpy) or by the HeatExchanger object itself (e.g. the area A). Again, this other document shows the output generated by the print command for the heat exchanger object, showing all the variables that are available for use by the equation based model. In this case, it should be noted that the global data object output includes the heat exchanger model (as it is likely that one may have many heat exchangers in a process, to reduce the amount of superfluous output, the heat exchanger does not display its own model when using the print command).

In the model, one specifies the expressions to evaluate to determine the capital and operating costs. These expressions can use the following variables: P, the pressure (atm) of the target stream, A, the area (latex2png equation) of the exchanger, Cu, the cost of the utility ($/kW), and Q, the amount of utility (kW). Any other variables known to the system can be used (such as hpy in the example above). The capital cost is calculated before the operating cost so the capital cost can be used in calculating he operating cost.

211  Data
212    utils utils           # which utilities object to use
213    criteria criteria     # the ranking criteria
216    unit dist             # distillation
217    unit pure             # and pure product tanks
218    unit feedTank         # and the feed tank
219    print                 # output all global settings
220  end

All general settings for the Jacaranda synthesis procedure are placed in a Data object. In this example, we can see how the set of utilities available, the criteria to use for ranking, and the list of allowable processing technologies have been defined. If we had wanted to include the new heat exchanger model defined earlier, we would have added the line:

hex he

to the Data object definition.

Given all the objects that we defined, we are now ready to attempt a synthesis problem. The synthesis problem definition for Jacaranda consists of the list of raw materials (represented by feed tanks in the list of units), desired outputs (product tanks in the list of units), and processing steps (the remaining units), together with the criteria for ranking. These have all been defined so we can now define and solve the actual synthesis problem:

236  PS_Problem rathore
237    representation units  # include unit info in n-best diversity
239    solve
240    print                 # and show the best solutions found
241    print short           # showing the basic structure as well
242    stats                 # display some statistics about the search
243    export                # generate the flowsheets
244  end

All the requirements for the problem definition have been given in the Data object. Therefore, all that remains before solving the problem is to specify any options that may be desired. In our case, we have asked that the representation of solutions include the unit id. The solution representation is a terse encoding of solution structures and is used to differentiate between different solutions when generating the list of best solutions. Two solutions that have the same structure, even if they differ in operating conditions, will not both appear in the list. The idea is to ensure that the list of solutions obtained at the end is as diverse as possible.

The next line actually solves the problem and the following print commands output the solutions found . The stats command displays some statistics about the problem size. The export command generates flowsheet objects for each of the solutions obtained. These will be named according to the name of the problem object. In this case, the solutions generated will be rathore-1-1, rathore-2-1 and rathore-3-1. The first integer value is the criterion and the second is the index in the list of solutions for that criterion. By default, Jacaranda generates just one solution for each criterion. This behaviour can be changed using the -n option or by specifying nbest N in the problem options (before the solve command).

Units

As described above, the user can define new variables which may include new unit types. However, all values are stored internally and displayed to the user using the following set of units:

flow kmol/s
energy kJ
length m
mass kg
power kW
pressure atm
temperature K
time s

All output is based on these units (unless otherwise specified). Input, if not qualified, is also assumed to be in these units. However, all input can be given with units, as shown in the examples in this document. If units are to be given, the expression must be quoted and an operator (* or /) must precede the units specified (this is a feature of the expression evaluator used to parse the user's input). The following is a list of known units for conversion (the full list can be displayed using the print command within the variables sub-mode described at the start of this section): kmol, kg, kJ, kW, s, atm, m, K, mol, g, lb, hr, R (for Rankin), bar, Pa, kPa, J, W, MW, GW, MJ, and GJ. Note that case is significant.

Client/Server Architecture

Access to the package for the specific purpose of evaluating objective functions is provided through a client/server architecture. This is a limited interface to Jacaranda which provides the capability of executing previously prepared input scripts and the ability to evaluate objective functions at different points. The aim is to enable other software, specifically optimization tools, to use Jacaranda without writing any Java code. Access to any object which implements the ObjectiveFunction interface is provided. Access is also provide for objective functions which implement the ContinuationInterface for optimization with continuation methods.

The client/server implementation is only available in the full (source code) distribution of Jacaranda. If you have received the evaluation distribution, this interface is not available. If you require access to the client/server interface, please contact Professor Eric S Fraga.

The server is started using the command

java uk.ac.ucl.che.esf.Main --server

or

java -jar jacaranda-20020701.jar --server

remembering to replace the date code with the version given to you. These commands place the system in a wait state listening for connections to port 3817 (by default). Any tool can connect to the server through the use of sockets. Note, the implementation has been shown to work on Linux but no other systems have been tested at this point.

The remote or client application can access the server through a set of function calls implemented in the C language. If you are intending to use the client/server interface, you will need the full distribution of Jacaranda (see below for installation instructions which describe the difference in the distributions of Jacaranda available). In this distribution, there are example files for demonstrating the use of the client/serverb interface in C++ (example.cc), Fortran 90 (client.f90), and Octave (test.m). Remote access from Java is provided by the RemoteObjectiveFunction class.

For Octave users, four functions are defined in the client code:

jinit
Initialize the server. This function expects two arguments. The first argument is the name of the Jacaranda input file and the second argument is the name of the Jacaranda object that implements the objective function interface. Flowsheet objects, for instance, implement this interface, allowing for post-synthesis tuning of process flowsheets using Octave. The function returns 6 results: the lower and upper bounds of both the continuous and integer variables, the number of continuous variables, the number of integer variables, the number of objective function values (>1 for multi-criteria optimization), and the number of continuation parameters.
jf
Evaluate the objective function at the points given. The argument is a matrix in which each column is one point. A point will be comprised of values for both the continuous and integer variables or just for the continuous variables (in which case an embedded optimization procedure, if available, will be used to determine the optimum values of the integer variables). The result of this function is a matrix. The number of columns is the number of points given. Each column corresponds to the objective function values for a point.
jpoint
Returns the last point evaluated. This is particularly useful when an embedded optimization procedure has been used to determine the values of the integer variables in the case where only continuous variables were passed to the jf function evaluation method.
jsettheta
Set the values of the continuation parameters to those given as the sole argument to this function. These values will be used for all subsequent objective function evaluations.

The octave files have to be installed in an appropriate directory (see installation instructions in this document and in the full source code distribution for more information). Once they are installed, and the appropriate environment variables defined, they should be accessible from Octave.

Implementation of Jacaranda

The rest of this document now explains the core object types that make up the Jacaranda system. Although it is not necessary to read the following in order to use Jacaranda, this documentation does explain the options available for the different units and also describes the different synthesis procedures currently available.

Streams

The core of the discretization procedure in Jacaranda is based on the Stream class. This base class is actually abstract, or what C++ programmers would call pure virtual. An abstract class is one which cannot be instantiated. These types of classes act as placeholders and the intention is that sub-classes of the abstract class will include the necessary implementation of what the abstract class promises.

Actual stream objects will be instances of subclasses of the Stream class. In the examples below, we will discuss the PStream class which works with Phases and knows about vapour-liquid equilibrium and related physical attributes. The base stream class need only provide an interface which is sufficient for the synthesis search procedure. This interface is described more fully in the class documentation; here we will concentrate on some of the most important aspects or methods:

void generateKey()
This method is used to generate a unique string encoding which is used by the search procedure to uniquely label subproblems in the search procedure. The labels for subproblems are used to identify those subproblems which have already been solved and hence require no further work. A procedure similar to that implemented by the PStream subclass and how the key string may be used by the search procedure is described in detail by Fraga (1996) . Essentially, the encoding is used to identify and classify streams encountered in the search procedure. Two streams which generate the same encoding are considered to be the same stream. The search procedure is made more efficient than a straightforward implicit enumeration scheme by identifying subproblems which have been previously solved and reusing solutions already available. This identification uses the stream encodings at the core of the procedure. The encoding should be based on the same function used to map streams to discrete space, as described in mapToDiscrete below.
Composition getComposition()
As the search procedure makes no assumptions about the contents of streams, there are cases where the comparison available to the search procedure based on key strings is not sufficient. An alternative description of stream contents is permitted, and in fact required, through the use of Composition objects. Each stream must be able to return an object, which implements the Composition interface, which is used by the search to compare streams at a qualitatively less rigorous level. There are two places where composition objects are used: when describing solution structures using string encodings (as described by Fraga (1996)) and for identification of recycle streams in the generation of recycle structures (Fraga, 1998).
void init()
Streams may be initialized directly, after being created. Although this is not used by the synthesis procedure, the flowsheet optimization procedures may invoke this method to ensure that streams created by a user have been defined properly.
void mapToDiscrete()
The main method for mapping the stream from continuous space to discrete space. This method should be based on discretization parameters which are under user control so as to allow the search procedure to be tailored to specific problems and to encourage the use of the synthesis procedure iteratively, as shown by Laing & Fraga (1997). The mapping function should be consistent with the key generation method used by the stream. Otherwise, there are no constraints on how this method should be implemented.

The contents of the stream object are completely undefined and are left totally to the discretion of any subclass. The search procedure requires only the ability to map streams to the discrete space and to generate a string encoding of the stream. All else is up to the designer of the particular subclass. Below, we describe the PStream class which is used to represent streams for working with phase equilibria such as found in many synthesis problems in process engineering.

The Composition Interface

As mentioned above, associated with a Stream object is an object which implements the Composition interface. This is an object which describes, possibly more qualitatively, the composition of a stream and is used for recycle stream identification and for describing solution structures. It is up to the designer of the particular stream class to decide the level of detail that should be represented by composition object. The Composition object must implement the following methods:

void combine
The Composition object given as the argument is combined with the current Composition object, possibly throwing an Exception of type PSException.
String getTerseEncoding
Creating string representations of solution structures requires the ability to describe final product streams. Solution encodings are used to compare different solutions to see if they differ substantially. Typically, a user is not interested in solutions that differ solely in operating conditions. Final product streams are represented in the solution structure using the result of this method and, typically, this should not contain extensive information.
boolean isEqual
Compares the composition to the Composition given as an argument.

An example of a Composition object is given in conjunction with the description of the PStream class.

The PStream Class

Generating processes which involve, for example, distillation columns, requires us to have streams for which physical properties such as bubble and dew point temperatures can be estimated. The PStream can be used to represent such streams. It consists of one or more Phases at a given temperature and pressure. Each phase consists of a set of components and an amount, known as a flow (the time dimension is implicit in the amount and is assumed to be per second).

The Component objects implement the physical property estimation methods. In the current implementation, there are two different component classes: the KistaComponent class which uses Kistiakowski short-cut procedures for estimating physical properties from the 1 atm boiling point, and the PseudoComponent class which implements constant, user-provided, physical properties.

The PStream class uses the Phase object as its Composition. The composition object associated with a stream is a phase which is the combination of all the phases in the stream. Therefore, compositions for Streams, in terms of the search procedure, are described purely from the list of components in a stream, along with the amounts of each component. The temperature and pressure of the stream are ignored, as are the actual states of each phase.

Each Phase consists of a set of components. Each component has one basic quantity, a base flow, which is the basis for the discretization of streams. When a stream is mapped to discrete space, the component flowrates are mapped to the nearest integer multiple of the component's base flow. The pressure of a stream is mapped to the nearest pressure in a set of pressures defined by the user.

Unit Models

The second kind of node in the search graph corresponds to processing technologies, as described by unit models. Unit models, like streams, work in continuous space but are used by the search procedure to define a discrete search space. The search procedure takes one or more streams, maps them to discrete space, and then passes them to a unit model (UnitModel.setFeeds). The unit is then responsible for deciding whether the feeds are appropriate and, if so, is given a chance to prepare itself for use in a discrete search space (UnitModel.prepareForAlternatives).

Unit model class
Unit model class

The only aspect of unit models that are directly used in the mapping from continuous to discrete space is the set of unit variables, describe using instances of subclasses of the UnitVar class. The figure shows the relationship between unit models and unit variables. When a particular alternative design of the unit model is asked for (UnitModel.selectAlternative), the base UnitModel class determines which alternative from each of the unit variables is required and these are chosen using the UnitVar.selectAlternative method.

When a particular unit model alternative has been chosen, the search procedure then requests the actual design using the UnitModel.generateDesign method. This method invokes the following methods:

setVariables
set the values of the expression variables corresponding to the unit variables.
checkPreconditions
check that the example-conditions are satisfied. The example-conditions are defined as an expression. This expression is defined using the preconditions command, valid for any unit model.
design
invoke the actual design method.
checkConstraint
check that the constraints on the unit design are satisfied. The constraints are also defined by an expression. The constraints expression is defined using the constraints command.
evaluateModel
evaluate the model expression. The model expression is often used to assign values to the variables that are used to evaluate the ranking criteria. The model is defined using the model command, also valid for any unit model.

If all these methods are successful, a unit design is available and the criteria can be evaluated.

The underlying rationale for the breakdown of a unit design generation step into the sequence of method invocations described above is that the user should be able to easily modify he default behaviour of a unit model through the text input files. This is the reason for the use of expressions for example-conditions, constraint checking and model evaluation. The design method, however, is written in Java and cannot be easily modified by the average user. Therefore, in implementing any new unit models, care should be taken to ensure that the design method be limited to only those actions that must be undertaken in Java. An example is the direct interaction with the stream objects for access to physical property estimation methods. Another is the manipulation of the special unit variables that are used by the synthesis procedures, such as the feed and product streams and the heat transfer requests.

The search procedure interacts with the unit models both to create the search graph dynamically for the synthesis problem and to define diversity in the creation of multiple solutions (as described in the next section). There are two specific flags associated with unit models that affect the size of the search space and the types of solutions obtained:

interesting
For product and waste tanks (which correspond to leaf nodes in the search graph), the search procedure needs an indication of whether a particular branch which ends at one of these nodes is of interest for diversity in the generation of N-best solutions. The default for units is that the unit is not interesting. Typically, at least one product tank unit should have this flag set.
limit
The QualifiedProblem class is able to generate flowsheets which have the restriction that some units are only used a predefined number of times. If a given unit is to have this restriction, the limit flag associated with the unit must be set to true.

Unit Variables

The set of unit variables for a given unit model are used directly by the search procedure, not only for mapping from continuous space to discrete space, but also to identify specific aspects of the unit design. Variables are given a function when they are created and this function must be one or more of the following (joined together using the OR operator):

ContinuationParameter
Process flowsheets implement the ContinuationInterface and the ObjectiveFunction interfaces. These interfaces enable a process flowsheet to be the basis of an optimization procedure, often after generation by the synthesis procedures in Jacaranda. Some optimizers use continuation methods and this flag identifies continuation variables for use with such methods. Note, most unit models will not have continuation unit variables predefined but new unit variables can be added (see the section on unit variables for a description of how to add new unit variables to an exiting unit model).
DesignInfo
This is used to indicate a variable whose value will be set by the design method and is likely to include useful information for displaying to the user.
Feed
Indicates that the StreamUnitVar unit variable is a feed to the unit. The setFeed/setFeeds methods will automatically set variables tagged with this function with the appropriate streams.
HTR
A Heat Transfer Request, generated by the design method, which will be addressed by the synthesis procedure after a unit design. Heat transfer requests will result in the design of heat exchangers, using either utilities or for process integration.
Product
A StreamUnitVar unit variable which contains, after the design method, one of the products (outputs) of the unit.
Specification
General purpose designation which indicates that the particular variable is one the user should be allowed to set to control the behaviour of the unit in the synthesis/simulation procedures. Any variable of this type will be discretized (with appropriate defaults given by the declaration of this variable) by the search procedure. Specification variables are those which will varied to achieve the optimal designs. Some of these variables will also be tunable.
Tunable
This should be specified for any real valued unit variable which is also a specification and which should be considered for post-synthesis continuous optimization. An example might be the operating pressure of a distillation column. As discussed above for continuation parameters, flowsheet objects in Jacaranda implement the ObjectiveFunction interface and can be used as the target of an optimizer. The optimization variables of a flowsheet are those marked as Tunable.
UserInput
Variables which control the behaviour of the unit, especially the designs, but which do not have alternatives or cannot be discretized. An example might be the tray efficiency in a distillation column model.

The Jacaranda system provides a base unit model class which provides support for discretization and user input and output. Each unit model has a unit variable table which contains a set of unit variables. Each unit variable is described by a specific unit variable class which includes the type of variable and the method for discretization. Available unit variable classes include:

ComponentUnitVar
Allows consideration of alternatives based on the choice of a component from a given list. This class knows about PStream objects and can define the set of allowed components from the Phase object returned by the getComposition method of the PStream class.
ExpressionUV
An expression, defined as a string using infix notation, can be used to allow the user to modify the behaviour of unit models. A good example is the use of cost models for capital costs (see the Distillation unit model).
IntUnitVar
For integer values. The discrete values allowed are controlled by a step value.
LogRealUnitVar
A subclass of the RealUnitVar class which discretizes the values in the range uniformly in a log basis.
RealUnitVar
For real values. Discretization is assumed to be uniform over the range of values given for this variable.
StringUnitVar
For holding strings (e.g. cost function expressions, names of products, etc.).
StreamUnitVar
For stream objects. Typically, this will be used to declare feed and output streams for a unit. Feed tanks will have just an output stream and product tanks just a feed stream. Any other type of unit (distillation, reactors, etc) will typically have one or more feed stream variables and one or more output stream variables.

There are also array versions of many of these variables: IntArrayUnitVar, RealSetUnitVar, StringArrayUnitVar, and StreamArrayUnitVar. Each of these variables allows the system to consider each entry in turn as different specifications for unit designs (if the unit variable in question is actual a specification).

The user modifies the behaviour of unit models by specifying values and ranges for the different specification unit variables. Specifying values for unit variables is quite straightforward and is explained earlier. There are two types of unit variables the user will typically modify: design specifications and general settings. Design specifications are variables that are used by the synthesis procedure to generate the different design alternatives. These variables are often ranges of values. General settings affect the behaviour of the unit model but are not directly manipulated by the synthesis procedures.

Expression variables

The package provides an expression evaluator which is used by some of the units. For instance, the spec and valuefn product tank unit variables expect expressions which are evaluated to determine, respectively, whether a stream matches the product specification and the value of the any valid product. In pure product separation sequence synthesis, for example, the expression for the specification of a component C1 could be defined as:

Expression spec "x[C1]&gt;0.95"

One of the default variables defined for the product tank is the vector, x, of mole fractions for the components in the feed. The list of variables available for use is described by each unit.

Example unit models

Jacaranda is distributed with a small set of representative unit models. These models are suitable for conceptual level design although their main purpose has been to enable the author to test the synthesis procedures. Although it is expected that users will develop their own targetted unit models, these models can and have been used. This section describes these models.

Short-cut semi-sharp distillation

The distillation model (uk.ac.ucl.che.esf.fish.units.Distillation) implements a simple short-cut procedure based on the Fenske, Underwood and Gilliland equations. The model estimates the following:

This model also defines an expression for estimating the capital and operating costs which can be overridden by redefining the model unit variable.

The model requires certain specifications to identify suitable designs. The specifications understood by this model are listed here:

conceptual
By default, the model assumes that as much detail as possible is desired. This includes, in particular, estimates on the heating and cooling requirements for the separation desired. However, in some cases, this information is either not desired or it is not possible to generate it because of limitations in the physical property estimation procedures. In these cases, setting this variable to false will cause the model to calculate only the minimum information for costing (number of stages and the reflux rate) using only relative volatility calculations.
feed
The feed stream to the unit. In synthesis mode, this will be set automatically by the search procedure. The unit model checks to see if there are at least two components in the feed and that the stream is of the appropriate type.
key
The light key component. During the synthesis procedures, this variable is set automatically to each component in the feed stream in turn. The heavy key component will be defined to be the next heaviest component in the list of the components of the feed stream sorted according to relative volatility.
minflow
Although not often used, this variable allows the unit (when used within the synthesis procedures) to reject any feed stream that has less than this amount of flow. This can be useful for some conceptual studies.
minx
Similar to =minflow= above, this value is used to reject any particular design instance in which the light key component has less than this molar fraction value (in the feed).
P
The operating pressure for the column, implemented as a LogRealUnitVar type. The user specifies minimum and maximum values and the number of discrete values to consider in this range. The discrete values are placed uniformly on a log basis so that more values are near the bottom end of the range than the top. Experience has shown that this leads to better results for a given number of discrete values due to the vapour-liquid relationships for most components.
rec
The recovery of both the light and heavy key components. The value is between 0 and 1. This value times the amount of the light key in the feed is sent to the top product with the rest going to the bottom product of the column. The opposite is done for the heavy key component. All other components in the feed stream distribute sharply: components lighter than the light key go completely to the top product and components heavier than the heavy key go to the bottom product. This type of separation is called semi-sharp.
rrf
The reflux rate factor is used to identify the actual reflux rate. The Fenske and Underwood equations are used to estimate the minimum number of stages and the minimum reflux ratio. The rrf value is used to choose the actual reflux ratio and this is then used in the Gilliland correlation to identify the actual number of theoretical stages.
te
The tray efficiency as a value between 0 and 1. This is used to calculate the actual number of stages given the number of theoretical stages estimated by the Gilliland correlation.

Given a feed stream, the light and heavy key components (which must be contiguous in relative volatility order), desired recoveries for the light and heavy keys, and a reflux ratio factor (explained below), the full design is generated.

Feed tank

The feed tank is used to specify the raw feed streams that are available to the system. As such, it has only one unit variable of interest: the feed stream.

Product tank

The product tank unit is used to specify valid products of the process. These products are identified using expressions which describe valid compositions. The products can also have a cost associated with them. The variables of interest are

spec
The specification which is used to identify valid product streams. This is an expression which can use the variables listed in the API for this unit along with all the standard variables.
value
An expression for generating a value for the product stream. This value will be negated and placed in the **cost** design information unit variable and is hence accessible using the criteria settings (described above).
Purge

In tackling reaction/separation problems, it is often useful to introduce a purge unit. This unit will accept, as a valid feed to the unit, any stream which matches a desired recycle stream in terms of composition times some factor. The factor must be greater than 1. If this match succeeds, the purge unit " absorbs" the excess which is treated as an implied output of the process. The actual output of the unit is the stream which exactly matches the recycle stream.

The main purpose of including a purge unit in the synthesis procedure is to speed up the iterative procedure used by the iterative dynamic programming synthesis method. It is not typically necessary for convergence of that iterative procedure.

There is only one variable associated with this unit:

tolerance
The tolerance to which a stream must match in terms of composition. The default of 0.0001 is typically suitable although this may be relaxed for more conceptual level problems.
Reactor

The reactor unit is very simple. The functionality one expects of a reactor unit is actually embodied in the uk.ac.ucl.che.esf.fish.ps.Reaction= class. The variables associated with this unit are:

conversion
The desired conversion rate for the reaction. This will be used to estimate the volume.
costfn
Capital cost function which can use several variables:
D
The diameter in metres of the reactor.
L
The length of the reactor in metres.
V
The volume of the reactor in metres squared.
ldratio
The ratio of the length to the diameter for the reactor.

As mentioned above, the reactor has a Reaction object associated with it. See the class documentation for he reaction object for a more detailed description. The reaction object to use with the reactor is specified using the reaction command with a reaction object as the argument. Although the reaction object is quite simple, the reactor model can work with more complex reaction objects.

Synthesis

The main purpose of Jacaranda is the automated design of process flowsheets, or process synthesis. The Jacaranda synthesis procedure is embodied in the hierarchy of classes that start with the base Base problem and Solution classes. These classes provide the basic functionality for an implicit enumeration procedure which simultaneously generates and searches the appropriate graph describing the superstructure. The procedures use discrete programming techniques to implicitly define this graph and dynamic programming is used to make efficient re-use of computation. The basic procedures are described in the references.

The base problem class is not usable as it stands and is only meant to provide the basic framework for the search. Instead, subclasses are used to define specific synthesis problems; these subclasses are described below. A summary of the intended use of these problem classes is given here:

PS_Problem
For separation problems.
HPS_Problem
For very early stage separation problems in which the full problem definition (constraints, etc) is not known.
QualifiedProblem
For tackling problems with heat exchange and limits on units. Also simple reaction/separation problems with example-defined recycle streams or not recycle streams at all.
IDP
Iterative dynamic programming for tackling reaction/separation problems with automatic identification of recycle streams.

PS_Problem: Separation Synthesis

The first useful subclass of the base problem class is PS_Problem which stands for process synthesis problem. This class will typically be used for straightforward separation synthesis as it does not handle recycle streams nor can it generate heat integrated processes. The QualifiedProblem class is more general and can handle some of these aspects.

The definition of a process synthesis problem is based on the following information:

The PS_Problem class therefore requires this information to fully specify the synthesis problem. The user is expected to have defined a list of processing units, including at least one feed tank model (a unit with no feeds and one output) and one or more product tanks which are special units which have no output and which accept specific streams as feeds (e.g. a pure component product tank which accepts any stream with one component with a purity of at least 98%, say). The synthesis problem has default utilities (as described by Rathore et al, 1974). The list of units, utilities, and the exchanger models for heat exchange are all specified as part of the uk.ac.ucl.che.esf.fish.ps.Data global data object (see below).

The synthesis problem does have specific variables which control the behaviour of the search procedure and the types of results generated. The commands are available in the text based interface are listed here:

bounding
The default method uses a branch & bound algorithm to search the graph. In cases where negative costs may arise, bounding should not be used as the results will be incorrect (warning: there is no check for this condition at present). If this is the case, this command, with false as the argument, will turn off the use of bounding in the search procedure.
leafprune
The search procedure only prunes branches in the graph when the bounding information tells it to. However, the user can request that the search prune all branches from a node as soon as it determines that the node corresponds to a product stream. This can be useful for very large separation problems and requires that the units considered by the synthesis method be in an order which can use this feature: product tanks should come first before units which generate subproblems. Specify true if this behaviour is desired; default is false.
representation
The synthesis method is able to identify not just the best solution but a ranked list of the N best solutions, for any value of N. In order to present the user with a useful list of solutions, the system introduces the concept of similar structures. Two structures that are similar will not both be on the N-best list, thereby ensuring diversity. For example, it is unlikely that the user will be interested in knowing that the 2nd-best solution is the same as the best one except in that the operating pressure of the first column is 0.1 atmospheres greater. The default procedure, therefore, bases similarity purely on structure, ignoring operating conditions and the actual units in the flowsheet. This behaviour can be modified to distinguish between flowsheets which have the same structure but different unit types by specifying the option " units" to this command.
sud
Specify whether unit designs should be saved for re-use. Although the PS_Problem class does not generate problems in which this is useful, the default is that unit designs are saved. If this leads to memory resource problems, unset this flag.

HPS_Problem: Hierarchical ranking

The Hierarchical synthesis procedure is used to generate and work with partial solutions. Partial solutions are those which violate one or more constraints, as specified in the problem definition. Examples can include flowsheets which have units that have cooling or heating requirements that can not be met by the current utilities or flowsheets which have streams which can not be processed any further and which do not meet the specifications for products (i.e. can not be accepted by any unit in the list of available technologies). These solutions, although infeasible, can be of interest to the user as they can give some insight into the problem and the corresponding search space. Furthermore, these solutions can be used by the QualifiedProblem subclass to automatically identify and generate recycle streams.

This class adds the concept of a status level to each solution. Solutions can now be compared not only with the cost, as done by the PS_Problem class above, but also with the status value. Status values are defined through a hierarchy of levels:

PRODUCT
If a stream is identified as a desired product (i.e. there is a unit which accepts the stream as a feed and has no output streams), the solution which corresponds to this unit is given the status value associated with this level (default: 0).
NOUTIL
If a stream can be processed by a unit but the heating or cooling requirements of this unit can not be met by the utilities available, the status of any solution which uses this unit will have a status value associated with this level (default: 3).
NOTECH
If a stream can not be processed by any unit, the empty solution for the problem associated with this stream is given this value (default: 4).

The default values can be modified by the user. It should be noted that the use of negative values (for example, to encourage product generation) is possible but should be used sparingly as bounding needs to be turned off in this case.

The generation of N-best solutions is handled differently by this class. Instead of ensuring diversity only by the solution structure (see the description of the representation option in the PS_Problem class above), the HPS_Problem class defines diversity as a function of the status value. The status value of any solution is the status value of the root node plus the status value of the rest of the flowsheet (recursive definition). For each different status value, there will only be one solution. It is possible to change this behaviour to allow multiple solutions with the same status value to appear in the N-best list by using the differby command with the argument structure (the default behaviour is achieved by specifying status instead).

Qualified Problems

The QualifiedProblem class allows the user to specify certain qualities that the solution to the problem should observe. These may be extra restrictions (for example, a limit on the number of occurences for a particular unit such as a reactor) or they may provide extra resources specific to the problem (extra feeds, say). These are specified using Qualifiers; this section describes those that are currently available in the Jacaranda system.

FeedQualifier
This qualifier is used to provide multiple raw feed streams for the process. Each feed qualifier expects to be associated with a previously defined feed stream. This stream will be used at most once in any solution to the problem. There is no explicit requirement for the stream to be used, however.
LimitQualifier
It is often the case that the engineer would wish to identify process flowsheets, for a particular task, which use only certain numbers of particular units. This may be for tackling retrofit problems or for investigating alternative solutions. The limit qualifier is defined with an associated unit model. That unit model will have had its limit flag set (see the description of Unit models above).

VHL :; To tackle heat integration, the system provides a special qualifier which implements the virtual heat links, described by Fraga & McKinnon (1994; 1995; & 1998).

Iterative Dynamic Programming

Problems whose solutions require recycle streams are handled using the iterative dynamic programming class. This class is essentially the same as its superclass, the QualifiedProblem class except that the ability to iterate on partial solutions has been added. The procedure is described by Fraga (1998).

Some new commands are introduced in this class which affect the iterative procedure:

maxdepth
Maximum depth in the search tree at which the iterative procedure will be considered. A value of -1 turns off the iterative procedure. The root of the search tree has depth 0.
maxiter
Maximum number of iterations of the synthesis procedure to perform. If the recycle streams do not converge within this number of iterations, fully feasible solutions will not be found.

Ranking Criteria

The synthesis procedure is based on ranking solutions according to user specified criteria. The default is to use the total annualized cost of the process as the sole criterion. The annualized cost is calculated as the capital cost divided by the plant life (default of 10 years) plus any operating costs. Capital costs come from the units and any heat exchangers; operating costs also come from the units (e.g. some units may require make-up streams or catalysts etc) and from utility consumption for heating and cooling. Other ranking criteria could include measures on dynamic behaviour such as maximum deviation from product specifications and response time.

Criteria are specified by creating an instance of the uk.ac.ucl.che.esf.fish.ps.Criteria class. This class allows one to specify as many criteria as required. Each criterion consists of a name, the operation to perform to combine criterion values from different sources (units, heat exchangers, subproblems) which can be either sum or max, and the actual expression to evaluate for the criterion. Optional extra arguments are the units (e.g. $/y), the minimum value expected (which can be used by bounding procedures in the synthesis algorithm to reduce the size of the space searched), and the formatting instructions for output of values for the criterion. The expression for each criterion may make reference to any of the variables defined by the various unit models and the heat exchanger models. The latter only define capcost and opercost.

The following example defines three ranking criteria: the first is the capital cost, the second the operating cost, and the hird is a combination of the two where we assume we amortize he capital cost over 2.5 years.

use uk.ac.ucl.che.esf.fish.ps
Criteria  multipleCostCriteria
  criterion Capital sum capcost
  criterion Operating sum opercost
  criterion Annualized sum "capcost/2.5 + opercost"
end

(See the section on text input for a further description on how input files are created and used.) This example creates an instance of the Criteria class which is called multipleCostCriteria. This instance is passed to a synthesis problem through the global data object, described in the next section. The data object has a command called criteria for specifying the criteria object to use in ranking.

In the example shown above, it is assumed that the objective function is equivalent to the sum of the annualized costs of all the constituent parts of the process flowsheet (i.e. sum of unit and heat exchanger costs). However, some measures correspond to objective functions which find the maximum value of some criterion. Each criterion expression for a Criteria object can be assigned the operation that should be performed. At time of writing, only two operations are allowed: sum and max. Operations are defined using the operator command in the text interface. If this command is not used, the operation for each expression element defaults to sum.

Cost correlations

Although the criteria object allows one to select the criteria to use in ranking alternative solutions, this object does not necessarily allow on to specify how the individual variables used in evaluating criteria are calculated. For instance, although the default criterion for ranking is based on the annualized cost using the opercost and capcost variables, no mention has been made of how these variables are defined.

Costs come from two sources: processing units and heat exchangers (where applicable, of course). All unit models define two types of variables, the so-called Unit Variables and Expression variables. The unit variables have names and any of these, assuming they correspond to real values, can be used in the criteria expressions. For instance, the Distillation unit model defines the operating pressure, P. The expression variables can also be used and, in the case of the Distillation model, variables such as diam and height are defined. The full list of variables, both unit and expression, for any unit can be listed using the print command in an instance of that unit. For example:

use uk.ac.ucl.che.esf.units
Distillation dist
  print
end

will show something like this:

ESF Input: use uk.ac.ucl.che.esf.fish.units
ESF Input: Distillation dist
003 defining dist, a new unit
Distillation: print
ESF Object dist:
|
|   ---- Unit dist: Short-cut Distillation unit based on FUG ----
|
| type=unit
|         constraint: null
|        interesting: false
|              limit: false
|  post-design **model**: V = 0.761*sqrt(1/P)
diam = sqrt(4/(Pi*V)*(RR+1)*D*22.2*Tdd/273.0/P)
height = 0.61*S+4.27
colcost = (1+(P>3.4)*(0.0147*(P-3.4))) * (4.23*msindex/280.0*7620*diam*(height/12.2)^0.68)
raycost = 0.61*ns*msindex/280*111.41*(diam/1.22)^1.9
instrcost = 4000
maintcost = 0
capcost = colcost+traycost+instrcost
opercost = maintcost
|      **preconditions**: (F>minflow)
|             status: null
|
|   ---- Unit Design Specifications ---
|
| Light Key for Recovery: key undefined, expects Component.
| Operating Pressure [atm]: **P** = 1.0, real value in range [1.0,32.0] with 4 values log-uniform.
| Recovery of keys: rec = 0.98, real value in range [0.98,0.98] with 1 values.
| Reflux rate factor: rrf = 1.2, real value in range [1.2,1.2] with 1 values.
|
|   ---- General Unit Settings ---
|
| **minflow** = 0.0 (Minimum feed flow allowed)
| minx = 1.0E-8 (Minimum key mole fraction allowed)
| te = 1.0 (Tray efficiency)
| Use Eduljee correlation for actual stages: eduljee = false
| Conceptual mode: conceptual = false
| Saturated feed assumption: sfa = false
|
|   ---- Unit Feeds ---
|
| Feed stream to unit: feed = undefined, type Stream expected.
|
|   ---- Unit Outputs ---
|
| Top product stream: tops = undefined, type Stream expected.
| Bottom product stream: bottoms = undefined, type Stream expected.
|
|   ---- Unit heat transfer requests ---
|
| Cooling performed by condenser [kW]: Qc = undefined, expects a heat transfer request.
| Heating performed by reboiler [kW]: Qr = undefined, expects a heat transfer request.
|
|   ---- Unit Design Information and Other Variables ---
|
| ns = 0 (Number of stages)
|
|   ---- End of Unit Variables ----
|
|
| +-- List of local expression variables:
| | variable B =  0.0  (Bottoms flow rate [kmol/s])
| | variable D =  0.0  (Distillate flow rate [kmol/s])
| | variable F =  0.0  (Feed stream flow rate [kmol/s])
| | variable P =  0.0  (Operating Pressure [atm])
| | variable Qc =  0.0  (condenser duty [kW])
| | variable Qr =  0.0  (reboiler duty [kW])
| | variable RR =  0.0  (Reflux ratio)
| | variable S =  0.0  (Number of stages)
| | variable Tbb =  0.0  (bottoms bubble point temperature [K])
| | variable Tbd =  0.0  (bottoms dew point temperature [K])
| | variable Tdb =  0.0  (distillate bubble point temperature [K])
| | variable Tdd =  0.0  (distillate dew point temperature [K])
| | variable V =  0.0  (Velocity of vapour in column [m/s])
| | variable capcost =  0.0  (Capital cost of unit (column, trays & instrumentation) [$])
| | variable **diam** =  0.0  (Diameter of column [m])
| | variable height =  0.0  (Height of column [m])
| | variable instrcost =  0.0  (Cost of instrumentation [$])
| | variable minflow =  0.0  (Minimum feed flow allowed)
| | variable minx =  0.0  (Minimum key mole fraction allowed)
| | variable ns =  0.0  (Number of stages)
| | variable opercost =  0.0  (Operating cost of unit (maintenance) [$/y])
| | variable rec =  0.0  (Recovery of keys)
| | variable rrf =  0.0  (Reflux rate factor)
| | variable te =  0.0  (Tray efficiency)
| | variable traycost =  0.0  (Cost of trays [$])
| | variable x =  0.0  (Bottoms mole fractions)
| | variable y =  0.0  (Distillate mole fractions)
| | variable z =  0.0  (Feed mole fractions)
| +--------------------------------------------
+------------------------------------------------
Distillation: end
ESF Input: end

where some of the variables and unit settings that are relevant have been highlighted in bold text. For instance, the model expression used after a unit design defines the capcost and opercost variables. These could therefore be used in a criterion for ranking solutions. Also highlight, by way of example, are the minflow unit variable and the diam expression variable. The first is used in the unit's preconditions expression and the latter is used in the estimation of the capital cost.

Note that all the expression variable values in the example above are 0. This is because the design method has not yet been invoked.

To change the cost correlations, one need only change, in this case, the expression defined for the model. One can also change the actual criteria used for ranking, as described earlier.

[[api/uk/ac/ucl/che/esf/fish/ps/HeatExchanger.html][Heat exchangers]] are slightly different. Two special commands are defined for these: capcost and opercost, each of which expects an expression. These expressions are evaluated to define the corresponding variables which can then be used in the ranking criteria. There is no generic definition of criteria for heat exchangers so capital and operating costs are all that can be used. Of course, if a more complex cost correlation for heat exchangers is required, the user has the option of defining a new heat exchanger class. The system can be informed of the new class by using the hex command of the uk.ac.ucl.che.esf.fish.ps.Data object.

Global Data

The synthesis procedures described above, as well as post-synthesis tuningmethods, rely on some data which is global to the system. This includes the list of units available for processing (including feed and product tanks), the utilities which can be used for meeting the heating and cooling requirements of units designed, the heat exchanger models, the criteria used for ranking solutions, as well as an assortment of values for cost models and the like. All of these global data are stored in a special object, uk.ac.ucl.che.esf.fish.ps.Data. Defaults are provided for, in particular, the criteria for ranking (total annualized cost based on a 10 year plant life) and utilities (discrete set based on those described by Rathore et al.).

Performance Issues **

This section describes some hints for improving performance. Basically, the following is a description of the main user-customizable factors which affect the performance of the synthesis procedures.

The search space size is primarily a function of the discretizations: the finer the discretization, the larger the search space and hence the longer the synthesis procedure akes. Initial runs should always use a fairly coarse discretization to ensure that some results are generated quickly, giving the user a feel for the type of performance to expect and possibly some feel for the results that are possible. Secondary effects on performance are found from the bounding and the size of the best solution list to present at the end. Bounding should always be turned on, unless the problem includes negative costs (such as product tanks which give a value for the product stream). The larger the number of solutions to present, the less effect bounding will have, however.

Another effect on performance, and possibly on the size of problem that can actually be tackled, is the amount of memory required. The memory needs are directly proportional to the number of solutions in the N-best list because a large amount of the memory requirements are the cost &amp; solution table needed by the dynamic programming aspects of the search procedure. A secondary effect is the increase in search space as a function of N, due to the reduction in pruning from bounding. The use of multiple criteria has the same effects.

By default, unit designs are saved. For large problems, this can have a dramatic effect on memory use as well so, if the problem class is HPS_Problem or a superclass of it, turning off this feature may result in significant reductions in the memory usage.

Flowsheets

The result of the synthesis procedure is implicitly defined in the solution structure encoded in the dynamic programming able. This structure is not immediately useful so the Jacaranda system provides a class for representing flowsheets. This class is able to extract the information from the solution structure to create a flowsheet representation; alternatively, the user may build up a flowsheet directly specifying units, feed streams, and the connections between them. The commands understood by the flowsheet objects are as follows:

build
This command enters a new command mode in which each line corresponds to a source unit and the destination units for the outputs of the source unit. Feed streams will be the outputs of appropriate FeedTank units. The example creates a flowsheet with one feed stream, one distillation column, and two outputs. A special command in this mode is utils which is used to specify the utilities to use in evaluating the flowsheet.
evaluate
Cost out the flowsheet. This includes both capital and operating costs.
generate
Evaluate the flowsheet over the space defined by the ranges of the unit tunable variables. The output consists of the values of the tunable variables and the variables selected using the output command (described below).
optimize
Optimize the flowsheet over the tunable variables in the units in the flowsheet. This assumes that an optimizer has been defined for this object.
print
With no arguments, this command displays the flowsheet textually in a terse form. If the argument " verbose" is given, a detailed output listing is provided including all unit variables and stream contents.
select
This command is used to build a flowsheet from the solution of the synthesis procedure. This command expects three arguments: the name of the synthesis problem, the criterion list to use (0 for the first, 1 for the second, and so on) and which solution to extract, with 0 meaning the best one, 1 the 2nd best, etc. The example shows how to define a synthesis problem, solve it, and then extract the flowsheet for the best solution found. An alternative, and easier, method for generating the flowsheets from a synthesis problem is to use the export command defined for all Problem classes. This automatically generates flowsheet objects for each solution in each criterion list.

Flowsheet objects implement the ContinuationInterface and the ObjectiveFunction interfaces. Flowsheet objects can therefore be used by the different optimizers in the Jacaranda system, such as the generic genetic algorithm and simulated annealing implementations. Through the client/server interface, optimization tools written in almost any other language can interface with Jacaranda for process flowsheet optimization. A recent paper (Fraga & Zilinskas, 2002) used a variety of direct search optimizers implemented in Matlab (actually Octave) for heat integrated process optimization.

Persistent Objects

Jacaranda provides the capability of saving EGO based objects for later use. Instances of saved objects are said to be persistent. All subclasses of the EGO class automatically inherit the ability to be saved and loaded from external storage. This ability is provided by the object serialization features introduced in Java version 1.1.

Both saving and loading objects are taken care of by the input/output interface in use, be it the text based interface which reads in commands from files or the graphical object viewer interface which allows the user to browse through a collection of previously saved objects (in the future, it should be possible to graphically create and manipulate new objects instead of only accessing previously created ones). How and where objects are stored or retrieved from is controlled by the browser, described in the next section.

The Browser

Associated with any instance of Jacaranda (in a single Java Virtual Machine) is a browser (badly chosen name but it's historical... a better name would have been something like manager but this name is reserved for the graphical browsing tool. If you think you're confused, you should see what I'm like these days!). The browser is the link between the object system and the file system (if running the application version of the package) or between the objects and the remote file system (if running through a Web browser; it should be noted that at this moment the remote browser does not support saving objects).

The user does not typically need to worry about the browser. In particular, when used through a Web browser, it's not really possible to do anything different than what the system does by default. When used from a standalone application, however, the user can have control over which directory is used for object storage and retrieval. By default, the local file browser works with the esfobjects sub-directory from where the program was started or, on Unix systems, the esfobjects sub-directory in the home directory. This can be changed within an input file by specifying a different location:

directory NEWDIR

This will create a new local file browser associated with the directory specified and all further persistent object actions will refer to that directory.

Saved objects can be later accessed either through the text based interface (using the load command) or through the graphical interface (uk.ac.ucl.che.esf.ui.Manager).

Global data

The one issue that may lead to some confusion in the use of persistent objects is how the global data settings are handled. All global settings used by the synthesis and simulation aspects of the Jacaranda system are embodied in the uk.ac.ucl.che.esf.fish.ps.Data= object. Saving any object does not automatically save the global data settings. Reloading a previously saved object will use the current global data object settings. Therefore, if consistent results are desired (which is what is typically wanted, I guess), an instance of the global data object should always be saved and restored when associated flowsheet, for example, objects are saved and restored.

Appendix

Installation

There are two different distributions of Jacaranda:

java -jar jacaranda-20020701.jar [options] input files...

You may, of course, use the Java jar command to extract all the files. This will create a subdirectory (subfolder) called uk and subdirectories within there. To use the system once extracted, you will need to point your CLASSPATH variable to the directory in which you extracted the contents of the jar file. So, for instance, the following sequence of commands would be suitable on Linux for extracting the class files and then running Jacaranda:

mkdir Jacaranda
cd Jacaranda
jar -x jacaranda-20020701.jar
export CLASSPATH=".:`pwd`"
java uk.ac.ucl.che.esf.Main [options] input files ...

If you have also received other supplementary files with this distribution, these will be in zip format. There should be extracted into the Jacaranda directory created in the example above. The supplementary files include the documentation (called something similar to jacaranda-doc-20020701.zip) which will be placed in the doc subdirectory, a large number of sample input files (jacaranda-inputs-20020701.zip) in the inputs subdirectory, and the Java and JavaCC source code for the system (jacaranda-src-20020701.zip) in the uk subdirectory. Again, on Linux, we would execute the following command, assuming you received all the supplementary files.

unzip jacaranda-doc-20020701.zip
unzip jacaranda-src-20020701.zip
unzip jacaranda-inputs-20020701.zip

It is recommended that the documentation, which includes this file, be extracted in this manner. When extracted, all the links to the class documentation in this document are available if you use your browser to look at the file doc/guide.html.

Extracting all the supplementary files will required approximately 16 MB of space.

cd BASE
gunzip -c fish.tar.gz | tar xf -

Then change into the fish sub-directory and modify the Makefile found there to reflect the installation directory (you need to change the BASE variable defined near the top of the Makefile).

Compile the system, including both the Java packages and the client interfaces for the client/server implementation (described below) by

cd BASE/fish
make

and, optionally, install the client interface codes:

cd BASE/fish/src/server
make install

The BASE directory is where you would like to extract the FiSH system into. The string BASE should be replaced in the commands shown with the desired location. In step 3, the Java package should compile with no errors although there may be some warnings about deprecated methods depending on the version of Java you have installed on your system. These warnings are not serious and relate to part of the system that is currently not used, or is used for aspects which are not critical to the operation of the overall system. Jacaranda should run under versions of Java from 1.4 (released in early 2002) upwards.

Versions

This document refers, hopefully, to the latest version of the Jacaranda system. The numbering of the versions reflects the ancestry of some of the basic ideas. The immediate precursor to the Jacaranda system was the CHiPS process synthesis package (written in C and Fortran at the University of Edinburgh) although all the code in the Jacaranda system is new. The last development version of CHiPS was numbered 11 so the first version of Jacaranda started as revision 12. What follows is a brief description of the main changes or features in each major version.

It should be noted that recent distributions of Jacaranda, particularly as jar files, now come with a date as part of the name of the distribution. This date should be referred to in all communication with the author of the package so that he can help identify whether any problems you may be having have been rectified in a later version.

Current restrictions and known problems

At this point, I would like to mention some of the more important restrictions or limitations in the current version of the software:

In summary, most of the author's effort to date has been on the actual synthesis procedures. All other code has been generated to help with developing the synthesis methods. In the future, however, it is envisaged that work will be devoted to improving links between the Jacaranda system and any open software in the flowsheeting area that appears (due to work in the CAPE.OPEN and Global CAPE.OPEN groups, for instance). Until then, the post-synthesis features will continue to be relatively primitive in comparison to the synthesis procedures.

References

The following are some of the articles referenced in this document. A full list of the author's publications can be found on his web site.