教学课件:第七章-ILOG-OPL-界面.ppt
《教学课件:第七章-ILOG-OPL-界面.ppt》由会员分享,可在线阅读,更多相关《教学课件:第七章-ILOG-OPL-界面.ppt(50页珍藏版)》请在三一办公上搜索。
1、主讲人:雒兴刚东北大学系统工程研究所Email:Tel:83682292,优化软件与应用,第七章 OPL 界面,IDE 介绍,IDE 是什么:integrated development environment(IDE)for mathematical programming and combinatorial optimization applications.It is the graphical user interface(GUI)for the OPL modeling language and the ILOG Script for OPL scripting language.,
2、第七章 OPL 界面,IDE 介绍,IDE能做什么:Create and modify model,data,and project files using the editing capabilities Execute a project Generate a compiled model Generate external data files or calculated data files to various formats Visualize OPL results in text or tabular form Visualize the state of variables
3、at some point during the search for a solution Set GUI options and mathematical programming options Connect to a database or to a spreadsheet to read and write data Work with ILOG Script for OPL,the scripting language Profile the execution of a model Search for relaxations of variables and constrain
4、ts,and for conflicts between constraints Debug scripts using the debug facilities,第七章 OPL 界面,IDE 介绍,IDE 环境处理三种文件:model files,data files,and project filesModels:保持OPL语句及ILOG脚本,后缀是.mod。也可以生成编译后的模型格式,后缀是.opl。Data:对于较大规模问题,可以分离数据之数据文件(.dat),数据文件中也可以说明外部数据源,如Excel文件或ODBC数据库源等。Projects:文本格式,XML表示。说明projec
5、t关联的模型和数据文件。类似VC的工程文件。,第七章 OPL 界面,IDE 介绍,创建新文件:,第七章 OPL 界面,IDE 介绍,运行项目:如何检查语法:运行项目后,出错的语法会以红色标识。修改错误后,继续运行项目。,第七章 OPL 界面,IDE 介绍,查看运行结果:Solution TAB显示运行的结果。CPLEX statistics显示算法的具体运行参数。当然,可以通过Options设置显示的项。,第七章 OPL 界面,IDE 介绍,产生一个编译的opl文件:File-Generate Compiled Model File,第七章 OPL 界面,IDE 介绍,IDE文本编辑的特色:M
6、DI approach;Syntax coloring;Multiple levels of Undo and Redo;Automatic indentation Blocks:as delimited by curly brackets;Bracket(or brace)matching;When typing,or),highlighted;Margin symbols the yellow arrow that indicates the current line the red box that indicates an error the red circle that indic
7、ates a breakpoint Reload prompt:If you modify a file with an external editor,you are prompted to reload Customization:options to customize the editor,第七章 OPL 界面,IDE 介绍,数据库支持:OPL通过ILOG DBLink 5.0 支持RDBMS;支持的数据库类型:OPL数据库支持通过函数DBconnection 来实现,该函数主要有两个参数:the database client you want to use:e.g.oracle81
8、the connection string:e.g.scott/tigerilog“后面我们有一个详细的数据库连接的例子。,第七章 OPL 界面,IDE 介绍,为什么使用ILOG 脚本?Add preprocessing to prepare data for the model Control the flow while solving the model Set CPLEX parameters Add postprocessing to aggregate,transform,and format data(including results data)for display or f
9、or sending to another application,for example,a spreadsheet Solve repeated instances of the same model Feedback:Create algorithmic solutions where the output of one model instance is used as the input of a second model instance,第七章 OPL 界面,IDE 介绍,ILOG 脚本的入口点The main statement for a flow control scrip
10、t The execute statement for preprocessing and postprocessing scripts 没有独立的脚本文件;脚本文件总是和模型文件结合使用,第七章 OPL 界面,例:IDE Project,1、在IDE界面中,FileNewProject.,红色的星号表示是必选项。选择Location为C:Temp,在项目Name中键入MyProject;可以看到系统自动命名mod文件和dat文件为MyProject。用户也可以对其名称进行修改,或者点选其右面的图标,选择一个现有的文件添加到本项目中;注意一个项目中mod文件只有1个,dat文件可以有多个;点击
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 教学 课件 第七 ILOG OPL 界面
链接地址:https://www.31ppt.com/p-6289993.html