Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 508 Topics
- 1,109 Replies
In AIMMS it is possible to read data from both a query, or a selected object (e.g. a view). I was wondering if there is a difference in performance between the two methods if the only goal is to read data.In my case, I am considering reading data from a table valued function because that allows me to filter the data according to several parameters. An alternative is reading from a view, where the parameters would appear in the columns and then used as an ‘Index domain’ when reading the database table in AIMMS.I’m generally interested in performance impact, best practices, and overall trade-offs between alternative data retrieval methods (given a database).
Hi,I would like to save a section of my model to a case using the new data management style “Disk files and Folders” (https://documentation.aimms.com/functionreference/data-management/case-management/casefilesave.html)However I get the following error: I made sure my section is part of AllCaseFileContentTypes, and it does work if i use CaseCommandSaveAs, just not for CaseFileSave (or CaseFileSectionSave), but obviously I don’t want to always manually save it. Could you help me out with this error?
In my model, I am tracking the production date of certain products. It is possible to produce a product at time t, while allocating it to demand on time t+3. However, there is a maximum ‘age’ of a product. For example ‘If a product is older that three days, it cannot be allocated’. Now, given an allocation variable v_Allocate(i_Order, i_AllocationDay, i_Product, i_ProductionDay), indicating the allocation on day i_AllocationDay to order i_Order of i_Product which has production day i_Production day, I would like to restrict the index range to ‘valid’ combinations e.g. production day >= t-3. If I would restrict the index domain on the variable like so:index domain: (i_Order, i_AllocationDay, i_Product, i_ProductionDay) | i_ProductionDay >= i_AllocationDay - 3 Do I still need to add a separate constraint to ensure this production day restriction? In addition: does it make sense to do this in the index domain?
Dear Users, I have designed a MINLP problem and using AOA as solver. The reason I have to use AOA is my problem has goniometric functions and therefore BARON cannot be used. Also, I am using educational license which restrict KNITRO to solve problem over a specific size. When I solve problem using AOA such that it has initial solution (from a small solved network by knitro or AOA), I get final optimal solution in few seconds by AOA. For example, I solve a 4 node network using KNITRO and use this solution to solve 5 node network by AOA and in this way I gradually increase network size and keep getting result by AOA using solution from previous smaller network. This works fine. But, if I want to solve a network with no initial solution, either I get “infeasible solution” (although it has feasible solution in real) or solution time becomes so high and non-stopping (in hours). I have tried setting a bigger value of relative MIP optimality tolerance and MultiStart and increasing the Maximum
Hi, I have a problem with the callback procedure that is called at each iteration but not the last. At each iteration, the callback is called, if the solution violates the constraints, the cuts are generated and added to the model, but in the last iteration the callback is not called at all, so the feasibility is not checked and the optimal solution provided by (cplex or gurobi, I tried both) is in fact infeasible. This is a scheme of the code: GMPRelaxedModel := GMP::Instance::Generate(NoEnergy_per_lazy) ;GMP::Instance::SetCallbackAddLazyConstraint( GMPRelaxedModel, 'Robust_NogoodCut' );GMP::Instance::Solve( GMPRelaxedModel );
One customer recently shared with us a success in reducing a long solve time by 80% with the new functions CreateBlockMatrices and SendToModelSelection available as of version 4.81.1 Could this method help your model solve faster? See details about the case below. We were facing issues with the solve time of this model, especially given the exponential growth of solve time when we solved larger models. Back in January, we started to investigate the cause of the long solve time together with AIMMS. However, the start of this investigation was daunting: no matter what we tried in model reformulation, scaling, different solvers or solver settings, the performance did not significantly improve. We concluded that if all else failed, we could always solve the individual time periods in the model one-by-one (because in fact those time periods are not connected). To efficiently split the generated matrix in smaller independent submatrices, solve them one-by-one, and merge back into one soluti
I need to impose a time limit for AOA and after the time limit is reached, the value of the incumbent is returned.MPOuterApprox::TimeLimit :=500;GMPOuterApprox::IsConvex := 1;GMPOuterApprox::DoOuterApproximation( GMPRO );BestAOA := GMP::Instance::GetObjective( GMPRO ) ;ProgAOA := GMP::Solution::GetProgramStatus( GMPRO, 1 );display BestAOA , ProgAOA; GMP::Instance::Delete( GMPRO ); in the progress window I can see a value to the “best solution” is assigned and the gap is around 30% but when the time limit is reached, the values assigned to BestAOA , and ProgAOA are as follows: bestAOA := na ; progAOA := 'IntermediateInfeasible' ;I appreciate any help in advance.
Hi, I seem to have difficulties with defining the number of decimals when rounding my parameters . The function description tells me I should define a positive integer for defining the number of decimals on the right of the decimal point, but this function gives me a different number of decimals. I use Units of Measurement and I think the ‘internal’ unit is rounded instead of my defined unit for the specific parameter (which differs in order 6 (10^6) ). Do more people encounter this problem?
Dear AIMMS experts, it would be great if there is a working example related to calling AIMMS from python using the latest release REST API.Also, following on other recent python-AIMMS questions here, could you kindly clarify the following questions:is the method of calling AIMMS using 'win32com' in python still valid? (as seen in the office github repo example in 'examples/Functional Examples/Calling AIMMSCOM/RunAIMMS.py ' ? is the previous method of calling python using 'subprocess' module and command line still valid for the recent version of AIMMS ? does the ways of calling AIMMS in python subject to the type of license I have (I have both free and paid academic licenses) ?
Dear community, I am implementing a structure change in my database declaration and keep coming across the error below. It occurs when mapping database columns to variables, using the DatabaseTable function. The change I have made is in adding an index "st”, and the column names in the data source Access Database.The error:The index "uc" present in Ramp_rate(uc, yr, ct) is not present in the previously generated entry (WorkingH2(i, yr, st)) of this read statement. AIMMS generates communication links when they are not explicitly specified between the keywords read/write and from/to. These entries are constructed by considering the column names in the database, the identifier names in the model and/or the database table mapping attribute.The variable Ramp_rate has little connection to the read statement where the error occurs. Has anyone encountered this error before, and do you have an idea what problem this error most likely hints towards? Thank you kindly for your help in advance,Sa
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);
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
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!
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
Waiting for sub jobs to complete For large jobs, it may make sense to split it into multiple jobs. It may not be convenient, or appropriate, to let the client session organize the communication between the various jobs.This article presents and discusses an example, whereby one control job manages several sub jobs. In addition, results are presented in the client session when all jobs are finished. Read more...
Hello AIMMS community!I currently working with aimms on my thesis and for my model i need the MainExecution read a huge amount of sets and parameters. For that I’m using Excel-Sheets. I also going to need subsets and here is my, i think, for you, very simple question:How can I exclude Excel cells from being readed? For example one of my sets is readed asSpreadsheet::RetrieveSet ( WorkbookName, facilities, "A4:A75");If now a subset of facilities is not contigious in this column A4:A75 but instead maybe the cells A10 to A15 and A20 to A30 and A50. How would i retrieve this subset? I tried this (see below) and many other variants and nothing worked. Hope you can help me. Spreadsheet::RetrieveSet ( WorkbookName, facilities, "A10:A15+A20:A30+A50");
Hello, I’m trying to solve my thesis model but there has been message about infeasible solution. ‘’Warning: After zero iterations CONOPT 4.1 concluded that ModelNew is locally infeasible.’’ I obtained some data in the listing file but the model is still showing infeasible. I would appreciate if anyone could help me to solve the infeasible problem.As attached is the zipped file of my model (Model New.data is the data file of my model).Thank you in advance.
Hello, In my simulation that I am trying to solve, I solve two models(Model 1 and Model 2) sequentially. I have a set of constrains that are trying to minimize the magnitude of changes between the variables, i.e. minimize u; where u >= (Variables of model 1 - Variables of model 2); u is the magnitude of the difference between the two variable sets. When I run my simulation on AIMMS, my code snippet results in empty values for the variable u, instead it should contain a numerical value. I have previously run my situation on GAMS software and the algorithm works. Kindly let me know if you need more explanation on my code to help me out, any direction to look into would be much appreciated
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.