• 1 reply
  • Latest Post - ‏2014-05-23T08:49:35Z by AlexFleischer
4 Posts

Pinned topic Help - forall expression!!!

‏2014-05-23T08:37:52Z | cplex

Hi all,

I am beginner with Cplex and i have some problem with FORALL expression.

I want to write this expresion but i dont know how it s correct:

( time=1....144, Tariv= 120, Tdep = 50)

forall (i in time : i between Tdep- Tariv) 

P [ i ] == 0;


You can help me to write this expression forall with i, in time and between 2 values of time.

I need to do for optimization charging of electrical vehicle,and i do my model for Tariv < Tdep and it s ok, but for Tariv > Tdep, dont work. ( my car must charge in interval Tariv - Tdep, in rest P[i]=0)

I attach my model and data files


  • AlexFleischer
    3151 Posts

    Re: Help - forall expression!!!



    have you tried

    forall (i in time : (Tdep <= i <= Tariv))