DATA
:
:{ ' ' ' ' ' '}
T bus walk taxi
t ' - set of types of transportation , ,
-
T : set of types of attractions
a
-
T types of restaurants
r : set of
-
places
all
AP set of
:
Ta
A set of attractions t c-
:
t
t
0J type
A # attractions :{ ts
: :[' ' 'ai ]
ai
, . ...
to
:[ ' i. ' ai ] )
a.
. . .
R set of restaurants
:
te
Tr
↳
:{
ti
:-[riiriir;]
of t
R restaurants type
t :
-
}
ta
:[r.iri.ir;]
hotels
H : set of
place c- AVA
2- time needed to spend in p , p
p :
-
score of place of 4¥ / 7- ' hotel score * to )
S : ,
p
- A -112+1-1
p c-
spend
N number need to in p
: of money ,
p
-
A -1kt H
c-
p
A
hours
p.pt
O opening of
p :
-
{ }
e.g. Ps : 12
22:30 pm
C- closing hours T.pt A
p of
: t
}
{
Pi
22.5
:
e.g.
Price
the from
pqt : price of moving
-
by transportation
p to of
type t
,
Te
of c- At 12+1-1 te
g.
,
Score gift : the score of moving from
-
by transportation
p to of
type t
,
Tt
of c- At ☒ + It t c-
g.
,
Hour
- qq.to : the hour time needed )
from p to of
of moving
by transportation type t
,
Tt
of c- At ☒ + It t c-
g.
,
TY YAI IJH-77K¥ EFF Dictionary % # code :
need hour
* I Dictionary : ¥-1T place EIÑ¥k¥¥HaJ HE price , score ,
:
I ' '
bus
ftp.q
) : e.g.
information
t
{ Transportation :
nt
{ ' ' ☐ ' score ' : ☐ ' hour' : ☐ )
price : , ,
price pqt
*
-
distance c 400
.
pqt
score
-
'¥
E
price
hour pqe
-
Variables
:
place
X-p = 1 if place q is next of p
q
p.GE/ttHtRM-pq-i-
by transportation t
I if moves from p to q ,
p.GE/ttHtR.tc-T-t
h 1 if hotel i is chosen i c- H
=
i ,
-
RI r = 1 if Restaurant r is chosen as lunch
-
rd = 1 IT chosen dinner
r Restaurant r is as
-
of %
time
ta q 70 arriving
- ,
}
real number
9. c- A -112+4
tl leaving time of p
30
p ,
-
p c- A -112 + H
Constraints
:
¥¥¥¥¥E¥
FAT A ¥ A - ik :
.
② I X-p.ge 1 Hq c- A v12 UH
.
pc- AUKUH
② I ✗ PEE 1 H p c- A UK UH
-
.
g.c-AVA H
by only 1
p to q transportation t i
ftp.G-A-H-p
✗
③ M pqe = -79
¥ ,
-
,
,
Hotel
:
Only 1 Hotel can be chosen :
④ 1
h
EH i =
-
⑦ I ✗ pq = h q Hq c- H
- - ,
qtAtP-
H
⑥ h Hp c-
q¥µp ✗ PG = p
.
- -
Restaurants :
Only 1 Restaurant is chosen as lunch
:
⑦ Irl r =L
-
RER
⑧ A
I ✗ pr = rl r r c-
- - ,
PEA
Only 1 Restaurant is chosen as dinner
:
⑨ I rd.ir =L
REE
④ R
I ✗ pr = rd r r c-
- - ,
PEA
Restaurants should be different :
K
① Rd t kl e 1 re
r r
- - ,
Time constraints
leave Hotel after 8 am and back before 22 pm :
④ + l S = 8. h s i s c- H
- -
- E h H
ta S 22 - s se
- - ,
Arrive lunch before 12 pm and 18 pm :
at
④ ta r E 12 • RI r r t k
- ,
-
④ ta r E 18 • Rd r r t k
- ,
-
& Time
Arrive Time leaving
Relationship between :
(cid:15482)
¥4k Atia]
¥¥¥¥ H p of :
-
Hour
④ ta q z th p + Em pqt • - pqt
- - -
Tt
TE
C l X pq )
M -
- - -
,
p.GE/ttRtH
/
¥ Restaurant P ¥v¥kHJi☒
Attraction
:
④
th p 2 ta p + Z p
- - -
I ✗ )
- M ( I - - pq
,
E. c-ATH-112
At R
p c-
hours
has their opening
Attractions own
,
hours and
after opening
arrive
hours
before closing :
leave
)
( I ✗
④ pq
O
ta g 7 G • -
-
-
pEAtRtH ,
4- A
)
⑨ ( I ✗
th e C- pq
p g. -
-
,
qEAtRtH
A
pt
type constraints
:
Attraction :12
AT a- 2 :
¥-1T type
④
-2 I ✗ RG e 2
-
,
941-+12-11-1 9- C- At
AT Restaurant e Lik :
¥-1T type
④ 2
-2 I ✗ RG e
-
,
941-+12-11-1 9. C- Rt
( At ' ' )
ti museum
,
w/ 5k¥ ik Museum
- : t
.
④
AI -in
✗
u 99se
7
u1 m oi
f
pc- c-A.tk
- ,
-11-1
Cost less than a number In : Leg 1000 )
.
④
I
I N
✗ pq •
g.
-
⇐
PEA-112+1-1 GHHRTH
of
place)
( price
I
-2 m Price
+ I - pqt • pqt
-
PEA-112+1-1
GTA-1*1-1 tilt
it
)
( price of transportation
N
<
Objective
:
( score of place)
Maximize
t
-2
I
qq.sq.pt/ttRtH✗GtAtRtH
-
I
-2 m Score
+ I - pqt • pqt
-
tilt
PEA-112+1-1 GHHRTH
F
)
transportation
( of
score