Supercharge your optimization problem solving with Gurobi

Photo by S&B Vonlanthen on Unsplash

When we go on a big trip, whether it is a city tour or a backpacking expedition, we all face the question: what should put in my luggage? Should I bring an extra sweater because it might be cold, or should I bring a raincoat because the weather forecast seems to call for rain? Should I bring more socks or more underwear? Should I bring a laptop or will a tablet do fine? When you’re pondering these questions, you’re solving a knapsack-type problem: Given limited space and weight, you’re assigning values to items and set constraints on them. For example…

A Cautionary Tale Told With The Wolfram Language

Photo by vaun0815 on Unsplash

Few parents would be comfortable with putting their baby in a room with a crocodile. They understand that babies and crocodiles have very different opinions of one another. A baby is trusting and seeks to explore and make new friends. A crocodile sees a baby as a nice afternoon snack. For most people, that’s the end of the story, but for logicians, puzzlers, and mathematicians like Lewis Carroll the story only just begins here.

Lewis Carroll, the author of the famously strange “Alice in Wonderland” story, was also very interested in logic puzzles. He wrote the following “baby-crocodile puzzle” that…

An Introduction to the Wolfram Function Compiler

At the core of the Wolfram Language sits an expression evaluator that transforms input expressions into computed results using standard evaluation rules. This evaluator is what makes the Wolfram Language (abbreviated here as WL) incredibly flexible and powerful, but there is a performance cost to running individual expressions through this evaluator. This story shows how you can use the new Wolfram function compiler to get blazing fast performance. The techniques described here formed the computational basis for the creation of the following video:

The Basics

Let’s take a look at a very basic example. Suppose we want to numerically square lots…

A Computational Thinking Story With the Wolfram Language

Photo by NASA on Unsplash

Space is big, really big. However, space around Earth is getting more and more crowded. Every time a new spacecraft is launched little bits and pieces end up in orbit around. The US Space Surveillance Network estimates that there are over 100 million pieces under 1 cm floating around Earth, about 900,000 pieces in the range 1–10 cm, and about 34,000 pieces larger than 10cm.

Every once in a while, two of those bigger pieces get really close together. …

A Computational Exploration With The Wolfram Language

Photo by Sebastian Herrmann on Unsplash

I like to think I know everything, especially when it comes to programming. And, for a long time, I thought that if I looked at a piece of code long enough I would be able to completely understand its behavior. Just read the code, line by line, and think through the possible cases for if-statements and for-loops. With enough time and patience, all code is completely understandable.

And yet, I wrote code that did not run quite as expected. In fact, this happened a lot. More often than not, nine out of my first ten attempts at writing a new…

Developing Intuition With the Wolfram Language

Photo by Kalen Emsley on Unsplash

In machine learning, classification problems are often solved with neural networks which give probabilities for each class or type it is trained to recognize. A typical example is image classification where the input to a neural network is an image and the output is a list of possible things that image represents with probabilities.

The Wolfram Language (WL) comes with a large library of pre-trained neural networks including ones that solve classification problems. For example, the built-in system function ImageIdentify uses a pre-trained network that can recognize over 4,000 objects in images.

Automate Your Web Testing and Browsing Workflows

Photo by Jack van der Spoel on Unsplash

When I worked in Quality Assurance, one of my jobs was to do regression testing on a number of websites. At that time there were only limited automation tools, so my solution involved the Java Robot class to issue mouse and key events. This was of course incredibly fragile.

More recently, automating web browser interactions have become much easier. The WebDriver protocol specifies a really nice set of commands and interactions to talk to a browser. The Wolfram Language (WL) uses this protocol to let you control browsers directly from a notebook session. The interactive nature of a notebook is…

A Computational Thinking Story About Coal Production in the United States

Image by the author using a photo by Paweł Czerwiński on Unsplash

Around the world, coal is slowly replaced with other forms of energy to help reduce the amount of greenhouse gases in Earth’s atmosphere. In the United States, the U.S. Energy Information Administration (EIA) collects energy information like coal production amounts over time. This story uses this time-series data to illustrate some of the TimeSeries functionality in the Wolfram Language.

To get started we need to access the data from the EIA. I wrote a simple function called UnitedStatesCoalProduction to access their data API and import coal production data by region:

UnitedStatesCoalProduction = ResourceFunction[

This function is called with two…

Computational Thinking About Change Using the Wolfram Language

Photo by Simon Berger on Unsplash

Fall is just around the corner in Central Illinois, and this is my favorite season of the year. Don’t get me wrong, I love the springtime after a cold winter, but the relief from the summer heat and the display of fall foliage is always the best in my opinion.

Nature excels at gradual change. Every day, every hour, every leaf on every tree slowly changes color from green to yellow and red. Every usable part of each leaf is sucked out of it and stored in the trunk and roots of…

Writing, Deploying, and Sharing Computations Have Never Been Easier With the Wolfram Language

Photo by Nick Scheerbart on Unsplash

A (long) while back I had the good fortune to take a hiking trip to the western part of Ireland, near Galway and through the Connemara National Park. The scenery was spectacular, but it was the ever-changing weather patterns that really caught my attention. It was not unusual for a single day of hiking to have multiple rain-sun cycles and many days had afternoon rainbows.

Located near the Atlantic Ocean, a warm stream of water arrives from the Gulf of Mexico and the Caribbean Sea. This makes the climate of Ireland milder than can be expected based on its latitude…

Arnoud Buzing

I create awesome software at Wolfram Research, makers of Mathematica, Wolfram|Alpha, Wolfram Cloud, and many other products and services.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store