The purpose of this example is to illustrate a few features of the AIMMS identifier types ACTIVITIES and RESOURCES.
In the example used, we model the intuition that smaller jobs get a more narrow time window in which they are to be scheduled. In addition, the time needed between jobs, the change over time, increases with the difference in jobs.
This approach however did not let you really catch the errors and act based on the information of the error. With the introduction of AIMMS 3.10, we added error handling routines to AIMMS, allowing you to not only catch errors, but also raise your own errors.
We have been working hard to point as many people to the blog as possible. Personally, I have found that for quite some questions of people on the AIMMS Google group, as well as questions from customers to our support desk, I can point already to the blog for the answer
Over the past year, we have been able to keep up with just over 1 post per week. Our goal is to keep this pace. Fortunately, there is enough of possible content since we see more and more questions coming in on the google group. Some of these questions are perfect for writing an article explaining something about AIMMS in more detail.
In your application, you typically want to provide some feedback informing the end-user about what the application is doing. One very big reason for doing this is that normally end-users don’t have a problem with waiting for your program to finish something, as long as they have some indication that something is still happening
One very straight forward approach is to reserve some space of your GUI for providing the feedback. Another way is that AIMMS allows you as a developer to provide some feedback to your end-user is by writing something in the status bar of the application, as shown in the screenshot above. The big advantage of this approach is that you don’t have to reserve any space in your GUI.
Sometimes, you are not interested in just the first or last element, but in the first couple of elements of a set (based on some sort of order). Another set related function, that is less known, is the NBest operator in AIMMS. This operator allows you to achieve just this, namely obtain the first n elements of a set based on some sort criteria, which must be provided to the NBest operator as an additional argument.
Suppose we have a set Cities, then a parameter Distance would naturally be defined over 2 dimensions (from and to), both coming from this same set Cities. However, if you don’t know that AIMMS can handle multiple indices for a set, a solution approach I have seen come by a couple of times is creating two new sets CitiesFrom and CitiesTo, both subset of the set Cities, containing all elements of the set Cities and each with its’ own index.
A classical method employed by physicists to check equations is the use of units of measurement. Consider the following example:
The following equation, intended to model that a ship is kept afloat, is slightly wrong:
MaxWeight * WaterDensity < = ShipVolume
SET: identifier : RootSet index : i
SET: identifier : MySubSet subset of : RootSet
What is the difference between expression ( i in MySubSet ) and ( i | i in MySubSet ) ?
Although some programming languages provide specific functionality to do this, AIMMS does not provide intrinsic functions to achieve this goal. Fortunately, this functionality can easily be implemented in AIMMS by making use of the two intrinsic string manipulation functions, namely StringLength and SubString.
For a long time, AIMMS already has the possibility to retrieve/store data from/into any ODBC or OLEDB datasource. Originally, you could provide a UDL file (in case of OLEDB) or a System/User/File DSN (in case of ODBC).
In case you deploy a project where the user of the project can actually choose which specific Access database file should be used, you either would have to generate the .dsn files based on this choice, or let the user choose the specific Access database file via the file selection wizards of the ODBC driver.
Since AIMMS 3.11, another possibility was introduced, namely generating the connection string within AIMMS itself. You could then base this connection string on some file that the end-user had selected. One very big advantage of creating such a connection string instead of using DSN files is that you don’t have to include the database password in the plain-text DSN file if your database requires a password: you can keep this password hidden in the code of your project.
These connection strings can be used in the Data Source attributes of all the database related identifiers AIMMS (e.g. tables, database procedures).