Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 608 Topics
- 1,334 Replies
Recently one of our customers encountered a REST API that didn't accept Json UTF8 files starting with a Byte Order Mark (BOM). By default, the PUT files created by AIMMS are UTF8 files with a BOM at the start to mark these files as UTF8 files.There are some ways to circumvent this issue:Set the hidden AIMMS Project Setting "Default output character set” to UTF8NoBom. Use the function dex::ConvertFileToEncoding(inputFile, inputEncoding, ouputFile, outputEncoding, noBOM) to convert a file. The .json files created using dex::WriteToFile(dataFile, mappingName, pretty) are UTF8 files without a BOM.
Existing successful applications often have several features. To realize all these features there is a significant body of code.An application developer may be faced by a small change that causes significant differences in runtimes.Examples of such small changes are:a change in data, a code hotfix, a switch of computing environment, or two different persons operating the application.The location of the code where these performance differences manifest themselves may not be obvious. Facilitating the adage: measuring is knowing: the AIMMS engine provides the diagnostic tool: AIMMS Profiler.The AIMMS application ProfilerRunCompare is a small tool to compare two profiler runs. Come and check it out here.
Dear AIMMS-community,first, I’d like to thank you for the great software. I think AIMMS is great. About the problem. It's probably easy for the experts among you to solve. So far, I haven't found the right solution. I am developing a model to analyze cost efficient pathways for the ramp-up of production plants for renewable fuels over several periods (t). I consider different plant generations (g), where a lant of a newer generation has "better" characteristics than the ones of the older generation.The addition of plants into the system is defined by a free variable "PLANT_COMMISSIONING(t,g)". Based on this, the overall plant infrastructure is defined with various other variables and constraints. I would now like to integrate the "behaviour" that a new plant generation can only be built if plants of the previous generation have been built beforehand (upscaling), e.g. if a minimum number of plants of the previous generation have been built beforehand. I am looking for an MIP approach fo
Using WinUI, The user can select the time granularity in the model (4,8,12,24 hours). Everything works, except the Gannt chart in which the “X-axis ->Unit of Measurement” cannot be a reference to a parameter. Is there a way to solve this issue so the Gantt chart can also be responsive to different time granularities? Thanks
In a new How-To series, @Chris Kuip details how to model composite objects without including compound sets. Using the Reference Element approach (compared to the Component approach) led to the nice surprise that the clearer approach is often also the more efficient one! Articles in the series:Modeling composite objectsExchanging data of composite objectsReporting data over composite objectsDeploying AIMMS set functionality to composite objectsHierarchical composite objectsModeling styles for using reference elements
In the previous how-to, making a single REST API call is illustrated.In this how-to, "single” is replaced by "multiple” in various ways:A single service can be provided by different servers. For instance from different regions. Each server has its own service URL. A single service URL, can provide multiple methods. For instance, a method to find the geolocation (lat, lon) for an address, and another one, given a geolocation, finding an address. A single request can have multiple answers. For instance, try searching for “Market square”. A single method can be queried multiple times. For instance, searching the geolocations for multiple addresses. An organization may offer multiple pricing plans, each one with its own limit on the number of queries per time period. Often this starts with a free of charge plan, whereby only a few queries per time period are allowed.
In this new How-To article, we explain the basics of the Data Exchange Library (DEX) and how to integrate a dataset (in our example: JSON) automatically into your AIMMS model by using a mapping file.This article is the start of a How-To series on the DEX. Let us know if you have any questions about using the DEX and/or suggestions for follow-up articles! Go to article: How to integrate the Data Exchange Library
The Friday Demo Recap is back!Find out what’s cooking in the AIMMS Developer environment, and help us answer a question!This week we’re serving:Auto syntax correction Easier innovation with AIMMS Web serverAuto syntax correctionRichard gave us a peek at a sweet new syntax linter that gives the option to fix some specific syntax errors (one at a time, or all at once) in your model. Because, you know, old habits die hard, and we don’t always follow the rules...while it’s not a fix-all, it can certainly speed up your modeling and help you learn where are your mistakes.Easier innovation with AIMMS Web serverNext, Joris and Tygo presented new changes to the AIMMS web server that allow for easier integration between AIMMS and third party web services and REST services. This should open up possibilities for you to mix and match in the future to suit your particular “tapestry of services”. They demonstrated with a new service, configured in about 30 minutes, which allowed them to bring a class
Today I participated in an internal demo to showcase some new internal developments. I want to share with the community my impressions: We have continued to evolve our OAuth capabilities on PRO/CLOUD with DEX and OpenAPI. If this is something you need, see that it was part of our release notes: DEX - Release notes Another very nice development that will help our team to replicate our Linux build agents we have a Dockerized Linux Environment. Much easier and guaranteed. (PD&I team was happy!) If your thing is automation, you will be happy to know that we have been working on allowing the Linux environment to build the .aimmspack for a project. This will be available in the AIMMS Command Line Tool. WebUI showed off some quality of life improvements for widget wizards. Even more exciting were the new features with the Combination Chart Widget that will be accessible in the experimental features. Bar chart, legends, zoom,… so many things! Our newest colleague (Vlad) also d
If you have two versions of an AIMMS project in which you solve a math program then it can sometimes happen that you get two different solutions (after running) while you expected that both versions would return the same solution. Assuming that you are using the same solver (and version), and the solver does not hit a time limit, this usually means that the math programs generated by AIMMS are different. One approach to find these differences is described below.First create the constraint listings for both project versions by setting the following Solvers General options:'Constraint Listing' to 'At every solve' (or 'At first solve') 'Constraint Listing Variable Values' to 'Print variable values'By setting the second option AIMMS will not only print the level values of all variables in the generated math program, but also their upper and lower bounds.The constraint listing will be printed at the end of the solve (by default) but you can also generate it at the beginning of the solve by
Find unused identifiers in your AIMMS project Applications that are around for a while clearly have value to the organization. However, some identifiers such as sets, parameters, variables, and procedures in that application may no longer be used, because: They were created for analyzing and testing a particular circumstance. Once the circumstance is handled, the corresponding identifiers can be removed. As the application evolves, some functionality may become obsolete. There are some disadvantages of having obsolete identifiers in the application: It may confuse your successor, as he/she wonders why an obsolete identifier was added. For a defined parameter or set, it may take up a significant amount of memory and thereby also increase the size of cases. Read more...
Introduction Removing redundant variables usually has no impact on the solving time because a solver like CPLEX will remove most of them during the presolve phase. However, in this post we will see that removing “non-trivial” redundant binary variables can have a positive impact. One of our users modeled a problem related to the unit commitment problem in AIMMS, and they ran into a performance issue with CPLEX. Model In the unit commitment problem we have a binary variable U(t) for each unit to model the commitment status of that unit for period t; U(t) = 1 if the unit is online in period t and U(t) = 0 if the unit is offline in period t. We also have a binary start-up variable SU(t) for each unit which is 1 if the unit starts up in period t and 0 otherwise, and a binary shut-down variable SD(t) ) for each unit which is 1 if the unit shuts down in period t and 0 otherwise. (Please note that in the AIMMS model the U, SU and SD variables are 2-dimensional but I omitted the index for the
As a follow-up on this first article, a new How-To article is published about the extraction of files and data using the Data Exchange Library (DEX). It shows the difference in using the DEX vs the HTTP library and gives examples on how to read data from both a saved file and from a memory stream.Go to article: How to use the Data Exchange Library for extracting files and dataThe next article in this series will be about using the different data formats. After that, we will go in depth on integrating OAuth using DEX. Let us know if you have suggestions for other follow-up articles!
Last Friday, we had another fantastic demo session.Here are my thoughts and impressions:API Key generations and handling (aka PRO REST API Keys) - this is really cool! As in several API services available, PRO will also have key generation available to interact with the REST server. As always, security comes 1st, so all necessary measures are in place to use this properly and securely. Looking forward to checking all the automation that will be available from this. /
We are trying to use multiple solver session to solve a large scale problem. We have taken the case of flow shop problem given in AIMMS. We are trying to change the “Number of parallel workers = 2/3/4”, but after solving it is resetting this value to 1 after solve and the solution time is also not improving. We have used the following for delegate to serverif not ProjectDeveloperMode then if pro::DelegateToServer(timeout : 108000000,completionCallback:'pro::session::loadResultsCallBack', waitforcompletion:1) then return; endif;endif;Kindly help and let us know how to use multiple solver session for a large scale optimization problem. Thanks.
I recently got the question, how to assign a value to a given parameter; for instance the end user enters the name of a configuration parameter and its new value. This question is similar to obtaining the value of an arbitrary identifier, and runtime libraries can be used to code this generically; see https://how-to.aimms.com/Articles/146/146-value-dynamic-identifier.htmlI created a small example model, whereby three parameters can be changed by naming them in the bottom scalar widget and entering a new value as illustrated below:Demo app after entering a value for AB987.Please find the demo app attached to this post.
New internal demo and here I am to share! Remember what I share here is not (necessarily) released yet and can change or even be discarded! I just give the scoop.Connecting the dots is a new functionality in the combination chart that can allow you to “connect the dots” quite literally! So if you have a line chart and have missing data (for some x values), you can still connect the data that is present.Example of connecting dotsAutomatic conversation of classic charts to new combination chart! I really appreciate the effort into building this functionality making life so much easier, but still maintaining the original chart so you'll always be safe in using this. I also enjoyed the improvement to table filtering explicitly separating regex functionality from others. This is already released: https://documentation.aimms.com/webui/table-widget.html#regular-expressions
Our AIMMS Community License has completed it's first year! 🎉🎊🎈And we are very happy in the reception that this free edition got by our users.Looking back at the original post, I love the proposed intentions for this release. To quote @Gloria Quintanilla :Whether it’s crafting a plan to reduce your personal carbon footprint, creating a schedule for your kids’ school or simply to learn and experiment, AIMMS Community Edition is ideal for those who want to apply modeling to improve decision making. It’s also a great companion for recent graduates who previously used an AIMMS Academic License but want to continue playing with the software at no cost, or showcase their AIMMS skills to prospective employers. So, what did the community edition do for you? Please share with us!And if you still don't have a license, jump right on:https://licensing.cloud.aimms.com/license/community.htm?utm_source=website&utm_medium=footer
In this How-To article we explain how to implement the usage of the data formats (JSON, XML, CSV, Excel, Parquet) in mapping files and, if applicable, format-specific requirements. This article is part of a How-To series on the DEX. Let us know if you have any questions about using the DEX and/or suggestions for follow-up articles! Go to article: Dealing with different data types in the DEXNew to DEX? Start here!
Running late on this one! Even if it was a while back, I think there were interesting things going on. We have been working on a new compilar. We are not done yet (no changes to product as of yet), but progress has been made. When this is done, it opens up possibilities for innovations in the use of the AIMMS language. Combination chart! How this grows! We now allow you to specify an interval for the X-axis label. Nice to clean up label-heavy axis. It is now possible to hide specific indexes from being displayed - which can also make legends and labels less cluttered and more useful. I see two nice use cases: similar to pivoting the identifier label to the totals; hiding auxiliary indexes that shouldn't be shown to end-user. Combination chart on non grid - now you can see that it is incompatible (isn't of just not showing up). Tooltips are now also supported on the Selectionbox, Multiselect and Legend widgets, by using a Tooltip Identifier for the relevant identifier(s) in your mo
Really excited about this last demo.Please remember, this is a peek into our internal demo's, items can change, be update, removed as they move forward.Parallel solving We had a nice presentation from @Chris Kuip on parallel solving. A combination of several technics: creating job's on cloud, using multithreads, asynchronous solving, updating of matrixes. Will be very useful for case in which you require hundreds, if not thousands, of solves for you problem. Even better if the differences between the solves are very small in the data from one solve to the other. You can expect a how-to and project/library soon with this information. Debugging on error Very nice addition to our debugging functionality. With this new option (still unreleased!), you will be able to start debugging as soon as an error is raised in AIMMS. Excel Tabular data A great step forward on our WebUI tabular data capabilities within AIMMS. This is still a feature spike (interpret as: very initial phases, could poten
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.