File: hint.xml

package info (click to toggle)
tablix2 0.3.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,816 kB
  • ctags: 2,970
  • sloc: ansic: 21,647; xml: 12,230; sh: 9,879; makefile: 762; perl: 564; yacc: 288
file content (103 lines) | stat: -rw-r--r-- 3,584 bytes parent folder | download | duplicates (5)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="iso-8859-2"?>
<!DOCTYPE ttm PUBLIC "-//Tablix//DTD TTM 0.2.0//EN" "http://www.tablix.org/releases/dtd/tablix2r0.dtd">

<!-- ======================================================================

     Example XML data file for Tablix 0.2.0                               
     Copyright (C) 2002-2005 Tomaz Solc                        

     File hint.xml

     $Id: hint.xml,v 1.2 2005/10/29 18:26:19 avian Exp $

     ======================================================================

     This file demonstrates the use of population hinting.

     "Event 2" and "Event 3" must be scheduled at the same time because
     of the "same-time-as" restriction.

     You can help Tablix find the solution by proposing a solution in the 
     configuration file. This can be done by adding <resource> tags for 
     variable resources to the <event> tags. Good hints are usually respected
     by Tablix (you can set the "strength" of hints by setting the "pophint"
     parameter), bad hints are ignored.

     The following example has a hint for the "time" resource type for events
     "Event 2" and "Event 3". 

     You can see that if you uncomment the good hint, Tablix will respect it
     and schedule both "Event 2" and "Event 3" on first period of the first
     day.

     If you uncomment the bad hint, Tablix won't respect it and both events
     will be placed in a random timeslot (but still both will be using the
     same timeslot, as specified with the same-time-as restriction).

     ====================================================================== -->

<ttm version="0.2.0">
        <info>
                <title>Example high school</title>
                <author>Tablix</author>
        </info>

        <modules>
                <module name="sametime.so" weight="60" mandatory="yes"/> 
                <module name="timeplace.so" weight="60" mandatory="yes"/> 
                <module name="sametimeas.so" weight="60" mandatory="yes"/> 
		<module name="holes.so" weight="60" mandatory="yes">
			<option name="resourcetype">class</option>
			<option name="resourcetype">teacher</option>
		</module>
        </modules>

	<resources>
		<constant>
			<resourcetype type="teacher">
				<resource name="Teacher 1"/>
				<resource name="Teacher 2"/>
				<resource name="Teacher 3"/>
			</resourcetype>
			<resourcetype type="class">
				<resource name="Class 1">
					<restriction type="conflicts-with">Class 1a</restriction>
					<restriction type="conflicts-with">Class 1b</restriction>
				</resource>
				<resource name="Class 1a"/>
				<resource name="Class 1b"/>
			</resourcetype>
		</constant>
		<variable>
			<resourcetype type="time">
				<matrix width="5" height="7"/>
			</resourcetype>
			<resourcetype type="room">
				<linear name="Room #" from="1" to="10"/>
			</resourcetype>
		</variable>
	</resources>

	<events>
                <event name="Lecture 1" repeats="12">
			<resource type="teacher" name="Teacher 1"/>
			<resource type="class" name="Class 1"/>
		</event>
		<event name="Lecture 2" repeats="1">
			<resource type="teacher" name="Teacher 2"/>
			<resource type="class" name="Class 1a"/>
			<restriction type="same-time-as">Lecture 3</restriction>
			<!-- good hint -->
			<resource type="time" name="0 0"/> 
			<!-- bad hint 
			<resource type="time" name="1 0"/>
			-->
		</event>
		<event name="Lecture 3" repeats="1">
			<resource type="teacher" name="Teacher 3"/>
			<resource type="class" name="Class 1b"/>
			<!-- hint -->
			<resource type="time" name="0 0"/>
		</event>
	</events>
</ttm>