Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 557 Topics
- 1,205 Replies
Gap in the Progress window
Hi. I have a few questions to ask: [list=1] [*]In the progress window, what exactly is means by (Gap = 0.04%)? is it 0.04% of optimality gap, or 4% of optimality gap, or something else? [*]and if it is 4% of optimality gap, does it means that 96% of it is the best solution, meanwhile 4% of it is the less best solution? [/list]
How to Connect to Access database file
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.)
Save a case from AIMMS procedure
Hi, is there a similar code that I can use if a project has set the option Data Management style to Disk files and folders? The below code was valid for projects using option Single Data Manager file. The code was available from https://techblog.aimms.com/2012/06/05/save-a-case-from-aimms-procedure/ (note this is blog is now not available) ************ !First try to find a case with the name indicated by CaseName. If AIMMS !can find this, it will store a reference to this case in the element !parameter CaseReference if ( not CaseFind( CaseName, CaseReference ) ) then !If no case with the name indicated by CaseName could be found, then !we try to create a case with this name. After creating the case, AIMMS !will store a reference in the CaseReference element parameter to the !newly created case if ( not CaseCreate( CaseName, CaseReference ) ) then !If there was an error while creating the case, notify the developer !by raising an error. If the raised error is not cau
Excel error handling
When reading a table from an excel (and putting in wrong data) I get a pop-up in the UI stating what index it can't recognize and is therefore wrong, so something like this: "ReadTable : Cell A2 in 'Excelfile': 'Wrong element' is not an existing element in the set 'Technical name of set'" And I would like to use this information to make a specific pop-up for the end-user, so I can specify how to solve this error and also change the name of 'Technical name of set' to a name that they would recognize. So the exact element and index that are wrong, is stored somewhere, I would like to make use of this, but I can't find where to get this information.
Print message in cmd command-line
Hello,I am trying to print a custom message at the command-line, while running aimms via a batch-file. The goal is to get an information about the status and the progress of the optimization. I have tried the DialogMessage, DialogProgress and the Display function with no success. Can anyone help me with that?Best regardsJonathan
More about the progress window
Hi, When I run AIMMS, I’ve got this result in the progress window as shown in the picture attached, I wish to know what they are mean and how they work. Can anyone explain it to me? 1. infeasible 2. integer infeasible 3. intermediate infeasible 4. terminated by the solver 5. solution does not exist 6. solver not called 7. left 8. nodes 9. thread 10. nonzeroes 11. variables Thank you in advance.[img]https://uploads-eu-west-1.insided.com/aimms-en/attachment/84219ee6-380c-4d4d-b0df-5d3bf0fc1883.png[/img]
How to solve Warning_duplicate_row?
During my usage of AIMMS, I came up with some problems about 'duplicate_column_row_warnings'. I want to know how to solve the following questions:(1)Warning: The rows "MaxPump(PSHU-2Pump,01,Unit-1)" and "MinPump(PSHU-2Pump,01,Unit-1)" are equal in the generated mathematical program "LeastTotalcost". For information regarding potential causes and consequences, see the help associated with the option "Warning_duplicate_row".I wonder what does this mean?(2)where can I find the help associated with the option "Warning_duplicate_row"?
Not enough memory in awf.data.aimms.session - what's that about?
I can't seem to find any documentation on the error [code]awf.data.aimms.session: Not enough memory. [/code] It only shows up in WebUI, and I know (think) AWF is "AIMMS Widget Factory." I don't have any custom widgets in my project, so I'm not sure why I'm getting this error. Can someone point me in the direction of some documentation on this so I can investigate? Thanks! ~Bon
Binary variable have fractional value
Hi I am using AIMMS for solving a planning problem in electrical engineering field. The optimization problem is a MILP. I have some variables that are defined to be binary but when the AIMMS solve the problem some of the binary variables have fractional values, which is weird. I should mention that the relax status is used for solving linear version of MIP, but in the case that I am talking about the relax status variable is set to zero to have binary answers. Most of the answers are binary except for some of them that have fractional values. I would be grateful if someone could help me to solve this issue.
Writing data back to MSSQL table containing an identity column
I want to write back changes to a MSSQL database after reading information from a table. The table is designed to provide a minimum working example and has two columns: ID: ID column starting with 1, increments with 1 VALUE: column containing integer values. I have managed to read from this database table, however, I want to be able to change a value in AIMMS and then write back the change using write p_parameter(i_ID) to table db_TableName; However, this gives me an error stating that I'm not allowed to insert manally into an ID column. This makes sense of course, but how do I prevent AIMMS from trying to insert into the ID column and replace old values by new ones instead?
Expecting a scalar identifier (no free indices) error
I have several problems but I think they are related to each other. For all my constraints I get the warning “The index “i” already has a scope” and I also get this warning when I want to enter my data. Also when I want to specify the objective for my Mathematical Program I get the warning: “Expecting a scalar identifier (no free indices)”. I’ve added pictures of one of my constraints, the warning from the Mathematical Program and my Set where I believe the problem might be with the index i. But I don’t really know how to fix it so if someone could help me I would be very grateful.
Feedback discussion: AIMMS supporting Python 64-bit only?
As some of you are aware (e.g. as discussed in product updates), we are currently developing an integration of Python into AIMMS. For this development, we are discussing whether we still should support Python-32 next to Python-64 (fyi, AIMMS Developer only will be delivered as 64-bit per 1/1/2020; AIMMS PRO has been 64-bit only for several years now). Curious to hear your thoughts! Please elaborate as much as possible when explaining your view.
Nearest neighbors for TSP
Hi there, I am trying to implement some form of heuristic for the TSP where I'm decreasing the size of the model by restricting the declaration of variables X(i,j) to those combination (i,j) for which j belong to the, say, 10 cities nearest to i. Here X(i,j) is an binary variable indicating whether or not edge (i,j) is in the tour. I created a subset of the cities to find the nearest neighbors of city i, but how can I implement it in the model? Do I need to add an extra constraint or? Added you'll find the code of my AIMMS project. Thanks in advance!
Error with the Production Model Tutorial Provided by AIMMS
hello,I was studying the tutorials provided by AIMMS and I came across a Production Model in the PDF Document for AIMMS for Professionals Tutorial. I’ve tried to open the file to see if it works but I come across the following errors as attached and it will not let me execute the model. The zipped folder with the model has also been attached for your reference. Thank you for all the help!
How to raise warning before closing WebUI tab?
Hi All,For a project we are implementing a user is making changes to a relatively large table. The user has the possibility to store these changes in a database.However, when a user closes his/her browser after having made these changes and forgets to store the changes in the database the changes have to be made all over again. Is there a way to raise a warning when closing the browser? In this case that would refer to a user that has made changes, but has not stored them in the database.I know using a uponleave procedure works when navigating to a different page, however when closing a tab no warning is raised using such a uponleave procedure. Furthermore, I have seen multiple sites raising a warning when closing the tab, so curious to see if this is possible to do in the AIMMS WebUI as well!
Overview: Deprecation of Compound Sets
In May 2018 AIMMS announced a plan to deprecate compound sets in stages. Support for compound sets will be fully deprecated [b]after January 1, 2020[/b]. To find out how to identify and remove compound sets from your model without losing functionality, read [b]AIMMS Knowledge:[/b] [url=https://how-to.aimms.com/Articles/109/109-convert-compound-sets.html]Prepare for the Deprecation of Compound Sets[/url]. This article provides the following background information: [list] [*][url=https://how-to.aimms.com/Articles/109/109-deprecate-compound-sets-overview.html#section-what]Definition of compound sets in AIMMS[/url] [*][url=https://how-to.aimms.com/Articles/109/109-deprecate-compound-sets-overview.html#section-why]Reason to deprecate compound sets[/url] [*][url=https://how-to.aimms.com/Articles/109/109-deprecate-compound-sets-overview.html#section-when]Timeline to adapt your model[/url] [/list] Here is the [url=https://how-to.aimms.com/Articles/109/109-deprecate-compound-sets-ov
Dimension of Parameter in procedure
Hi! I would like to ask what this error means and how I can solve this: ExcelRetrieveParameter(FINAL DATA.xlsx, nC(v,T,w), C3:ALN22, , 0) failed: The dimension of parameter "nC(v,T,w)" is 3. It must be equal to or smaller than 2. I hope anyone can help me with this. Thank you!
Writing a constraint
Dear staff,I would like to receive some help writing the following constraint for a mathematical model.Within a graph, I define arcs (i-j) where “i” and “j” are nodes. For each arc and node, I also have the following variables and parameters:p(i) binary variablep(j) binary variablea(i,j) continuous variableC(i,j) parameterH(i) parameterH(j) parameterI would like to write a constraint expressing the following conditions:if p(i) = 1 and p(j) = 0, then a(i,j) <= C(i,j)*H(j)if p(i) = 0 and p(j) = 1, then a(i,j) <= C(i,j)*H(i)if p(i) = 0 and p(j) = 0, then a(i,j) <= C(i,j) * (H(i) + H(j))/2if p(i) = 1 and p(j) = 1, then a(i,j) <= C(i,j)If you have any suggestions on how to write the above conditions within a constraint, I will be glad.Thank you,
Aimms returns the same Opt solution for different cases (data)
I am trying to solve an MIP model with AIMMS. I run the AIMMS for a specific parameters and obtained the optimal solution; I also solved the model with same data/parameters using a heuristic to test the optimal solution- it is indeed the optimal. Now I first change the parameters (i.e., using different values) and save the changes in a new "case" using "save case as" option under different name. Then I set the new case as the "active case" and try the model with the new data. surprisingly AIMMS returns the (same) optimal solution obtained with original "case". I used to use the "single file data management" so I thought this might be the reason. I changed this to "disk files and folders" by going to Menu File > Open > Data file>convert...but it didn't help at all. I also noticed that when I load a case, the model's decision variables contains some values from perhaps previous runs; not sure if this is normal with AIMMS. Any help on this is greatly appreciated in advance. Thank
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.