Topics about getting started or leveling up as an AIMMS developer. Datalinks, AIMMS language, building apps...
- 618 Topics
- 1,349 Replies
I want to write data in Excel. Generally “Spreadsheet::Assign...” commands work fine. However, I fail to include zeros in the output in Excel. I want this:i/t 1 2 1 0 0 2 5 7 I get this:i/t 1 2 2 5 7 Now I found the “axll::” library and the axll::WriteTable command, which seemed promising. Unfortunately this seems to work differently, since commands need an open workbook, which the “spreadsheet::” commands don´t. Combining both worlds doens´t work either. Can someone help? I am very confused. Thanks
Hi,I am working on a project of delivery planning.In my model i have a constraint which defines the Unavailability of a vehicle for some time due to maintenance or already on a delivery. The Time a vehicle becomes unavailable is a parameter.the constraint is :Here,X_v,t → indicator variable for maintenance(whether need to go for maintenance)S(v) → time required for maintenance of vehicle v status_v,t → indicator variable for availability of vehicle v on day t I am unable to write it in AIMMS. how to get the range of tau ?i was able to get the range for a single value parameter h using SubRange function tau in SubRange(T, t, t + h)but for a parameter set S SubRange is not working. Writing S(v) in place of single valued parameter h giving me this error*There is a mismatch in the master sets of set "T" and domain set "S" in the first argument of the call to intrinsic function "SubRange". what could be a possible solution for writing this constraint if S(v) i
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!
Hello, i am new to aimms and completed the beginners tutorial and tried to understand the machine planning example, but it was to complicated for me to understand all of it. I want to solve a scheduling problem but i have problems creating the model. Let me explain my situation: In the production there are build articles from different orders and they are transported inside the company within containers. The transport limitation is 8 containers an hour. I want to solve the problem and want the best order which is <= 8 containers an hour, if not possible, than the next following orders should be so small, that it will be compensated, if not possible, a gap with no production time should be inserted. It would be ideal, that the same article is produced in one step (e.g. Article 52107 has to be build for 3 different customer orders). After all, i want to visualize it. My first problem is, that i don’t know how to produce on order after another and make the timeline to calculate the dem
Why do we need docs? You may be thinking – I’ve got a million things to do before I can deliver an app to my client, I don’t have time to write documentation!But consider a time you’ve downloaded a tool, or tried to connect with a component library, or even tried to put together a piece of furniture and discovered that the documentation is impossible to understand or, worse, not there at all. Consider another time where the documentation was easy to use, and you probably don't even remember reading it – you just followed the directions and it worked. Which situation would you like your user to face? This also applies to a time when you’ve tried to work on a group project, or taken over a project after someone else. Isn’t it nice when someone explains what they’ve done, how, and why? Docs for your team This is documenting how you made the app in the developer platform. Write them for anyone who may be working on your app, now or in the future. Even if you're a team of one, it's a good
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.
Hi dear community, I tried to follow the tutorial https://how-to.aimms.com/Articles/85/85-using-axll-library.html#importing-data-from-excel-files to read in some data from excel sheet. I’ve installed AIMMSXLLibrary and put the data file directly in the library folder under my project (not sure it is required or not) as shown in the screenshot. Then I created the procedure called “ReadInDataFromExcel” in my project and used the code as shown in screenshot. But when I tried to run the procedure to test whether it can point to the .xlsx file or not, the AIMMS through out this error : The identifier "WorkBookName" has not been declared. I’m not sure what’s going on since I almost copy the code from the website. Could anyone please help? Thanks!
Hi, so with the ArgMax function I can find the maximum value out of a Parameter of numbers like this: ArgMax(i, SomeParamter(i)) However I would like to find the maximum value in a 2-dimensional Paramter. So ideally I would like to do something like this: ArgMax((i,j), Some2DimensionalParamter(i,j)) This is not possible though, because apperently only one index is permitted for the iterative operator argmax. Does anyone have an idea how this could be done? Thank you!
Hello everyone. I have been looking to solve a train scheduling problem using bilevel optimization. In this problem, two conflicting objectives are considered: the operator’s and the passengers’, having the passengers’ optimization problem nested inside the operator’s optimization problem (as a constraint). Is it possible to model this type of bilevel optimization problem? If not, are there other approaches using stackelberg games that can be considered? Thank you very much.
ExcelSetActiveSheet(data.xlsx, Sheet1) unable to get a handle to the workbook: Could not open Excel.
HiI am getting the following error while executing my code in AIMMS.ExcelSetActiveSheet(data.xlsx, Sheet1) unable to get a handle to the workbook: Could not open Excel.It would be grate if you can help me with this issue.
How to Connect AIMMS with RTutorial
Note: With the rebuild of our HTTP Client Library to interact with external services that support REST API calls and the new Data Exchange Library, we have decided to deprecate R on the AIMMS Cloud and the R-Link. Read more.Earlier this year, we released a collection of resources that enable you to integrate AIMMS with scripting languages like Python and R. In our latest How-To, we illustrate how you can extend an AIMMS app with an R model that generates a Sankey diagram using the networkd3 package. The R model is exposed as a REST API using the Plumber package. As the example shows, besides running machine learning models, data processing and transformations, R and Python can also be used to generate visualizations for your AIMMS WebUI application. In this case, the R model generates a visualization from input data provided by AIMMS. We also show how to use the iFrame widget (experimental) in AIMMS to display an interactive Sankey visualization, as the networkd3 package creates HTML
Hi teams, I’m working in multi-depot VRP with Intermediate Facilites and used assumptions as follow: vehicles will depart and return in same depot vehicles will only arrive at most one customer vehicles are heterogenous with two type of capacity But the model results infeasible integer solution, Could anyone help me to fix the issue..? And also, I want to make Intermediate Facilities where can receive from depot and distribute to customer. The intermediate Facilities are Location 3,4,5,6. Could anyone help me how to model it..? Looking forward your kind response..?
Hi. I am trying a generate a plot of optimality gap vs solution time. For that, I am trying to retrieve incumbent solution, best bound and solution time after every 5 iterations. But, for some reason, I am having issues with callback and I don’t get anything retrieved. Attached herewith are the images giving implementation of callback operation. Could anyone please tell where I am going wrong? Thanks, Sujit
The help feature for using a function is very nice: [img]https://uploads-eu-west-1.insided.com/aimms-en/attachment/ae9e8873-838e-44cb-b793-7315307b7c7a.png[/img] The auto-populate for inserting an element is also swell. [img]https://uploads-eu-west-1.insided.com/aimms-en/attachment/5ebc8d08-1f69-40b2-b656-98741711f6ec.png[/img] But how about some kind of auto-fill for the functions themselves? Is there a keyboard shortcut for that? Thanks! ~Bon
Hello together, I have declared a parameter as an Min-Operator, which have to indicate the minimal objective function value for each k across all j. Background: In each k at least one j is infeasible (objective function value = “na”) as certain restrictions are violated. As a result, the problem occurs that the Min-Operator outputs "na" as the minimum value for each k. The Min-Operator’s definition is as follows: Index domain: k min(j,Parameter(j,k)) Does anybody now how to exclude “na” in the Min-Operator’s definition? Thank you in advance! Best regards David
HiI am getting the following error while executing my code in AIMMS.“spreadsheet::RetrieveTable(BCLOAD.xlsx, Load_Base(h,y,a), B3:CM8786, A3:A8786, B1:CM2, Load, 1) unable to get a handle to the workbook: Could not open Excel.”I believe it is happening after some automatic updates on my Microsoft office. Previously it was working fine.I tried to reinstall my office, change my excel file name, or even copied the project folder to my PC from the google drive. None of them resolved the issue.It would be grate if you can help me with this issue.
Hi, AIMMS developer does not scale properly with high resolution displays that are becoming the norm at laptops, and as a result, it either shows everything blurry, or the UI is too small to read (depending on the scaling option of Windows). While the editor font size can be changed to make development possible, the size of the AIMMS UI elements does not change. Until AIMMS is revamped and starts scaling properly, would it be possible to allow us to at least change the font size of the windows that show Model Explorer, Pages, Templates etc ? In a 4K display currently the model explorer is not legible.
Hi there! My question is fairly simple: how should we handle conflicts in the .nch file when merging different branches in a version control system? When two branches originate from the same commit, and namechanges are made, the .nch file contains new lines at exaclty the same line numbers, often (always) resulting in conflicts. Currenlty I resolve these by resolving the conflicts with "mine before theirs” as I tend to want to keep both. The need for this (simple) manual intervention is a bit annoying. What are the alternatives? Could we even simply ignore the .nch file in our git repository? Is there a way to track the file but prevent conflicts? I would like to hear your thoughts!
Hi Community, i have to build a robust optimization model for my masterthesis at the Technical University in Braunschweig. Therefore i choose the Minimax-Regret Function! These approach deals with different scenarios k. I need to implement this function in an existing basic model, which is a single factory location problem. The basic model calculates the minimal sum of all deviations "d" from target values (so it is a Goal Programming approach) and based on these deviations the output of the model is one compromise-optimal location solution (the basic model is based on one scenario). So first i implement a new index k for the scenarios to dealwith more than one scenario. How to deal with a minimax-obejctive function in AIMMS is already explained very well in one of the AIMMS Modeling Guides ([url=https://download.aimms.com/aimms/download/manuals/AIMMS3OM_LinearProgrammingTricks.pdf]https://download.aimms.com/aimms/download/manuals/AIMMS3OM_LinearProgrammingTricks.pdf[/url]). But i ha
I often have thoughts/suggestions/questions on the documentation that have only to do with the understanding of the language (not AIMMS or anything mathematical). Do we have a sub-forum that users can ask or discuss things about that? In particular, right now I'm once again running into the situation where the documentation shows the text representation, but yet AIMMS doesn't allow the ability to directly code in text. So I'm wondering if there's a place in the documentation that shows how to convert text representation into what to put in the AIMMS GUI. Thanks! ~Bon
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.
Hi all, I am new to AIMMS and I was wondering if someone could help me with my model. I would like to maximize profit, fulfill as much demand as possible + keeping a safety stock. Besides reorder quantity is restricted by a maximum order quantity (see Sets, Parameters, Variables and Constraints attached). I linearized min(Demand, E). E = demand fulfilled However, when I introduce the maximum order quantity constraints the model becomes infeasible. Besides, the listing file results in the following messages: CPLEX 12.10 constructed the following irreducible infeasibility set (IIS). The IIS consists of 3 constraints and 4 variables. Stock_definition(B,NL19,p-1) .. [ 9 | 31 | IIS ] - 1 * X(B,NL19,p-1) + 1 * Stock(B,NL19,p-1) = -120320 ; (lhs=0) **** Stock_definition(B,NL33,p-1) .. [ 9 | 43 | IIS ] - 1 * X(B,NL33,p-1) + 1 * Stock(B,NL33,p-1) = -428130 ; (lhs=0) **** OQ_B(p-1) .. [ 9 | 152 | IIS ] + 1 * X(B,GB13,p-1) + 1 * X(B,NL19,p-1) + 1 * X(B,NL30,p
I would like to report the contents of the Progress window such as the number of variables, parameters, non-zeros, objective function, solve-time, used method, etc. to a customized log file in a preferably .txt or .xlsx file formats. My goal is to have separate log files for each run so I can analyze specific parameters, e.g. the relation between objective function, solver method, and solving time. I already found a way, in which the solver (I use Gurobi) writes this information together with a specific number of solving iterations to a log file in the log folder. This method has two major drawbacks for me: First, with every run, the new log will be added to the older log in the same .txt file. So I have to exit the AIMMS after each run to have separate log files! Second, there is a lot of information in this log file that I have no interest in. So I need to write an algorithm in a third-party application to fish the needed values. Are you aware of any method to achieve my goal wit
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.