|
This web site presents an implementation of Simulated Annealing using a hybrid software system of D and FORTRAN (D is one of the newest programming languages, FORTRAN is one of the oldest). Site additionally covers other Numerical Recipes topics, as well as Artificial Life, Model Rockets, Object Pascal, COBOL, etc. The source code files available for download on these pages can be used as learning examples and as building blocks for writing your own applications; they are enhanced and bug tested periodically - occasionally, as with any software project, minor glitches will sneak through. These are corrected and uploaded as discovered. The projects on these pages employ software re-use extensively - one .dll may be used by multiple projects written in several different programming languages. Numerical Recipes: The Art of Scientific Computing is a series of editions covering numerical computations, published by Press Syndicate of the University of Cambridge. Over the years, editions have been published in the FORTRAN, Pascal, C (and other) programming languages. Simulated Annealing is one of the subjects covered in several editions of Numerical Recipes: The Art of Scientific Computing. Simulated Annealing, also known as the traveling salesman problem, is used for combinatorial minimization. The traveling salesman problem involves a salesman who must travel to a large number of cities (or nodes, represented by X Y coordinates). What is the shortest path the salesman can traverse visiting these cities? (What configuration produces the shortest distance, or lowest cost?) In a very large 'solution space', there are some solutions that are 'low cost' (global minima) relative to other solutions. Simulated annealing searches for these 'low cost' solutions. Simulated annealing has also been applied to designing integrated circuits.
The traveling salesman problem is a NP-Complete problem, where N equals the number of nodes (or cities), and the computation time is proportional to eN. DMD D .DLL calling FORTRAN .DLL (D file) Simulated Annealing D .dll calling FORTRAN .dll; includes D source file downloads. DMD D .DLL calling FORTRAN .DLL (FORTRAN file) Simulated Annealing FORTRAN .dll (mathproc.dll) called by D module dnrprocs.dll. mathproc.dll is used in multiple projects. XBCRANK.X
Structure and Elements of a FORTRAN Program Layout, keywords, specification statements, and executable statements of a FORTRAN program. Additional subprograms in mathproc.dll Miscellaneous FORTRAN Mathematical Subprograms - point rotation, triangular segment area, polynomial roots, synthetic division. Additional Programming Topics D/Object Pascal/Lazarus/FORTRAN Mixed Language programmingFree Pascal calling FORTRAN subprograms in mathproc.dll Describes how to use Pascal to call FORTRAN Mathematical Subprograms Lazarus, Free Pascal, Silverfrost FTN95, and Numerical Recipes: The Art of Scientific Computing Lazarus Program (via a Free Pascal .dll) calling FORTRAN subprograms. Simple D program to call Pascal .dll - D files Describes how to use a D simple command program to call Pascal functions in a Pascal .dll; using D extern statements, passing parameters, compiling and linking. D Programming Language, Silverfrost Fortran 95, and Numerical Recipes How to call FORTRAN subroutines using a simple command line Digital Mars D main program. Pascal .dll called by simple D program Pascal functions called by D simple command program Silverfrost Fortran 95 subroutine to compute Nth Root of X FORTRAN function (including source code) to compute Artificial Life, Strange Attractors, & Bifurcations (D & Object Pascal)
Unit MRcommon.pas (currently still in development), consisting of Global CONSTants, VARiables (many of which are passed to various Pascal procedures/functions, which in turn may pass to FORTRAN subprograms), and Public Procedures, is used in all of the Lazarus Model Rockets & Boost/Gliders Units. Calculating Model Rocket Coefficient of Normal Force & Center of Pressure mathproc.dll FORTRAN Engineering Subprograms called by Object Pascal .dll; introduction to rocket aerodynamics & stability; includes source file downloads - tir33.for, missle.inc, missle02.pas. missle02.pas includes a Pascal implementation of ELLIPSE_SEGMENT algorithm from CALCULATING ELLIPSE OVERLAP AREAS, used for finding the surface area of a rear swept elliptical fin/wing where the root chord does not pass through the ellipse origin. Elliptical area / perimeter calculations can be complex, involving geometric angles, parametric angles, integrations. Both the unswept/swept elliptical fins/wings area and perimeter calculations are approximations. Multi-Stage Model Rocket User Interface Using Lazarus Tab Sheets (TPageControl & TTabSheet) tutorial; each Tab Sheet represents a model rocket stage. Brief introduction to Lazarus sub-forms. User interface for inputting rocket design parameters and Calculating Model Rocket Coefficient of Normal Force & Center of Pressure (link above). Lazarus Body Tubes Sub-form User Interface Lazarus Sub-form, Grid Cell Background Color, StringGrid Cell Editor, and Calling FORTRAN. Detailed introduction to Lazarus sub-forms and TStringGrids; example of Lazarus unit calling FORTRAN subprograms via Object Pascal .dll; includes downloads. Lazarus Model Rocket Fins and Glider Wings User Interface Lazarus Sub-form, TImage.Picture property, MessageDlg(...), (MRmain for This form is used for input of flight surfaces data. Another example of calling FORTRAN from Lazarus via Object Pascal. Includes downloads. Model Rocket Parallel Stages Lazarus Sub-form user interface for inputting Parallel Stage data and adding Parallel Stage Pods to a rocket's nth stage. Also demonstrates calling FORTRAN mathproc.dll Center of Pressure cp and Coefficient of Normal Force CNα subroutines from Lazarus via an Object Pascal Library; includes downloads, compiling instructions (including brief hints for building sttstcs.for & mathproc.for, main Lazarus project MRmain). Model Rocket & Boost/Glider Drag Coefficient Approximation D Windows 'testing' program (still in development) to estimate Drag Coefficient for model rockets, parallel stages, boost/gliders, and rocket/gliders. Run time edit control creation. Engine Thrust File I/O - missle05.pas Object Pascal Windows program to input and save to a file thrust points from a model rocket engine thrust time curve. Requires missle.inc and missle02.pas from Calculating Model Rocket Coefficient of Normal Force, uses unit missle06 to write thrust points file; Lazarus programs can call a .dll (missle13.pas; also contains Parallel Stage Pod and Drag Coefficient procedures; portions still being developed) which uses missle06.pas. Demonstrates how to call D procedures using its mangled name or its unmangled name when declared as extern (C), right click short cut popup menu processing via calls to D module hedtio. Requires additional source files found elsewhere on this website. LftBdy10.pas - Lifting Body related functions/procedures. Currently in development. COBOL Program Structure and Elements Structure, keywords, data definition, and executable statements of a COBOL program COBOL Files - Combining Fujitsu COBOL 3.0, PowerCOBOL 3.0, Silverfrost FTN95, and Numerical Recipes COBOL GUI program calling FORTRAN Subprograms : The COBOL "wrapper" - source files, compiling, and linking. FORTRAN File - Combining Fujitsu COBOL 3.0, PowerCOBOL 3.0, Silverfrost FTN95, and Numerical Recipes A FORTRAN backend used by COBOL, Lazarus, and D programs Selected Combining Fujitsu COBOL 3.0, PowerCOBOL 3.0, and the USPS Address Matching System API source files: INVKSHT.COB - invokes PowerCOBOL sheets USPSFILE.COB - mailing list input file Select Assign statement. Placed in ENVIRONMENT DIVISION, INPUT-OUTPUT SECTION, FILE-CONTROL. USPSLIST.COB - mailing list input File Descriptor and record layout. Placed in DATA DIVISION, FILE SECTION. Record layout is designed so it can be used with several different mailing list input formats. OUTFILE.COB - output file Select Assign statement. Placed in ENVIRONMENT DIVISION, INPUT-OUTPUT SECTION, FILE-CONTROL. OUTREC.COB - output File Descriptor and record layout. Placed in DATA DIVISION, FILE SECTION. Record layout is designed so it can be used with several different mailing list input/output formats. Z4GBLPRM.COB - AMS API Common Data used by above. Privacy : Some thoughts on privacy during the computer
Any and all © copyrights, ™ trademarks, or other intellectual property (IP) mentioned here are the property of their respective owners. No infringment is intended. Feel free to use any of my material; please give credit (same idea as Copyleft). Currently moving some pages from one host to another; some links may be temporarily broken. Depending on O/S, Browser (and plugins), Browser may not correctly include L/F. Rest assured, both issues will be corrected. Website is supported on DESKTOP platforms only (Chrome on both PCs and Android tablets may be problematic). This index page is an "alternate" main page to selected pages of author's website, focusing on different areas. To return to this index page, use the Browser's BACK button. The author of this web site is not affiliated in any way with Press Syndicate of the University of Cambridge. |