Hello,

I'm new to FICO XPRESS and I'm currently working on a vehicle routing problem with the possibility of refueling during the route. My problem concerns following constraint:

sum(for all j) x(ij) <= 1 for all i element of F'

According to this constraint, you can only visit a refueling station once, but it is possible to do that twice or third... route it would be optimal to visit the same refueling station as in the first route. So to distinguish the individual nodes to a refueling station it is necessary to introduce a unique node for each potential visit, let's say 10 potential visits.

F = the set of refueling stations --> in my example I have 2 refueling stations

F' = the set of dummy vertices generated to allow different visits to each node in the set of F refueling stations --> so 2 refueling stations * 10 potential visits = 20

My question is how can create this dummy set in XPRESS IVE? I have created the set of F refueling stations and given each an x and y coordinate.

Thank you in advance.

Assuming that you have dynamic structures for storing your data and decision variables that you simply want to extend with the dummy nodes, you could perhaps write some code like the following:

declarations

Nodes,AllNodes: range

RFNodes: set of integer

DummyNodes: array(RFNodes) of set of integer

MAXDUMMY: integer

X,Y: array(Nodes) of real

COST: dynamic array(AllNodes,AllNodes) of real

x: dynamic array(AllNodes,AllNodes) of mpvar

end-declarations

!... Initialize data ...

! Create the initial network representation

forall(i,j in Nodes | exists(COST(i,j)) ) create(x(i,j))

! Add dummy nodes (duplicates of nodes in the subset 'RFNodes')

lastn:=max(i in Nodes) i

forall(n in RFNodes, m in 1..MAXDUMMY, lastn as counter) do

DummyNodes(n)+={lastn}

forall(i in Nodes | i<>n and i not in DummyNodes(n)) do ! Possibly add some more conditions

! Create decision variables for dummy nodes

create(x(i,lastn))

create(x(lastn,i))

! Duplicate any data we might need for the dummy nodes

COST(i,lastn):=COST(i,n)

COST(lastn,i):=COST(n,i)

end-do

end-do

writeln(DummyNodes) ! Display the new nodes