/
IENG 212 LAB IENG 212 LAB

IENG 212 LAB - PowerPoint Presentation

faustina-dinatale
faustina-dinatale . @faustina-dinatale
Follow
378 views
Uploaded On 2017-11-10

IENG 212 LAB - PPT Presentation

1 Research Assıstant Kehınde Adewale ADESINA Different software for solving Linear Programming problems WHAT IS LINGO LINGO is a software tool designed to efficiently build and solve linear nonlinear and integer optimization models ID: 604080

model lingo current window lingo model window current variable solution side contents expression solve function text document file models

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "IENG 212 LAB" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

IENG 212 LAB 1Research Assıstant: Kehınde Adewale ADESINASlide2

Different software for solving Linear Programming problemsWHAT IS LINGO :LINGO is a software tool designed to efficiently build and solve linear, nonlinear, and integer optimization models.

CREATING A LINGO MODEL:

An optimization model consists of three parts:

Objective function: This is a single formula that describes exactly what the model should optimize.Variables: These are the quantities that can be changed to produce the optimal value of the objective function.Constraints: These are formulas that define the limits on the values of the variables. Slide3

Why Lıngo? Key Benefits of LINGOEasy Model ExpressionIt helps to reduce model development time. It allows formulation of linear, nonlinear and integer problems quickly in a highly readable format.

It allows straightforward expression of models in an intuitive

manner using summations and subscripted

variables just like you would with pencil and paper.Models are easier to build, easier to understand, and, therefore, easier to maintain. Convenient Data OptionsIt takes the time and hassle out of managing your data. It allows you to build models that pull information directly from databases and spreadsheets. It can output solution information right into a database or spreadsheet making it easier for you to generate reports in the application of your choice.Powerful

SolversIt is available with a comprehensive set of fast, built-in solvers for Linear, Nonlinear (convex & nonconvex/Global), Quadratic, Quadratically Constrained, Second Order Cone, Stochastic, and Integer optimization.

There is no need

to specify or load a separate solver, because LINGO reads your formulation

directly and

automatically

execute the

appropriate one.

Model

Interactively or Create Turn-key Applications

You

can build and solve models within LINGO,

Y

ou

can call LINGO directly from

other

application

written separately.

Interactively

,

LINGO gives a

complete modeling environment to build, solve, and analyze your models

..

LINGO

can also be called directly from an Excel macro or database application

.

Extensive Documentation and Help

LINGO

provides all of the tools you will need to get up and running quickly

.Slide4
Slide5

1. File Menu Commands:NewOpens a new model window. OpenOpens an existing model previously saved to disk.

SaveSaves the contents of the current window to disk.

Save As

Saves the contents of the current window to a new name. CloseCloses the current window. PrintPrints the contents of the current window. Print SetupConfigures your printer. Print PreviewDisplays the contents of the current window as it would appear if printedLog OutputOpens a log file for logging output to the command window. Take Commands

Runs a command script contained in a file. Export FileExports a model in MPS or MPI file format. License

Prompts you for a new license password to upgrade your system.

Database User Info

Prompts you for a user id and password for database access via the @ODBC() function.

Exit

Exits LINGO. Slide6

2. Edit Menu Commands:UndoUndoes the last change.Redo Redoes the last undo command.

Cut Cuts the current selection from the document.

Copy

Copies the current selection to the clipboard. Paste Pastes the contents of the clipboard into the document. Paste SpecialPastes the contents of the clipboard into the document, allowing choice as to how the object is pasted. Select AllSelects the entire contents of the current window. FindSearches the document for the occurrence of a specified text string. Find Next

Repeats the find operation for the last string specified.ReplaceReplaces a specified text string with a new string.Go To Line

Moves the cursor to a specified line number.

Match Parenthesis

Finds the parenthesis that closes a selected parenthesis.

Paste Function

Pastes a template of a selected LINGO @function.

Select Font

Specifies a font for a selected block of text.

Insert New Object

Embeds an OLE (Object Linking and Embedding) object into the document.

Links

Controls the links to external objects in your document.

Object Properties

Specifies the properties of a selected, embedded object. Slide7

3. LINGO Menu Commands:Solve Solves the model in the current window. Solution Generates a solution report window for the current model.

Range Generates a range analysis report for the current window.

Options

Sets system options. Generate Generates the algebraic representation for the current model. Picture Displays a graphical picture of a model in matrix form. Debug Tracks down formulation errors in infeasible and unbounded linear programs. Model StatisticsDisplays a brief report regarding the technical detail of a model. LookGenerates a formulation report for the current window. Slide8

PRIMARY RULESComments in the model are initiated with an exclamation mark (!)

and appear in green text.

Each LINGO statement must end in a semi-colon (;).

Operators and functions in LINGO appear with blue text. All other text is shown in black. Variable names must begin with a letter (A-Z). characters in the variable name may be letters, numbers (0-9), or the

underscore character (_).

Variable names can be up to 32 characters in length. Slide9

LINGO OPERATORS:Exponentiation: ^ Multiplication: * Division

: / Addition

: +

Subtraction: -The relational operators are used when defining the constraints for a model. They are as follows:The expression is equal: = The left side of the expression is

STRICTLY LESS THAN to the right side: <

The

left side of the expression is less

THAN OR EQUAL to

the right side: <=

The left side of the expression is less

STRICTLY GREATER THAN

to

the right side:

>

The

left side of the expression is

GREATER THAN OR EQUAL to

the right side: >= Slide10

COMMON LINGO ERROR MESSAGES: Unable to open file: filename.

Retype

filename correctly.Invalid input: A syntax error has occurred. Check the line LINGO suggests for missing

semi-colons.

Unmatched

parenthesis

.

Close

the parenthesis set

.

No relational operator

found

.

Make

sure all constraints contain =, <=, >=

,

<, >.

Unterminated

condition

.

Put a colon at the end of each conditional statement in a set operator Slide11

The model’s dimensions exceed the capacity of this version.No feasible solution found.

Check model’s consistency and constraints.

Unbounded solution. Add constraints.Unrecognized variable name: variable name.

Check spelling. Slide12

A SIMPLE EXAMPLE:Find the solution of the following LP model by using LINGOMAX = 3x1+x2;

S.T.

x1

≤ 4x1+x2 ≤ 7X1,X2≥0The LINGO model has been entered into the LINGO Model window, themodel can be solved by clicking the Solve button on the toolbar, by selecting LINGO Solve from the menus.Slide13

If no errors are found, then the LINGO Solver Status window appears. Slide14

REPORTS:LINGO will notify you of any errors if it

has encountered one

. The best way to get information about these errors is to consult the Error Messages section in the software’s

proprietary tutorial. Slide15

This window shows the values of each variable that will produce the optimal value of the objective function. The reduced cost for any variable that is included in the optimal solution is always zero. For variables not included in the optimal solution, the reduced cost shows how much the value of the objective function would decrease (for a MAX problem) or increase (for a MIN problem) if one unit of that variable were to be included in the solution. For example, if the reduced cost of a certain variable was 5, then the optimal value of the MAX problem would decrease by 5 units if 1 unit of the variable were to be added. Slide16

Example 2 :Solve the following LP by using LINGO.Min z= 6X1+7X2+3X

3+5X

4

Subject to5X1+6X2-3X3+4X4≥12X

2-5X3-6X4

≥10

2X

1

+5X

2

+X

3

+X

4

≥8

X

1

,X

2

,X

3

,X

4

≥0Slide17
Slide18
Slide19