Using calendars in AIMMS

calendarFor a lot of problems you will need to work with some time based notion during the modeling. For example, with a transportation problem the main decision could be how much to transport from each depot to each customer for every day in a given time horizon.

Of course, it is possible to just create a set Days in AIMMS and give this exactly the same number of elements as there are days in the time horizon you are considering. However, this would require you to manually keep track of which of these elements are working days and which ones are weekend days. Also, you would have to take care of the fun details regarding leap years. Fortunately, in AIMMS you have the possibility to work with a Calendar, which makes working with time related things a lot easier.

Continue reading

Monitoring identifiers for changes

monitorWhenever you changed the values of some identifiers and close your AIMMS project, the default behavior of AIMMS is that it will ask you whether you want to save the unchanged data. This behavior depends on which data categories and case type are currently active.

There can be situations where it is useful to not have this check based on a case type / data category, but just check whether a give subset of all identifiers in your model have been changed since the last time you checked. With AIMMS 3.12, we have introduced the data change monitor functionality which allows you to achieve exactly this.

Continue reading

Animation with colors in AIMMS

screenshot-pivttable-heatmapIn the first post of this year (Happy New Year) I showed how you can use the network object in AIMMS to create an animation of exploding fireworks. In another recent post (Using colors for feedback in pivot table)I showed how you can use the pivot table in AIMMS to display a heat map.

In this new post, I will show how you can use the user color related functions UserColorAdd and UserColorDelete in AIMMS to create an animation of the heat map that is displayed on the right.

The goal is to create an animation that will morph the picture such that each point that starts out as green ends up as red and vice versa.

Continue reading

First AIMMS Hangout

AIMMS_HangoutAfter my questions on both the AIMMS Google Group and on this Blog about participating in an AIMMS Google Hangout, I got two replies from Yawen and Thiruselvan that they were willing to be the guinea piggs.

We just finished the first AIMMS Hangout and I would like to thank both Yawen and Thiruselvan again for being the guinea piggs!

In the rest of this post I will provide some more details about the questions and pointers that might be helpful.

Continue reading

Using project local solver configuration

preferencesIn an earlier post Change default solver used for each type of mathematical program I showed how you can modify the default solver that AIMMS will use for solving each type of mathematical program.

I did not only demonstrate how you can modify these defaults via the solver configuration screen (which you can access via the Settings menu), but also showed how you could temporarily overrule this default by modifying the contents of the predefined CurrentSolver element parameter or by using a where clause with the solve statement.

Normally, the list of solvers available via the solver configuration screen is the same for all projects opened with the same version of AIMMS. In this post, I will show how you can overrule the solvers that are available for your current project.

Continue reading

Dealing with model is infeasible or unbounded error

infeasible-triangleUnfortunately, when modeling things hardly ever go as planned at the first try and more than once you end up with results that you did not expect. At first glance everything in the symbolic model (i.e. the variables, constraints, and parameters in the model tree) might look OK, but still you are getting results that do not make sense or the solver concludes that your model is either infeasible or unbounded.

Luckily, for these cases, AIMMS provides a couple of tools that allow you investigate what is actually being sent to the solver (i.e. the complete generated problem). Investigating the information from these tools, allow you to figure out what part of your model is causing the unexpected results.

Continue reading

Using colors for feedback in pivot table

screenshot-pivttable-heatmapThe saying is that one picture says more than a thousand words. When presenting some data to an end-user in your AIMMS project, you have the possibility to use the different page objects AIMMS provides. Besides presenting the data in a graphical manner, you often also present the data in some sort of a table.

Especially when you are displaying large datasets with lots of numbers, it might be difficult to quickly see the information in this data from a table. The pivot table object in AIMMS has a feature that allows you to use some colors to provide a graphical feedback to the user regarding the data that is displayed.

Continue reading

Development of a Small Rostering Application

Stock Exchange Dry Board 570618_77956939Solutions from rostering applications affect the daily life of the people rostered. Therefore, the application developers and planners iteratively improve the rostering applications and the quality of the solutions, often based on the feedback of those affected by the rosters created. The close link between the modeling language and GUI pages in AIMMS makes it easy to study the solutions and (re)formulate constraints.

In this post, the steps are described to develop a small rostering application in AIMMS. This application is based on an assignment given in “Integrated methods for Optimization” by John N. Hooker, section 2.2.5. The problem is to create a weekly roster for 4 nurses to help in a home for the elderly. A day has three shifts: day, evening, and night. Each shift is staffed by one nurse, so one nurse is free each day. We try to balance the free days per nurse, require at least 16 hours between shifts, and minimize the nurses per particular shift, and the number of changes in staffing per shift.

Continue reading

Quickly determine on which pages an identifier is used

Search for identifiers

Search for identifiers

In December 2011 I wrote the blog article about Determining where each identifier is used in your project. This article showed how the function ReferencedIdentifiers could be used to obtain information about which identifiers referred to which other identifiers.

In the same article, I also explained you could use the functions PageGetAll and PageGetUsedIdentifiers (or alternatively the function IdentifierGetUsedInformation that was introduced in AIMMS 3.12 FR2) to get information about which particular pages have references to an identifier.

Although this approach is useful if you want to get information for all of the identifiers, it is a bit cumbersome to just quickly get the information about which pages are using one specific identifier.

Continue reading

Easily align multiple objects on page

Nicely aligned objects

Nicely aligned objects

When creating a Graphical User Interface for your AIMMS project you typically want to nicely align the different objects that are present on a page.

For example, the different buttons you have on one page should all be the same size. Furthermore, if you have multiple buttons, you might also want to have them nicely spread horizontally (i.e. have the same amount of spacing between all of the buttons) as displayed in the picture on the left.

Continue reading