I want to code a problem by CPLEX, in this problem I have variables and decision variables, how define them?
In this picture you can see the variables: which we have:
I use these codes for variables:
//Variables
float Q[periods]; //Inventory of the blood product at the blood center in time period t after receiving the quantity produced in time period t 1, allocating the delivered quantity to hospitals and disposing of the expired quantity
float W[periods]; //Quantity of expired blood product at the blood center in time period t
float I[hospitals][periods]; //Inventory level of the blood product at hospital i in time period t after receiving the delivered quantity and usage and i > 0
float G[hospitals][periods]; //Shortage quantity at hospital i in time period t
//Decision Variable
dvar float+ p[periods]; //Quantity of the blood product produced at the blood center in time period t
dvar boolean y[nodes][vehicles][periods]; //A binary variable, if hospital i is served by vehicle k in time period t, y = 1 ; otherwise, y = 0
dvar float+ dq[hospitals][vehicles][periods]; //Quantity of the blood product delivered to hospital i by vehicle k in time period t
dvar float+ pq[hospitals][vehicles][periods]; //Quantity of the blood product picked up from hospital i by vehicle k in time period t
dvar boolean x[nodes][nodes][vehicles][periods]; //A binary variable, if the delivery vehicle k travels from node i to node j in time period t, x = 1 ; otherwise, x = 0
dvar float+ tq[nodes][nodes][vehicles][periods]; //Quantity of the blood product transported by vehicle k trough arc (i, j) in time period t
dvar float+ xq[nodes][nodes][vehicles][periods]; //An auxiliary variable for linearization
dvar boolean b[periods]; //An auxiliary binary variable for linearization
dvar float+ Z; //An auxiliary variable for linearization
Is it correct or not? what is the difference between decision variables and variables in coding in CPLEX?