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?

解决方案

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 time, for MIP models of nontrivial complexity, the AMPL models would be much more concise, readable and easier to maintain. Even today and AMPL model is going to look much more like a mathematical formulation than anything else.

One advantage of AMPL is its data structures, however today the standard libraries for C#, Java and C++ all have great data structures. Another advantage of AMPL is that its syntax looks very intuitive

subject to {j in J} sum {i in I} x[i,j] <= b[j]

but the new C++0x and the latest versions of Java have syntax that more closely mimics this.

AMPL is portable between solvers, however the interfaces don't differ that much between solvers. While it's not a trivial task to port an application from one solver to another, for me it hasn't been as big of a deal as trying to switch databases (say from MySQL to Postgres).

There are some specific disadvantages of AMPL. For most business applications, introducing AMPL to a project means adding another programming language to the mix. Time spent learning AMPL will be useful only for writing math programming models. AMPL has a tiny user base compared with Java, C# or even C++ and improvements to the underlying technology come from only one small company (full of very smart people, but a single small company nonetheless). If you want to use a hybrid approach to solving your optimization problem (for example, a column generation strategy with a heuristic to generate additional columns), you are left to some kludges. If you want to do something like run your solver until 1% of optimality, but run for at least 10 seconds, you can't do that with AMPL, but could do it with callbacks using one of the Gurobi APIs.

Python may offer the best of both worlds. It is a general purpose programming language that is a wide variety of application areas. Gurobi has its own Python API, but there are internal domain specific languages like PuLP and Pyomo which portable between solvers.

gurobi和java,在Java中使用Gurobi与在Ampl中使用Gurobi相关推荐

  1. java se13安装教程_在Linux发行版中安装Java 13/OpenJDK 13的方法

    本文介绍在Linux发行版Ubuntu 18.04/16.04.Debian 10/9.CentOS 7/8.Fedora 31/30/29中安装Java 13/OpenJDK 13.Java SE ...

  2. (转)java 中的try catch finally 语句中含有return语句的执行情况(总结版)

    原处:http://blog.csdn.net/ns_code/article/details/17485221 在这里看到了try catch finally块中含有return语句时程序执行的几种 ...

  3. java中example函数作用_MyBatis逆向工程中的Mapper接口以及Example的实例函数及详解...

    一.mapper接口中的方法解析 mapper接口中的函数及方法 方法功能说明 int countByExample(UserExample example) thorws SQLException按 ...

  4. 【Java学习】从一个简单的HelloWorld项目中入门maven

    创建一个maven项目 这里推荐官方文档:maven官方文档 [注]此篇文章也是笔者学习笔记,如有错误,请见谅. [注]我把Goal翻译成命令.比如Plugin Goal: ps:我他喵的写了一大半的 ...

  5. Java基础-Java中的堆内存和离堆内存机制

    Java基础-Java中的堆内存和离堆内存机制 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 转载于:https://www.cnblogs.com/yinzhengjie/p/9 ...

  6. JAVA中console方法怎么用_Java中Console对象实例代码

    Java中Console对象实例代码 发布于 2020-12-20| 复制链接 摘记: 在JDK 6中新增了java.io.Console类,可以让您取得字节为基础的主控台装置,例如,您可以藉由Sys ...

  7. Java基础-JAVA中常见的数据结构介绍

    Java基础-JAVA中常见的数据结构介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.什么是数据结构 答:数据结构是指数据存储的组织方式.大致上分为线性表.栈(Stack) ...

  8. JAVA中的异常的触发_java中的异常

    在日常的程序开发中难免会出现遗漏并且就算代码没有问题可是由于程序运行环境的内存不够了,磁盘满了,网络连接问题等这些非正常的情况在java中都称之为异常.在java中对异常的处理有统一的异常处理机制,今 ...

  9. java中正则表达式函数_java正则表达式PHP中的正则表达式函数介绍

    java正则表达式PHP中的正则表达式函数介绍 正则表达式(Regular Expression) 正则表达式系统: 1.POSIX 2.Perl PHP中使用的regex是PCRE: NOTE:PC ...

  10. java中的stack类和C++中的stack类的区别

    文章目录 1 java中的stack类和C++中的stack类的区别 1.1 java中的stack类 1.2 C++中的stack类 1.3 分析 不经意间想到了这个问题,存到栈中的是对象的引用,还 ...

最新文章

  1. js实现审批流_超实用的工作流,小白用户也能轻松驾驭
  2. 树莓派 4B安装ubuntu18.04与melodic版ROS
  3. HTML5系列四(特征检测、Modernizr.js的相关介绍)
  4. 343. Integer Break
  5. 武汉大学信息管理学院java上机考试_java上机试题
  6. Ubuntu下的文件安全删除工具
  7. Xcode 真机测试破解方法(转加修改)xcode 4.3 通过
  8. 移动端上下拖动调整顺序效果_移动端上下滑动事件之--坑爹的touch.js
  9. 12 浏览器对象模型BOM
  10. Shapefile简介
  11. Win7下如何让Numlock保持打开状态
  12. arcgis导入坐标点转面_点数据转成Arcgis线、面文件
  13. tongweb java_home_中标麒麟操作系统下部署 Web项目(Tongweb + DM)
  14. 桌面文件突然不见了怎么恢复?
  15. PDF文件打开口令如何破解
  16. 计算机教师资格证难不难考,教师资格证 信息技术难考吗
  17. 正则表达式与JSON
  18. Magento 过滤导航插件Mana
  19. uboot研读笔记 | 05 - 移植uboot 2012.04到JZ2440(支持Nand Flash读写)
  20. W5500芯片使用bug及注意事项

热门文章

  1. 日常小tip_Bat命令运行Java程序
  2. 计算机二级Java笔记/重难点易错点总结(按章节归纳整理)
  3. ajax上传文件报错500,JQuery的AJAX文件上传错误500
  4. matlab 取点画图,Matlab plot画图学习---画点以及两点连线
  5. 激光打标机金橙子软件画出五角星最简单方法图解
  6. C语言实现汉诺塔【图文讲解】
  7. FX5 C的编程语言,三菱FX5-C32EX/D手册FX5-C32EX/D编程手册 - 广州凌控
  8. 视频教程-Matlab小白入门必备教程-Matlab
  9. 科创人·黑湖科技CEO周宇翔:To B产品不应忽视产品体验,制造业的未来是需求定义生产
  10. 印前软件 数码打样 管理软件