MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Optimization with conditional restrictions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44534] Optimization with conditional restrictions
  • From: guillerm at usal.es
  • Date: Thu, 13 Nov 2003 05:57:52 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear group,
I wish minimize a function, ej: 
55*x12 + 53*x22 + 53*x32 + 3000*x11 + 3000*x21 + 3000*x31
including conditional restrictions, ej: 
x11 == If[x12 > 0, 1, 0] && x21 == If[x22 > 0, 1, 0] && 
x31 == If[x32 > 0, 1, 0]}, 
And other standars restrictions

Here is an example:

NMinimize[{55*x12 + 53*x22 + 53*x32 + 3000*x11 + 3000*x21 + 3000*x31, 
25*x12 + 25*x22 + 25*x32 == 16000 && 0 <= x12 <= 336 && 
0 <= x22 <= 336 && 0 <= x32 <= 336 && 
x11 ?¸ Integers && x21 ?¸ Integers && x31 ?¸ Integers && 
x11 == If[x12 > 0, 1, 0] && x21 == If[x22 > 0, 1, 0] && 
x31 == If[x32 > 0, 1, 0]}, {x11, x12, x21, x22, x31, x32}]

Out[]:= {42920.000, {x11 -> 1, x12 -> 2.078*^-7, x21 -> 1, x22 -> 323.29, x31 -
> 1, x32 -> 316.7}}

The out is wrong, if x12-> 0, should be x11-> 0. I have tested changing the 
restricions, writting: x11 == If[x12 > 0.01, 1, 0] && x21 == If[x22 > 0.01, 1, 
0] && x31 == If[x32 > 0.01, 1, 0]

Any help

Guillermo Sanchez  



---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/



  • Prev by Date: Re: Readability confuses mathematica?
  • Next by Date: Re: Finite Sum
  • Previous by thread: Re: Cartesian[(x, y, z)] is not a valid coordinate system specification
  • Next by thread: Re: Optimization with conditional restrictions