generated from potassco/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravel-bike.coom
84 lines (67 loc) · 1.47 KB
/
travel-bike.coom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Travel Bike example
// Provided by denkbares GmbH
// see Baumeister et al.: Towards Industrial-scale Product Configuration (2024).
product {
num .#/g 1-10000 totalWeight
num .#/kg 10-10 maxWeight
num .#/l 0-200 totalVolume
num .#/l 200-200 requestedVolume
Wheel frontWheel
Wheel rearWheel
Carrier carrier
Frame frame
Color color
}
structure Carrier {
0..3 Bag bag
}
structure Frame {
0..2 Bag bag
}
structure Bag {
Capacity capacity
Material material
}
enumeration Capacity {
attribute num/l volume
attribute num/gr weight
B10 = ( 10, 100)
B20 = ( 20, 250)
B50 = ( 50, 600)
B100 = (100, 1200)
}
enumeration Material {
Cotton
Leather
Polyester
}
enumeration Wheel {
attribute num/inch size
attribute num/gr weight
W20 = ( 20 650 )
W22 = ( 22 700 )
W24 = ( 24 800 )
W26 = ( 26 900 )
W28 = ( 28 1000 )
}
enumeration Color {
Red
Green
Yellow
Blue
}
behavior {
require count(carrier.bag) + count(frame.bag) <= 4
require totalWeight = frontWheel.weight + rearWheel.weight
+ sum(carrier.bag.capacity.weight)
+ sum(frame.bag.capacity.weight)
require totalWeight <= maxWeight * 1000
require totalVolume = sum(carrier.bag.capacity.volume) + sum(frame.bag.capacity.volume)
require totalVolume >= requestedVolume
condition color = Red
require frontWheel.size = 20
}
behavior Bag {
condition material = Leather
require capacity = B10
}