Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 542 Topics
- 1,185 Replies
Data exchange is an essential part of every application. AIMMS supports various industry standards for data exchange, such as ODBC for databases, XML Files and spreadsheets. But what if the data is not stored according to one of these standards? In order to read data from an arbitrary data source, AIMMS offers access to self-developed or third party functions. This [url=https://how-to.aimms.com/Articles/133/133-External-Functions-InputData.html]blog [/url]post provides an overview of the steps you need to take to create a data exchange link between a proprietary data format and AIMMS. The process is illustrated by using a concrete modeling exercise from the Constraint Programming example library CSPLIB. [url=https://how-to.aimms.com/Articles/133/133-External-Functions-InputData.html]Here[/url]
When constructing AIMMS models, we are usually able to handle repetition and structure by adding indexes. For instance, if we have built a model for the conversion process of a single machine, we do not have to duplicate the relevant model code when given an extra machine. Instead, we can use an extra index over a set of machines. However, there are situations where adding an extra index is not an option. This blog post will provide an example of such a situation, illustrating how the issue can be tackled using the AIMMS Model Query and Model Edit functions Here is a [url=https://how-to.aimms.com/Articles/132/132-Repetive-Patterns-Model-Edit.html]link [/url]to the blog
If your model contains multiple calls to these functions, you will need to have this “Option Seed” statement only before the very first call and not all the other calls. Find out why, [url=https://how-to.aimms.com/Articles/119/119-Reproducible-Random-Sequence.html]here[/url]
An introduction to the Email Client library with an example project. [h2] [/h2]The Email Client library provides you with an API to create and send emails from within your AIMMS project. The library does not require any external programs to be installed and can be used from both AIMMS Developer and AIMMS PRO. It is also available on AIMMS Cloud. You can use this feature, for example, to send emails containing the results of your optimization model to other users in your organization. Supported features: [list] [*]template files with related attachments (such as images) [*]placeholders in templates (to be replaced by data specified in AIMMS identifiers) [*]downloadable file attachments [/list] Read [url=https://how-to.aimms.com/Articles/104/104-using-email-client-library.html]here[/url]
The Email Client library supports the use of template files in HTML and TXT formats. You can set up templates with placeholders to be replaced by values from identifiers in your AIMMS project. Read [url=https://how-to.aimms.com/Articles/111/111-creating-email-templates.html]here[/url]
Although both the traditional AIMMS Windows UI and the new AIMMS Web UI offer excellent data visualization capabilities to view the data present [i]within[/i] an AIMMS application, many of our customers have expressed the wish to be able to view and work with AIMMS data in Tableau (and other BI tools such as QlikView, or Spotfire). This allows a much wider audience within a company to track KPIs on dashboards based on the results from an AIMMS application, using a wider range of graphical capabilities to drill down into the data presented, and to cross analyze these results against data from various other corporate data sources. [url=https://how-to.aimms.com/Articles/124/124-tableau-integration.html]Here[/url]
n AIMMS versions 4.40.1 and higher, WebUI is the default user interface. When creating a new project, AIMMS gives you the option to select a default UI and if WinUI is not selected, the [i]Page Manager[/i] will not be available in your project. This article outlines how to re-enable the [i]Page Manager[/i] in your AIMMS project. [url=https://how-to.aimms.com/Articles/95/95-change-default-ui.html]Here[/url]
A download widget in the WebUI is able to point only a unique file name. Thus if you need to download multiple different files, you would need multiple download widgets. However, you may use ZIP files (or equivalent compressed format, such as TAR files on Linux). The question is, how to automatically generate a zip file out of several files thanks to AIMMS, such that your end-user would be able to download it from the End-user mode (WebUI) in one click? In developer mode, on PRO or on the AIMMS Cloud ? [url=https://how-to.aimms.com/Articles/download-compressed-files/download-compressed-files.html]Here[/url]
[url=https://rosettacode.org/wiki/Haversine_formula]Haversine code[/url] in various computer languages is publicly available to compute the distance between locations. In this article, we use it as an illustration of how to create an external function using [url=https://visualstudio.microsoft.com/]Microsoft Visual Studio[/url]. Find out how, [url=https://how-to.aimms.com/Articles/153/153-external-haversine.html]here[/url]
AIMMS has the possibility to retrieve/store data from/into any ODBC or OLEDB datasource. You could provide a UDL file (in case of OLEDB) or a System/User/File DSN (in case of ODBC). [url=https://how-to.aimms.com/Articles/185/185-connect-to-access-database.html]This article[/url] shows how to generate a connection string to connect to an Access database via the ODBC layer. (However, you can use a similar approach to connect to any database, also via the OLEDB layer.)
Some years ago, before Microsoft Office 2010, life was – in some sense – easier for developers: Office was 32-bit, period. In our days, since the release of Microsoft Office 2010, things are a bit more complicated, as users can now have a machine with a 64-bit native version of Office installed as well. This means, for instance, that a 32-bit application using an ODBC driver to connect to an Access database might not work anymore, since the 32-bit ODBC driver might not exist on a machine with a 64-bit Office installation. In such a case, even though the user has a valid Office installation on his or her machine, the application may still display an error regarding the installation or the registration of the proper drivers on the local machine. [url=https://how-to.aimms.com/Articles/129/129-MSACCESS-32bit-64bit.html]Here[/url]
Say you have a wonderful AIMMS application, that needs to link a Database Table identifier (an AIMMS identifier) to one SQL data base of yours. Your amazing SQL data base is, however, an SQLite database. Thus, to be able to read it, AIMMS needs the appropriate “driver”, which enables it to read your SQLite database. This blogpost presents how to: [list=1] [*]Install the SQLite driver, [*]Connect your SQLite database and [*]Verify that you can access it through AIMMS. [/list] [url=https://how-to.aimms.com/Articles/118/118-Connect-SQLite.html]Here [/url]you can read the blog
CSV files are a de facto standard for communication of data. AIMMS provides the libraries [code]DataLink[/code] and [code]CSVProvider[/code] for the serializing of CSV files. In this [url=https://how-to.aimms.com/Articles/csv/read-write-csv.html]article [/url]an example is provided for reading data from a CSV file.
The AimmsXLLibrary was introduced in AIMMS 4.20. You can deploy your AIMMS project to more platforms with less restrictions, because this library can communicate with Excel files in server environments where Excel is not installed. For instance, while running AIMMS through a WebUI on PRO or on Linux. The AimmsXLLibrary doesn’t require Excel to be installed in order to read from or write to an Excel (.xls/.xlsx) file. You first need to add the system library `AIMMSXLLibrary` to your model, and then you can use the predefined `axll::` functions. [url=https://how-to.aimms.com/Articles/85/85-using-axll-library.html]Read more...[/url]
The AimmsXLLibrary can communicate with Excel files in server environments where Excel is not installed. This library is especially useful when building WebUI apps for AIMMS PRO in a server environment. Find out how to use it, [url=https://how-to.aimms.com/Articles/85/85-using-axll-library.html]here[/url].
For solving Mixed Integer Nonlinear Programming (MINLP) problems AIMMS offers, besides the solvers BARON and KNITRO, the AIMMS Outer Approximation algorithm, or AOA for short. [url=https://how-to.aimms.com/Articles/192/192-solve-minlp-with-outer-approximation.html]Here [/url]is the article.
Depending on which solvers are allowed by your AIMMS license, you might have multiple solvers capable of solving a given type of mathematical program (e.g. LP, MIP). In this case, you can instruct AIMMS in a variety of ways which solver should be used to solve a problem of a specific type. [url=https://how-to.aimms.com/Articles/178/178-change-default-solver.html]Here [/url]is explained how to change the default solver
The AIMMS webinar of August (2014) dealt with “Analyzing infeasible Problems in AIMMS”. In case you missed it, the recording can be found [url=https://aimms.com/english/developers/resources/webinars/webinars-demand/analyzing-infeasible-problems-aimms/]here[/url]. As shown in the webinar, one way to investigate an infeasible problem is by calculating an [b]Irreducibly Inconsistent System[/b] (IIS). An IIS is a subset of all constraints and variables that contains an infeasibility. The “Irreducibly” part implies that the subset is as small as possible. Unfortunately, the IIS could only be calculated for linear (and quadratic) problems. So how about nonlinear problems? [url=https://how-to.aimms.com/Articles/130/130-Infeasible-Nonlinear-Problems.html]Here [/url]'s the article
Unfortunately, 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. [url=https://how-to.aimms.com/Articles/136/136-Infeasible-Unbounded.html]Here's [/url]more
The latest version of CPLEX, version 12.7, supports Benders decomposition. Benders decomposition is an approach to solve mathematical programming problems with a decomposable structure, including stochastic programming (SP) problems (it is also known as the L-shaped method). Computational results by IBM, see this [url=http://www.slideshare.net/xnodet/ibm-cplex-optimization-studio-127-benders-modeling-assistance-etc?cm_mc_uid=18650205168313994945525&cm_mc_sid_50200000=1480695733]slide show[/url] by Xavier Nodet, show that Benders decomposition is faster than traditional branch-and-cut for 5% of their nontrivial MIP models. That number might not seem impressive but for certain type of MIP problems Benders decomposition is much faster than other methods. Read more [url=https://how-to.aimms.com/Articles/116/116-Benders-CPLEX.html]here[/url]
In his blog post [url=http://orinanobworld.blogspot.com/2012/04/k-best-solutions.html]K Best Solutions[/url], Paul Rubin provides some information on how to obtain the [b]K best[/b] solutions for a MIP model. One of the approaches he discusses is the solution pool functionality of CPLEX. In this article, we demonstrate how to use the solution pool feature of CPLEX in AIMMS using the the same binary knapsack problem used by Paul. Find out more, [url=https://how-to.aimms.com/Articles/177/177-alternative-mip-solutions-with-cplex.html]here[/url]
Some of the solvers in AIMMS, including the CP Optimizer solver for Constraint Programming problems, support not only returning a single (optimal) solution, but also a pool of feasible solutions. Read [url=https://how-to.aimms.com/Articles/139/139-Multiple-Solutions.html]here[/url]
When you solve a Mathematical Program in AIMMS, the default behavior is that AIMMS will let the solver solve the problem to (local) optimality. There might be situations where you want to stop the solve procedure after a set time period, or once a solution within a given percentage of the best value is available. This article will show you how to apply different stop criteria to a 'solve' statement in AIMMS. [url=https://how-to.aimms.com/Articles/172/172-use-stop-criteria.html]Read More...[/url]
In the simplest form solving a Mathematical Program identifier is done by using the intrinsic [b]solve[/b] statement of AIMMS: [code]solve MathProgram ; [/code] [b][img]https://clipboardjs.com/assets/images/clippy.svg[/img][/b] For the majority of the AIMMS modelers, this suffices for their needs. Whenever you want to have more advanced control over what happens, you have to start working with Generated Mathematical Programs (GMP). With GMP’s, you have full control over the constraint matrix: you can edit coefficients and add new constraints and variables. read more [url=https://how-to.aimms.com/Articles/147/147-GMP-Intro.html]here[/url]
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.