Application of the AutoLisp simulator
Implementation of a hall pricing program
The pricing of a hall structure is a comlex process.
Hall pricing means that an engineer or sales person generates a quotation
for the the whole structure, including the cost and the weight of the
components and the structure.
Beside the cost, the weight is also important to decide how many and what type
of trucks are required to deliver the components of the structure
to the building site.
During the pricing
process all components must be accounted. Figure 1
shows a general overview of a hall structure. The main structural system
of a hall structure consits of frames.
To be able to cover the hall a girder system is also introduced. Finally
trapezoidal sheeting is used to cover the hall. The different structural systems
are attached to each other by screws and bolts. The joints and details are
dictated by the engineering design as shown in Figure 2.
The complexity of the figure also shows that the pricing program
must include a lot of engineering know-how.
The original pricing program has been implemented in AutoLISP under
The program accepts user input through a
series of dialog windows. The minimum required list of input contains:
|Figure 1||Figure 2|
Using these input data the pricing program draws the 2D views of the hall structure
in AutoCAD as shown in Figure 3. At the same time the AutoLISP program attaches
non-graphical data to the graphical objects, for example in a simple case
the type of the object and
how many screws or bolts are required to fix the component. When the design process
is finished the generated 2D drawings can be used by the engineers or fabricators,
but more importantly
the price and the weight of the hall structure can be determined from the
non-graphical data. A part of the generated output in Excel format is shown in
- the distance between the frames, which determines the length of the hall;
- the distance between the front wall columns, which detetermines the width
of the hall;
- the height of the wall;
- the inclination angle of the roof;
- the distance between the girders on the roof and on the walls;
- the type of girders on the roof and on the walls;
- the type of panels on the roof and on the walls and the area to cover;
- the type of windows and doors, their size and their positins; and
- the place of the gutters.
New company strategy
The implemented AutoLISP program
is mainly used by engineers as the knowledge of AutoCAD is also required.
However it became a requirement that marketing and sales personal
should be able to use the pricing program. To solve this problem
the company has decided to implement a new strategy.
The analysis and pricing part of the design process is centralised. The
programs to perform these tasks are placed on a central server. A new
graphical program has been created which can be more easily handled and it does
not require any engineering knowledge. This graphical program can connect to
the central server, where all engineering decisions and calculations are made.
This means that the engineering know-how and the company resources
are tightly controlled, as they are kept on the central server and
the newly developed graphical program can be distributed freely as it does not
contain any company information. In this way
it is possible for an international company to transfer its design
process to the Internet and to make a unified design interface for
all sub-branches and sub-contractors in different regions of Europe.
To achieve this strategy a working pricing program is required.
To reprogram the
original pricing program, containing a lot of engineering know-how
would be very difficult. Furthermore even if the original AutoCAD system
is kept as an execution environment, problems would arise as it
is not scalable, since for every execution the full featured
CAD system has to start up. Moreover the execution of the AutoLISP
pricing program would require several copies of AutoCAD as several
simultaneous connections can be made through the Internet.
To avoid all these problems the current project has been initiated to create a
simulation environment which can execute the already implemented pricing program.
This means that an AutoLISP language simulator has to be implemented.
For the current project, to implement the AutoLISP execution environment,
one of the most modern Scheme implementations has been selected.
The reasons for selecting PLT-Scheme are:
- PLT-Scheme is a very-well supported, full implementation of the Scheme language
with many important extensions.
- Inclusion of a sophisticated macro system with special
syntax transformers that enable the definition of other languages
- The PLT-Scheme system can compile the source code, it can use
a JIT compiler and it can create an executable program. This is very important
for two reasons: speed and security. The company is designing very large
structures with hundreds or thousands of components therefore speed became
crucial. Secondly the company wanted to put only an
executable on the server and not the AutoLISP source code.
- AutoLISP is based on David Betz's XLISP therefore it could have
been an obvious choice to use XLISP for this simulator, however
XLISP has much less features to support the implementation of the partial
CAD system which is also required for this simulator. Furthermore
a functionality is required to handle XML files which is available
in PLT-Scheme but not in XLISP.
- The issue has been raised that why I have not used another Lisp
dialect for this project. I know that there are well-developed
Common Lisp systems and some of the Common
Lisp projects have the above described criteria but I have never used them.
At the time of this
writing I have several projects in Scheme but none in Common Lisp.
I only suspect that if I had used Common Lisp for this project I would
also have several problems to implement this project.
Implementation details of the AutoLISP simulator in PLT-Scheme
Some details of the program
For further details or enquiries, please contact the author.
The above described application is already in use by the company.
- 20 dialog windows under AutoCAD
- AutoLISP code: ~23000 lines in 59 files
- PLT-Scheme code for the AutoCAD-AutoLISP simulator: 5600 lines in 18 files
- I kept a record as I was developing the AutoLISP simulator. Time spent on the development of the AutoLISP simulator: 134 working hours. The pricing calculation program has been developed in the past 3 years.
- Size of the compiled program under Windows by PLT-Scheme v 350: 7.5 MByte
Copyright © 2007,