[Ipopt] Boolean to Integer conversion

design design at np-soft.ru
Sat Jul 21 12:44:09 EDT 2012


Dear colleagues,

 

Is the follow program correct?

 

{{{

g3 0 1 0            # problem CheckOr

1 1 1 1 0           # vars, constraints, objectives, ranges, eqns

1 1       # nonlinear constraints, objectives

0 0       # network constraints: nonlinear, linear

1 1 1     # nonlinear vars in constraints, objectives, both

0 0 0 0 # linear network variables; functions; arith, flags

0 0 0 0 0 # discrete variables: binary, integer, nonlinear (b,c,o)

1 1 # nonzeros in Jacobian, gradients

0 0 # max name lengths: constraints, variables

0 0 0 0 0 # common exprs: b,c,o,c1,o1

C0        # mdlCheckOr.c1: (x<=2)+(x>=7)>=1

o0        # +

o23      # <=

v0        # mdlCheckOr.x

n2

o28      # >=

v0        # mdlCheckOr.x

n7

O0 0     # Sum((mdlCheckOr.x-6)^2)

o5        # ^

o1        # -

v0        # mdlCheckOr.x

n6

n2

r # constraint ranges

2 1

b # variables ranges

0 0 10 # mdlCheckOr.x

k0 # Jacobian column lengths

J0 1

0 0

G0 1

0 0

}}}

 

In the program condition [(x<=2) OR (x>=7)] was written like that
[(x<=2)+(x>=7)>=1]

 

Serge

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120721/5f869be8/attachment.html>


More information about the Ipopt mailing list