Topic
  • 1 reply
  • Latest Post - ‏2013-05-20T22:17:04Z by PaulRubin
tchesa17
tchesa17
3 Posts

Pinned topic how to programme an objective function and constraints

‏2013-05-18T17:19:39Z |

 

Hello, 

It's my first time working with CPLEX studio IDE and I need your help with an objective function and one constraint.

Could please tell how we write these two in CPLEX 

Minimize (∑(i=1 to m) max{Wi-(1+β) W ,(1+β) W -Wi,0 }) / W 

subject to 

⌈(∑(p=1 to v)∑(j=1 to n) Xikpj)/(Nsk )⌉=Yik      i∈I,k∈Z    \  with  Yik = the  upper integer  part of the result 

Thank you

  • PaulRubin
    PaulRubin
    58 Posts

    Re: how to programme an objective function and constraints

    ‏2013-05-20T22:17:04Z  

    First, when you say "write these two in CPLEX", do you mean in OPL (the modeling language that ships with the IDE), or do you mean write them in a form that you can type into the interactive optimizer, or do you mean write them in C/C++/Java/Python/MATLAB using the Concert interface? (I'm guessing you meant OPL, but the question is ambiguous, as CPLEX is not a language.)

    Second, which symbols are variables and which are parameters?

    Third, which if any variables are restricted to integers (may make a difference in how the constraint is written)?

    Paul