Issues Creating Mathematical Program (Report Generation) RRS feed

  • Question

  • Okay, let me start here by giving some background.  I am a structural engineer.  My goal is to create a GUI/Form that I can input some basic loading, material and size information and have the program perform the calculations and/or design of various elements, following the load paths down, and ultimately creating a professional set of calculations for submittal to whatever authority is requiring them.  


    I'm not well versed in programming.  I've created some fairly fancy/extensive excel spreadsheets with VBA involved, but that is about it. 

    That being said, my initial plans here are to design everything using VB.NET (express edition) since I know how to create forms/GUIs and some amount of basic programming in VB already. 

    However, I’ve hit a few snags.


    The first module I need to create involves building a number of equations, then running those equations through bounded integrals. VB does not do integrals - I know... I can use MathCad to solve them generically, but the result is several pages long… not ideal.  I’ve done a few days of research in how to solve this, and am coming up empty.  I’m not interested in developing my own numerical solutions, as the integrals and formulas are complicated enough that most such solutions either won’t work accurately or would result in coding lengthy enough that I might as well put the several-page algebraic solution in.  I’ve found that there are a few packages in Python (i.e. free) that have these functions built in – can I somehow use the Python Functions in VB? If I do, will that create issues if I try to install the app on another computer?  Are there any canned integration functions that I can use in VB (free…) ?

    I do find that there are some free library’s for java and C listed on


    too, but the coding appears less direct (not just “integrate(f(x),x,low,hi)” like the python functions) but again, can I use such functions in VB – maybe call to C to run the function and report?


    FYI – my current solution is to pass the parameters into MathCad and call the results back into the VB script – this work fine, a little slow – but the main problem will be portability.


    How to generate professional equations, like those from MathType, based on the parameters input is my next issue.  It surprised me a bit to find that I could just send the info to the MathType program and copy the picture over… I have found that Design Science offers a free SDK, but after looking into it, I’m still not certain that it will do what I’m aiming for here

    any suggestions?


    As for efficiency.  I plan on having the individual modules (if I’m using the term right) run independently with their own GUI, in addition to working collaboratively under a master GUI.  The end product will contain so many components that will need to pass information back and forth that I’m afraid of bogging the system down.  Would I want to make each module its own entire program and then call back and forth, or should everything be contained? Any suggestions on further reading maybe?

    Wednesday, August 12, 2009 2:33 AM

All replies

  • Hmmmm, how time is not an issue.  I would recommend that you find a skilled local programmer who can act as a personel mentor for this project.  That said, here's my 2 cents

    1) You can use IronPython (google/bing it), there is a fairly good writeup of how to call to and from IronPython from other .NET based languages.  You could also use C libraries.  If the C source is available you could compile them into a .NET dll, if not you will have to call them by declaring them external to your program then link them with your exe/dll.  Here's info on how that might be done in C# http://msdn.microsoft.com/en-us/library/e59b22c5(VS.80).aspx (not sure about VB, but here is a thread about that issue: http://www.vbforums.com/showthread.php?t=220945).  Calling Java from C# is much uglier and I would not recommend it.  In any case when you install this on a different computer you will need all the things that you are using, so if you use IronPython, then that will have to be installed.

    2) You might consider looking at Tex (there is a windows distribution, and again this will have to be installed with your application on any computer using your software system).  You might also look in to MS's WPF based FixedDocument object(s).  If the equations are too complex you might consider drawing them as a picture/graph or using alternate fonts glyphs to render them as text.

    3) First rule, make it work ... then make it better.  Don't worry too much about efficiency unless things become intractable.  It's difficult to give any real guidance as to wheither you should write this in a distributed manner or a monolithic manner.  You need to read up on the concepts of threads and processes.  If you find that you want to create seperate process spaces the commuicate between each other you might want to use something called a "named pipe" (it's a type of file that connects two running pieces of code).  I suspect that you may be able to do quite well writing a single application that uses threads to handle multiple tasks at one time.

    I wish you good luck with your project.
    Wednesday, August 12, 2009 5:59 PM