Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 490 Topics
- 1,068 Replies
Hello, I want to save the results of various variables into an Excel Workbook. All the results I want to save are on the “Multiple Iteration Dashboard ” Page I created. I read about the function PageCopyTableToExcel that would allow me to save those results (https://documentation.aimms.com/functionreference/user-interface-related-functions/page-functions/pagecopytabletoexcel.html#pagecopytabletoexcel). You can find my projects attached to this question. To do so, I created a Procedure named “ExportExcel” where you can find the following code : if not axll::WorkBookIsOpen(WorkbookFilename : "Book1.xlsx" ) then axll::OpenWorkBook(WorkbookFilename : "Book1.xlsx" );endif; PageCopyTableToExcel(pageName: "Multiple Iteration Dashboard", tag: "FuelEfficiency", includeHeaders: 1, selectionOnly: 0, ExcelWorkbook: "Book1.xlsx", Range: "A1:Z150"); I went into the Fuel Efficiency Table Properties to correctly tag it as “FuelEfficiency”.However, I got t
Hey Guys,I have a small problem by modeling my MILP.I created a Matrix do define some Binary Variables. Now I want to create a constraint, which contains a multiplication between the Matrix of the Variables an a Matrix with some parameters. The result should be a scalar value comparable to the sumproduct-function in Excel. I want to do a multiplication between the matrices an the result should be a scalar?Hopefully there is a simple function in Aimms to solve my problem.I am thankful for every help!Best regardsSimon
Hello, I want to solve an optimization problem with a minimization of costs. I would like to create a loop that would help me solving the same model but changing only one parameter of my objective function at each iteration. The logic is the following : While (Parameter <= Bound ): Solve Objective_Function(Parameter); Parameter = Parameter + 1; where “Parameter” is the parameter I want to change at each iteration of the loop. where “Bound” is simply a bound to stop my while-loop. where Objective_function is simply the objective function of my problem and depends on the parameter that should change at each iteration. Could you help me? Thank you.
In version 4.71.4, I tried to use the LastUsedColumnNumber, and as the name already gives away it returns a number while I had hoped for a column name in the range of 1 to “ZZZ” like the ones that Excel uses. This would make it easier to also used it in the column/data range definition when reading data.Can anyone advice on how to easily/efficiently translate this?Thanks in advance!
Hi AIMMSians,I have formulated an NLP model with around 2500 variables and it is non-convex. When I solve it using IPOPT, I get the error “Intermediate Infeasible, terminated by solver”. When I use CONOPT as solver, I get same error. Analyzing the listing iteration log files, it reveals that solver labelled the solution as infeasible because the convergence is too slow as demonstrated by message in the end of listing iteration log “Convergence is slow and a derivative is discontinuous”. Please note that sometimes, the same model reached a “local optimal” with sensible values for the variables. With some nice information in AIMMS documentation, forum and webinar, I have tried scaling option, good initial points (which are not possible in every case) and a bit of reformulation by removing some variables acting as intermediate variables between two variables to calculate some values. None of these options have proved any change in the results. Any idea or word is highly appreciated. Thank
Hello, everyone！Now I have a problem about how to set ranges for specific values of a variable. I have a variable “Cmatrix(t,x,conv) ” and “t,x,conv” are some sets. I need that Cmatrix(t,x,conv) ∈ [-1,1] only when conv ≠ 'Heat_pump' . And Cmatrix(t,x,conv) >1 only when conv = 'Heat_pump'. How do I write this in the red box? When I set a constraint to bound the “Cmatrix(t,x,conv) ”, there will be errors as “The solver CONOPT 4.1 cannot handle the ranged constraint Cmatrix_except_HP(1,Elec,CHP_engine) in mathematical program "Cost_minimization"; please define the middle term as a variable and add bounds.” Can some kind person save me? Thank you so so so much! Wish you happy every day.
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
Hi. Please, I would like to know if it is possible to create a stochastic model from an existing deterministic Non-linear programming problem using AIMMS. I need great help regarding generating scenarios in a multiperiod Optimization problem containing 3 uncertain parameters.Thank you
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. /
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!
Hi, I have been following the Employee Training example. However, I cannot run the code (attached). It is said that the solution does not exist. I don’t know what causes it.Furthermore, how do I check and know if the equations are not feasible ya? I’ve been looking into this Math Inspector, but somehow it’s difficult to understand for me. Thanks,
Dear all, Few years ago, I used Aimms to create the file as attached. At that time, CPLEX 12.17.1 package was used to solve the MILP supply chain model. However, when I use newer packages (12.8,12.9,20.1) to run the same file, it gives me very different results. Especially, the “CO2_Capture_Compression_Cost” variable is 0 although it should be 5.6 billion euros as I got. I tried many ways to find why it happens but it doesn’t work. Does anyone can help me in this problem? Thanks a lot for your read and help. P/s: please run “ReadCO2sourcedata”, “ReadProductssinkdata”, and “ReadStoragesinkdata” to get initial data from “CO2dat” excel file before running the program.
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...
I am back with the insider's view of our internal demo sessions for new developments. Let me share impressions: Some interesting developments in the AIMMS Presolver, namely the dual reductions. This new development (which can seek and eliminate unnecessary variables) can significantly improve memory usage during the solve phase. If that is your case, I would definitely take a look at it here. Webui has continued to evolve our combination chart with some very nice looking charts to add on top of the bar chart: line, scatter, area, spline… Very helpful for analyzing data and customizing for end-users. And, on top of that, some added functionality to coloring, based on indexes and with transparency. To me, it looks great! Finally, some additions to our Pro Account Manager. This should facilitate managing accounts in our Pro environments from a programmatic pov. Was this useful ? Do you like any of the above news? Let me know!
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
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
Hi folks, just taking a moment to share some good reads from the OR and optimization space that are making the rounds here... Optimization: From Its Inception by Thomas L. Magnanti Algebra: the maths working to solve the UK’s supply chain crisis by Michael Brooks You (also) need Mathematical Optimization in your organization … now! by Baris Cem Sal Art meets Operations Research — Menu Planning at HelloFresh by Robert Dochow Operations Research Analyst: The Fastest-Growing Job You've Never Heard Of by Edward Rothberg …feel free to share anything good you come across too!
Hi,Is there an pre-defined SAP integration? I am having issues (being approved by the IT for such access) to get SAP ODBC driver. Looking for alternatives, I found that using the SAP integration suite, companies have built APIs to access data from SAP. I wanted to know if AIMMS has such APIs available, or is the ODBC driver the only approach? Thanks
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
I have downloaded the example model of VRP and going through it.I was not completely able to interpret the Subset code.I have few questions as specified belowwhat the while loop is doing.Below code how please help me understand CurrentSubset(CurrentPosition) := 1; CurrentSubset(c | CurrentPosition < c) := 0;Finally in the if statement line SubsetIndicator(comb, c) := CurrentSubset(c);
I need to fill the 6*6 matrix as shown in the above.Here (i,j) is from 0 to 6So I used below code to achieve the matrix as shown above Here my question is I am trying to achieve this constraint x(i,j)=1 if either i or j =0 or 6Is there a better way to use Index domain to achieve that
Hello All!I wanted to start a thread in the community to discuss implementations and solutions to the Kaggle X-Mas challenge. For those of you who don’t know, Kaggle it is a site intended for promoting data science through courses and challenges. Every X-Mas they have a special optimization challenge. You can find more information below on this years challenge in the link below:https://www.kaggle.com/c/santa-2021/overviewA quick summary is: “Santa is creating a new streaming service and will play a 24/7 loop of 7 films. He would like the showing sequence to be optimal. Hence 3 groups of elves are watching all possible sequences (7! = 5040) of 7 movies to evaluate what is the best sequence.So, it has to do with permutations and TSP’s. Permutations, because we need to identify all possible combinations of sequences. And TSP’s because the problem can be transformed to a multi Traval Salesman Problem. Every salesman in this case is a group of Elves, and every city is a sequence of (7) film
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.