search
UMD  This Site




TITLE
ENCE723_PB2

!Problem #2
!Formulation using MPL
!Note: use student version of conopt as solver

OPTION
ModelType = Nonlinear;

INDEX

DATA

VARIABLES
x1;
x2;

MACROS

MODEL
min x1;

SUBJECT TO
x1*x1 - 2*x1 + x2*x2 - 2*x2 + 2 <=1;
x1*x1 - 2*x1 + x2*x2 + 2*x2 + 2 <=1;
BOUNDS
FREE
BINARY
END

OUTPUT USING XPRESS-MP SOLVER
(solution is not correct, KKT conditions do not hold, this is a hard problem to solve)

MPL Modeling System - Copyright (c) 1988-2003, Maximal Software, Inc.
-------------------------------------------------------------------------------

MODEL STATISTICS

Problem name: ENCE723_PB2

Filename: ENCE723_PB2.mpl
Date: June 30, 2004
Time: 15:25
Parsing time: 0.00 sec

Solver: XPress
Objective value: 0.500000000000
Iterations: 0
Solution time: 0.00 sec
Result code: 1

Constraints: 2
Variables: 2
Nonzeros: 4
Density: 100 %

SOLUTION RESULT
Optimal solution found

MIN Z = 0.5000000000
DECISION VARIABLES
PLAIN VARIABLES
Variable Name Activity Reduced Cost
--------------------------------------------
x1 0.5000000000 0.0000000000
x2 0.0000000000 0.0000000000
--------------------------------------------
CONSTRAINTS

 

OUTPUT USING CONOPT (Solution is close)

MPL Modeling System - Copyright (c) 1988-2003, Maximal Software, Inc.
------------------------------------------------------------------------------

MODEL STATISTICS

Problem name: ENCE723_PB2

Filename: ENCE723_PB2.mpl
Date: June 30, 2004
Time: 15:27
Parsing time: 0.00 sec

Solver: Conopt
Objective value: 0.999989100072
Iterations: 15
Solution time: 0.03 sec
Result code: 201

Constraints: 2
Variables: 2
Nonzeros: 4
Density: 100 %

 

SOLUTION RESULT

Local optimum solution found

MIN Z = 0.9999891001
DECISION VARIABLES
PLAIN VARIABLES
Variable Name Activity Reduced Cost
------------------------------------------------------
x1 0.9999854668 0.0000000000
x2 0.0000000000 0.0000000000
------------------------------------------------------

CONSTRAINTS
PLAIN CONSTRAINTS
Constraint Name Slack Shadow Price
------------------------------------------------------
c1 0.0000000000 0.0000000000
c2 0.0000000000 0.0000000000
------------------------------------------------------

END

 


 

Additional Resources

Problem 2 Home

Problem 2 Matlab Code

Probem 2 MPL Code

Problem 2 Excel

Teaching Home




Copyright 2011
Civil Engineering Home Applied Mathematics UMD UMD