User Guide Main Page

BuildSim on the Web

Tritera Website

Advanced Feature - Code Generation
BuildSim Gold includes a Code Generator. It creates C++ and Java code representing the simulation/control system defined in the project window. This capability can be used in several interesting and powerful ways. For example, a simulation of a control system can be developed in BuildSim. Once the simulation of the control system is working according some design criterion, the controller system element of the simulation can be collapsed into a SystemBlock and code can be generated for it.

The BuildSim application uses a BuildBlock interpreter which "simulates" the system begin modelled. The interpreter is object-oriented and relies on the a large class library which defines each class of BuildBlock (more than 50 base classes). Its this layered design that makes code-generation an easy and natural process. At this time, the code generation feature supports C++ and Java code generation.


  • Compiles to any platform - Including Java Virtual Machine!
  • Fully Documented
  • Efficient, Object-Oriented Code
  • Classes can be subclasses for Specialized situations


The new beta test version includes preliminary versions of the C++ and Java Automatic Code Generators. These code genrators are preliminary and are subject to change. About 90% of the BuildBlocks are supported in the code generators, so not all of the BuildBlocks wil create the approriate C++ or Java code. Any feedback you care to offer with regards to how the code generator operates, what it produces and the quality of the code will be veru much appreciated!

Code Generation Process

Code generation follows a 3 step process:




In BuildSim, a complete system simulation or model can be created - including plant dynamics, controller logic, documentation notes. This model can be used in simulation studies to refine the design, support analysis and trade studies.

Generate source code in the following languages:

The source can then be compiled and linked with the support libraries to create a real-time process controller, or model for the target or host computer.

The source code include full comments culled driectly from the project notes from the original BuildSim project document.

Code Generation Applications

BuildSim Automatic Code Generation provides a platform neutral approach to "exporting" a BuildSim "Project". In otherwords, the simulation you create in BuildSim can be easily exported and reimplemented on virtually any computer platform. Furthermore at least 2 "standard" languages are supported at this time:


Supported Platforms/Libraries


Win32 Library