AMPL Book Download Script

AMPL provides their user manual freely here.

This is a shell script that

  • downloads them
  • renames them to their human title
  • creates a compressed file for backup
# -*- mode: sh; -*-
DOWNLOADDIR="$HOME/tmp/AMPLBOOK-`date +%Y-%m-%dT%H-%M-%S%z`"
curl --limit-rate 56K -o ./01-Title_Pages-title.pdf
curl --limit-rate 56K -o ./02-Table_of_Contents-contents.pdf
curl --limit-rate 56K -o ./03-Introduction-intro.pdf
curl --limit-rate 56K -o ./04-Chapter_01-Production_Models-_Maximizing_Profits-tut1.pdf
curl --limit-rate 56K -o ./05-Chapter_02-Diet_and_Other_Input_Models-_Minimizing_Costs-tut2.pdf
curl --limit-rate 56K -o ./06-Chapter_03-Transportation_and_Assignment_Models-tut3.pdf
curl --limit-rate 56K -o ./07-Chapter_04-Building_Larger_Models-tut4.pdf
curl --limit-rate 56K -o ./08-Chapter_05-Simple_Sets_and_Indexing-sets1.pdf
curl --limit-rate 56K -o ./09-Chapter_06-Compound_Sets_and_Indexing-sets2.pdf
curl --limit-rate 56K -o ./10-Chapter_07-Parameters_and_Expressions-params.pdf
curl --limit-rate 56K -o ./11-Chapter_08-Linear_Programs-_Variables._Objectives_and_Constraints-linprog.pdf
curl --limit-rate 56K -o ./12-Chapter_09-Specifying_Data-data.pdf
curl --limit-rate 56K -o ./13-Chapter_10-Database_Access-tables.pdf
curl --limit-rate 56K -o ./14-Chapter_11-Modeling_Commands-command.pdf
curl --limit-rate 56K -o ./15-Chapter_12-Display_Commands-display.pdf
curl --limit-rate 56K -o ./16-Chapter_13-Command_Scripts-script.pdf
curl --limit-rate 56K -o ./17-Chapter_14-Interactions_with_Solvers-solvers.pdf
curl --limit-rate 56K -o ./18-Chapter_15-Network_Linear_Programs-network.pdf
curl --limit-rate 56K -o ./19-Chapter_16-Columnwise_Formulations-colwise.pdf
curl --limit-rate 56K -o ./20-Chapter_17-Piecewise-Linear_Programs-piecewise.pdf
curl --limit-rate 56K -o ./21-Chapter_18-Nonlinear_Programs-nonlinear.pdf
curl --limit-rate 56K -o ./22-Chapter_19-Complementarity_Problems-complement.pdf
curl --limit-rate 56K -o ./23-Chapter_20-Integer_Linear_Programs-integer.pdf
curl --limit-rate 56K -o ./24-Appendix-refman.pdf
curl --limit-rate 56K -o ./25-Index-index.pdf

The perennial fear revealed by a rules engine

When seeking to attain mastery of rules engines (RE), you will experience an odd phenomenon. Others, upon hearing some details of your course of study, will react in a what initially appears to be a manner angrily dismissive of the topic itself. This is strange given the fundamental role that computation plays in literally everything we do, from a manifest perspective, with hardware computers, organic computers, and other.
Upon further interaction, and reflection, it quickly becomes apparent what motivates this reaction is fundamentally, the re-experience of a long inaccessible, perennial fear.
Continue reading “The perennial fear revealed by a rules engine”

Ontological Management with Protege OWL and Jess

Part of my quest to learn more about rules-engines involved the desire to find a really good approach for knowledge management. The short story is that when you work with a subject matter expert (SME), you need to find some good way to capture the domain data and behavior, the rules, actions, and everything else necessary to make sense of things. This need isn’t unique to knowledge engineering and AI, of course, all engineers face it, especially software engineers. Object-oriented analysis and design is one good approach, and there seems to be a lot of overlap. One interesting outcrop of the need is the Insurance Application Architecture, an OO model (and more) to help insurance companies manage their intellectual assets.
The client developed a custom tool to manage the concepts (although customizable tools like MagicDraw certainly are an option, too), and I had always wondered if there was some standard way of approaching that kind of problem. While researching rules-engines I was delighted to learn about knowledge engineering, the semantic web, and consequently ontological engineering and management.
Specifically, digging into the tool Protege-OWL, I found something quite similar to what I’d seen developed as custom. Although it is too soon to say they are equivelant, it is pretty interesting to find out. The fact that there is a Jess plugin (JessTab) to let you play, even better!

Rules-Engines Recommended Wikipedia Reading

You know that advice “trust but verify”? It couldn’t be more true when it comes to the realm of applied or narrow artificial intelligence, specifically with respect to rules-engines. There is more dis-information out there on rules-engines than on any other tech topic that I’ve ever researched. It is really, really shocking the amount of inaccurate, confused, and just plain wrong information out there.
The problem with it is that it makes it harder for people who want to learn more about the topic by wasting their time and presenting the topic as very, very shallow and simplistic. It makes rules-engines very, very easy to blow off as sort of a joke and nothing more than pricey business rules engines. That is sad, too, because rules-engines provide a very nuanced and special programming style all their own that every programmer should at least learn.
In order to avoid this, I tried to diligently record all of the materials that I have found valuable, including Wikipedia pages. My hope in sharing them is that they provide some baseline for getting started, that worked for at least one person. My approach was to read and bookmark internally to the site, and also do research out of the site. It wasn’t a race, I took time to take it in, reading as many times as necessary for it to make sense, including re-reading it over as many days or weeks as I saw fit. The topics are grouped into sections that are somewhat logically related, and definitely do relate to one another, and try to help make it easier to access the topics in the following group.
Rules-engines comes from a rich computational heritage, but strangely get a fraction of a percentage of coverage even in comparison to seemingly fringe topics like Lisp, so I hope that you have as much fun reading as I did, it was really enlightening!
Continue reading “Rules-Engines Recommended Wikipedia Reading”