Eclipse external class development environment
Installing the Eclipse external class development environment
To develop external classes, if you do not already have a Java development environment, you can use a freeware application called Eclipse.
With Eclipse, you can write your classes in Java, and compile and test their integration in Thermoptim. To make things easier, a start-up workspace is provided. It is called Thopt25_EclipseDemo.zip and makes use of the demo version.
To install the development environment, the following files, provided on the website or downloaded from the Internet, are necessary:
the Eclipse installer,downloaded from the Eclipse site;
The archive ThoptEdu2.jar or Thopt2.jar of Thermoptim and your license keys
the demo version of Thermoptim and external libraries. For other versions, you simply have to replace the ThoptDemo2.jar file by ThoptEdu2.jar or Thopt2.jar, and to alter the settings of the libraries.
Presentation of the workspace
The workspace consists of the following:
in the left part of the screen there is a list of Java files, including (package "pilot") a small class called Starter, which will launch the driver, and classes used to drive Thermoptim from Eclipse, and finally, (package "extThopt") which contains the external classes.
in the right part you have the various tabs containing the code of the classes. Pilot.java is one that can launch Thermoptim, using the method loadProject() on the screen. In the example above, we have entered a number of examples, knowing that only the last loaded into the array args  is taken into account (this way of doing allows you to very easily change the example to load by moving the two appropriate lines);
the bottom window is for results of tasks and messages.
In the following section, we are assuming that the reader is familiar with the basics of Java. Otherwise, we suggest reading a beginner's manual before trying to use the development environment.
After having downloaded Eclipse files, unzip the archive and launch Eclipse from the root directory.
Unpack the file Thopt25_EclipseDemo.zip, and place the generated folder iwhere you wish. This is a workspace containing all the files you need to work with Thermoptim. Add the archive ThoptEdu2.jar or Thopt2.jar of Thermoptim, as well as your license files (all of these files are located in the Thermoptim installation directory). Launch Eclipse, select “File/Switch Workspace/Other” and choose the directory where you unpacked the file Thopt25_EclipseDemo.zip.
The application may run correctly because it is not fully configured. You have to indicate the libraries required by your application, in this case all of the libraries Thermoptim needs to work, plus Thermoptim itself. Open menu Projects/Properties/Java Build Path/Libraries/Add JARs. The screen you get looks as the one below. Select all files with extensions .jar and .zip, except ThoptExec.jar which is not needed.
Click on the tab “Order and Export” then and select all the files you have added.
Once the archives are selected, click “OK”. You can now start developing your external classes.
Documentation, API and source code of external classes
To guide you in your early work, Thermoptim documentation contains several examples treated and a third volume of the reference manual dedicated to external classes.
The source code of the base classes of the package extThopt is given in the attached archive src.zip. The compiled versions of these classes are already contained in the archive extThopt.zip, and therefore should not normally be loaded into the development environment. You can edit them directly, but they may no longer be compatible with the “official” versions of the Thermoptim external classes.
Appendix 1 of the third volume of the reference manual describes how they are used and gives a number of examples. Appendix 2 gives the code for the Thermoptim methods that return Vectors whose details it is useful to know for programming external classes. Appendix 3 contains a brief description of the methods in the Util class.
Finally, it is recommended to browse the code of basic classes of extThopt package that contain various methods that have been written to simplify the development work of external classes, and whose use is illustrated in the examples of classes that are provided. The API (Application Programming Interface) of the Thermoptim methods accessible from the external classes is defined in the JavaDoc that is in the attached archive "API_externe2.zip".
Examples of external classes are provided and documented in the model library .
The Thermoptim external classes are governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulatedby CEA, CNRS and INRIA.
As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.