HP Forums

Full Version: Linear Optimization/Programming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi,

in the last few days I've made a new version of one of my old math programs, which I've already programmed for many calculators (Sharp PC-1500, HP-48, TI-92) and also as DOS-version.

It is about Linear Optimization (also called Linear Programming in English), and it's a quite simple program (using the Simplex Method) but has one advantage over almost all other (free) LP programs that I saw on the internet: it calculates all solutions (if there are more than one), not only the first solution found!

Since nowadays I doubt that anyone would still like to use an old DOS-program, I've now rewritten it as Windows program (in Borland Delphi), but nevertheless the GUI is rather simple: just functional and comfortable, but without any further gimmicks (GUI programming is indeed nothing that I like very much).

So if anyone is interested and has any use for it - it's called LinOpt v5.0 and can be downloaded from my website:

http://fhub.jimdo.com/

You find it at the bottom of the right column on my site, and it includes both, an English and a German version. I've not yet included any description (that's also something I don't really like), but anyone who knows what Linear Programming is, will certainly have no problems to use it. ;-)

If you have any questions about it or any ideas how to improve (or extend) this program, then let me know ...

Franz

PS: If you want to try a LP problem with multiple solutions, here's a simple example:

3 Variables, 2 Constraints, Maximize

Constr.1: 2 1 3 <= 10
Constr.2: 2 3 7 <= 15

Objective: 2 1 4 ..... 1 solution
4 4 10 ..... 2 solutions
2 1 3 ..... 3 solutions
2 3 7 ..... 4 solutions

And if you add one more constraint (no need to reenter everything else!)
Constr.3 0 0 1 <= 2
with the last objective '2 3 7'
then you even get 5 solutions!


Edited: 31 July 2013, 11:56 a.m. after one or more responses were posted

One of your other programs looked interesting. I downloaded it and was a bit surprised by the result:

This is what Symantec Anti-Virus says:

Scan type:  Auto-Protect Scan
Event: Security Risk Found!
Risk: Trojan.ADH.2
File: C:\Dokumente und Einstellungen\pott01\Eigene Dateien\Downloads\WinSomofi.exe
Location: Unknown Storage
Computer: DE110006
User: KOSTALDE\pott01
Action taken: Cleaned by Deletion
Date found: Mittwoch, 31. Juli 2013 16:35:41
Is my employers IT just a bit paranoid or is there a real problem? I'll try this at home as well.

Harald

Edited: 31 July 2013, 10:36 a.m.

Quote:
Is my employers IT just a bit paranoid or is there a real problem? I'll try this at home as well.

No, there's no problem at all, the reason is just that I've used an EXE-packer and some AV programs principially think such packers are suspect.

BTW, you've indeed found my most important program (WinSomofi) at all, on which I've worked even more than 10 years for the DOS-version (doing in fact EVERYTHING myself, including all calculations and even drawing the worldmap point for point). ;-)

The Windows version (WinSomofi) then was my next challenge, because this was even my first Windows program at all, and I had to learn lots of stuff to port the Turbo-Pascal version to Delphi.

Franz

Edited: 31 July 2013, 10:47 a.m.

The HP email scanner always strips away the little string tool we use to make language strings for the calculator. Claims it has a virus that will destroy the world. They've recently upgraded the scanner so that it totally ignores extension and actually opens and finds it inside every compression archive I've tried. Very annoying. :-(

TW

Glad to see that I'm not the only one still using Delphi... now I know that there are at least two of us left! :-)

Quote:
Glad to see that I'm not the only one still using Delphi... now I know that there are at least two of us left! :-)

Well, I guess there are many more. ;-)

In my opinion Delphi is a great IDE (and Pascal a very comfortable and powerful programming languáge), so I really never saw any reason to switch to e.g. C++ just because it is 'modern'. But I've tried also a few other languages and can write no too complicated programs with them, but Delphi/Pascal is still my favorite.

Franz

Luckily ours is a bit more crude. Simply changing the extension to something it doesn't recognize helps ;)

It is a very interesting program indeed. I am sure it's quite a challenge to write something like that.

Thanks for sharing!

I remember beta testing the first version of Delphi!! I am sure it evolved to become more powerful since it did not have to adhere to many programming language standards.

What version of Delphi do you currently use?

Namir

Edited: 31 July 2013, 9:54 p.m.

Tim, you're not alone! My G-Data Antivirus package used to kick in during the build process of WP 34S, deleting one of the helper programs just created by Win-GCC. I had to disable one of its scanner engines to be able to build WP 34S again..

Quote:
What version of Delphi do you currently use?

I'm still using Borland Delphi 7.

I also have Delphi 2005 (which was also free at some time), but this package includes just too much garbage that I would never need.

Franz

Delphi 5 and XE2 for most of my code. The latter mostly due to needing to work on some 64-bit utilities. Delphi 1-2 is where I started, though.

If you haven't followed Delphi's progression through the years, you may be surprised how many programming language standards have been incorporated into the codebase now. It's a very mature and capable platform.

I just want to collaborate that this is typical security software behavior. Actually it often seems to me that this sort of thing is laziness and / or political... Not so much in this case but still, I mean the security program could easily look in there and actually check for nefarious contents, but that would require real effort. So much more user friendly to take a lazy abstract position and the summarily delete programs. I mean I am always thrilled to find valuable legit tools deleted from my machine. I find that I can never rely on any security products that are this lazy. Much more aggressive designs are necessary these days. Okay I'll climb down of the box now.

I've have been using Borland C++ Builder (has a new name now of course) since version 1.0. Also use Delphi for some coding, usually as object files compiled into a mainly C and or C++ program.

Make that three :)


Well Lazarus/Free Pascal.

Updated LinOpt v.5.0: added a short program description

http://fhub.jimdo.com/

Franz