ampl

AMPL variable size set iteration

て烟熏妆下的殇ゞ 提交于 2019-12-13 18:11:50
问题 I'm learning AMPL so that I can use it some time later in my programs. I have a small question though that I couldn't find its answer yet. Suppose I have a set , this set will contain some subsets, those subsets may differ in their dimensions. For example: set x:= (a,b,c) (a,c) (d,t,r,e,s); and so on .. Now I want to write a constraint which will have to deal with all elements in each subset (similar to a loop that will iterate between a , b , and c in the first subset, a and c in the second

Does anyone use AMPL anymore

只谈情不闲聊 提交于 2019-12-13 01:36:15
问题 I took a class on "Intelligent Decision Making" (which was mostly an Problem Optimization class). In the class we learned about AMPL and how to extend the solvers. I haven't heard much about it lately, nor have I seen job listings for it. My question is: Is AMPL still in use anymore? If so what is it being used for? Yes, I do understand that AMPL can be replaced with Matlab, however AMPL is free and Matlab isn't even close. 回答1: A matlab toolbox called YALMIP allows you to do formulation

Using gurobi with java vs gurobi with ampl

霸气de小男生 提交于 2019-12-12 23:35:03
问题 What are the advantages of using Gurobi with AMPL instead of using Gurobi direct API (java, C#, C++, etc.) for solving large MIP problems? Are there performance benefits when using Gurobi's API instead of AMPL? 回答1: Up until the mid 90's the only practical options for using a MIP solver with large scale problems (so excluding spreadsheets) were creating mps files using the low-level C interface (known as the callable library in cplex) using a domain specific language like AMPL or GAMS. At the

GLPK MathProg sets and groups

∥☆過路亽.° 提交于 2019-12-12 12:08:29
问题 I hope this is obvious to someone. I have only had a vanilla use of GLPK/MathProg. I am having trouble figuring out the syntax in GNU MathProg (within GLPK) to do the following, for example: set PartsOfWeek; set WeekDays; data; set PartsOfWeek := WorkWeek WeekEnd; set WorkWeek := Mon Tue Wed Thu Fri; set WeekEnd := Sat Sun; set WeekDays := setof{d in (WorkWeek union WeekEnd)}(d); The problem is that this is rejected by MathProg. In general, I just want to be able to: - declare a Partition

Error in Gurobi for optimization?

萝らか妹 提交于 2019-12-11 12:45:13
问题 sw: ampl ampl: include Availability1.ampl Gurobi 5.5.0: mipgap = 0.00000000000000000000000001 outlev = 1 Optimize a model with 68298 rows, 1934 columns and 28751 nonzeros Presolve removed 1934 rows and 68298 columns Presolve time: 0.02s Presolve: All rows and columns removed Iteration Objective Primal Inf. Dual Inf. Time 0 9.9948451e-01 0.000000e+00 0.000000e+00 0s 179 9.9948451e-01 0.000000e+00 0.000000e+00 0s Solved in 179 iterations and 0.06 seconds Optimal objective 9.994845101e-01 Gurobi

Undefined reference to (error) in C++ Eclipse but working in Visual Studio 2015

泪湿孤枕 提交于 2019-12-11 12:17:59
问题 I am trying to integrate AMPL with C/C++ using AMPL-API on Windows-7 in Eclipse Mars 2.0. I created a Makefile project in Eclipse which uses MinGW CC to compile the firstexample code given in their example directory. firstexample.cpp: #include <iostream> #include "ampl/ampl.h" using namespace std; int main() { ampl::AMPL ampl; // Read the model and data files. std::string modelDirectory = "models"; ampl.read(modelDirectory + "/diet/diet.mod"); ampl.readData(modelDirectory + "/diet/diet.dat");

AMPL: does the results after using the option “timelimit” for cplex meet all the constraints?

99封情书 提交于 2019-12-11 09:27:20
问题 I have a dummy question that I need to know its answer. I'm working on a project that requires AMPL and CPLEX as a solver. Now this problem normally takes more than 140 seconds to be solved. While I was searching, I came into an option called timelimit . I used this option with value option cplex_options 'timelimit=5' and the results were shown within 5 seconds. Now my questions is, does the output meet all the constraints and is within the boundaries I set in the code? Or did I just

Using MATLAB with AMPL

梦想与她 提交于 2019-12-07 12:16:11
问题 I have a collection of optimization problems written in AMPL and GAMS. And I have an algorithm in Matlab. How can I solve these problems with algorithm in Matlab? I've read about GDXMRW interface for GAMS, but as I understood it can only exchange data between Matlab & GAMS? So will it be necessary to perform all calculations of gradients, derivatives etc. in GAMS and then to give these results to Matlab? Maybe someone knows how to connect this? 回答1: (Disclaimer: I work for MathWorks.) I am 3

Comparison of GAMS versus AMPL Algebraic Modelling Languages

拈花ヽ惹草 提交于 2019-12-04 16:09:43
问题 I'd be interested in getting the opinion from users of GAMS and AMPL on what the strength and weaknesses of each these languages are. 回答1: In terms of functionality they are pretty much the same allowing to express most types of optimization problems. Personally, I prefer AMPL because it has intuitive and expressive syntax and it is very well documented in the book. Another important advantage of AMPL is that despite the fact that it is commercial you can avoid the vendor lock-in because

Comparison of GAMS versus AMPL Algebraic Modelling Languages

杀马特。学长 韩版系。学妹 提交于 2019-12-03 11:03:16
I'd be interested in getting the opinion from users of GAMS and AMPL on what the strength and weaknesses of each these languages are. In terms of functionality they are pretty much the same allowing to express most types of optimization problems. Personally, I prefer AMPL because it has intuitive and expressive syntax and it is very well documented in the book . Another important advantage of AMPL is that despite the fact that it is commercial you can avoid the vendor lock-in because there is an open source alternative - GNU MathProg . GAMS on the other hand used to have a more advanced IDE