Commit 08c1209e authored by Christoph Schubert's avatar Christoph Schubert

Cleanup of duplicate files in the miplib2010 submissions.

parent de8b5bce
1285886716
Source:
File:
Name: Daniel_Espinoza
Company: Universidad de Chile
eMail: daespino@gmail.com
Street: Av. Reublica 701
City: Santiago
Country: CHILE (CL)
Message:
# ----------------------------------------
# SCALAR PARAMETERS
# ----------------------------------------
param N>0, integer; # the number of nodes
param B>0, integer; # the big number
set K = 1..49;
set KK = 1..50; # maximum circles add 1
set H = 1..5; # maximum time intervals of a day
set nodes = 1..N; # index of the vertex
# ----------------------------------------
# ARRAY PARAMETERS
# ----------------------------------------
set arcs within nodes cross nodes; # arcs={nodes,nodes}
param travelCost{(i,j) in arcs,h in H:h<>1} >= 0; # traveltime of arcs in h interval
param interval{H} >= 0; # interval upper bound
# ----------------------------------------
# VARIABLE PARAMETERS
# ----------------------------------------
var x{i in nodes, j in nodes, k in KK:(i,j) in arcs} >= 0, binary; # x[i][j][k]
var t{i in nodes, k in KK} >= 0; # t[i][k]
var delta{i in nodes, k in KK, h in H:h<>1}, binary; # deta[i][k][h]
var c{k in K} >= 0;
# ----------------------------------------
# OBJECTIVE FUNCTION
# ----------------------------------------
#minimize T_min:
# sum{k in K}c[k];
minimize T_min:
t[1,50];
# ----------------------------------------
# CONSTRAINTS
# ----------------------------------------
######### time-independent constraints ############
subject to travel{(i,j) in arcs}:
sum{k in KK}x[i,j,k] >= 1;
subject to even_degree{i in nodes}:
sum{k in KK}sum{(i,j) in arcs}x[i,j,k] = sum{p in KK}sum{(l,i) in arcs}x[l,i,p];
subject to each_circle{k in KK}:
sum{(i,j) in arcs}x[i,j,k] <= 1;
subject to start_route:
sum{(1,j) in arcs}x[1,j,1] = 1;
subject to travel_continue{j in nodes,k in K}:
sum{(i,j) in arcs}x[i,j,k] - sum{(j,l) in arcs}x[j,l,k+1] >= 0;
########### relations between delta and x ###########
subject to delta_and_x{i in nodes, k in K}:
sum{h in H:h<>1}delta[i,k,h] = sum{(i,j) in arcs}x[i,j,k];
subject to interval_upperbound{i in nodes, k in K, h in H: h<>1}:
t[i,k] + B * (delta[i,k,h] - 1) <= interval[h];
subject to interval_lowerbound{i in nodes, k in K, h in H: h<>1}:
t[i,k] + B * (1 - delta[i,k,h]) >= interval[h-1];
########### time-dependent constraints #############
subject to time_continue{(i,j) in arcs, k in K, h in H: h<>1}:
t[j,k+1] + B * (2 - x[i,j,k]-delta[i,k,h]) >= t[i,k] + travelCost[i,j,h];
######################################################
subject to min_TravelCost{k in K}:
t[1,50] >= t[1,k];
data;
param N := 10;
param B := 1000;
param: interval:=
1 0
2 30
3 60
4 100
5 1000
;
set arcs:=
1 2
1 5
1 8
2 4
2 6
2 8
3 10
4 6
5 4
6 3
6 9
7 1
8 5
9 3
10 7
;
param travelCost :=
[1, 2 *] 2 8
3 15
4 12
5 7
[1, 5,*] 2 9
3 22
4 15
5 12
[1, 8,*] 2 14
3 3
4 24
5 6
[2, 4,*] 2 5
3 13
4 18
5 23
[2, 6,*] 2 25
3 11
4 7
5 18
[2, 8,*] 2 12
3 27
4 15
5 13
[3,10,*] 2 14
3 3
4 18
5 21
[4, 6,*] 2 4
3 23
4 19
5 27
[5, 4,*] 2 15
3 8
4 12
5 16
[6, 3,*] 2 15
3 28
4 19
5 10
[6, 9,*] 2 23
3 18
4 10
5 15
[7, 1,*] 2 16
3 8
4 21
5 12
[8, 5,*] 2 5
3 13
4 17
5 6
[9, 3,*] 2 10
3 8
4 5
5 17
[10,7,*] 2 11
3 26
4 17
5 23
;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment