Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Η παρουσίαση φορτώνεται. Παρακαλείστε να περιμένετε

Knowledge-based Systems Configuration (Διαμόρφωση) Some slides are by Lora Aroyo.

Παρόμοιες παρουσιάσεις


Παρουσίαση με θέμα: "Knowledge-based Systems Configuration (Διαμόρφωση) Some slides are by Lora Aroyo."— Μεταγράφημα παρουσίασης:

1 Knowledge-based Systems Configuration (Διαμόρφωση) Some slides are by Lora Aroyo

2 Knowledge-intensive Tasks Knowledge-intensive task Analytic task Synthetic task Classification Diagnosis Assessment Prediction Monitoring Assignment Planning Scheduling Design Modeling Adopted from Speel, et al, 2001 Configuration

3 Configuration Input Given/Input:  a fixed, pre-defined set of components/parts, described by: a set of properties ports for connecting it to other components constraints at each port that describe the components that can be connected at that port, and other structural constraints  description of the desired configuration = requirements (specification of desired functionality)  criteria for making optimal selections (possible combinations)

4 Configuration Output To build/Output:  One or more configurations (combinations of the parts) that satisfy all the requirements (specification)  configuration = set of components (parts) and a description of the connections (combinations) between the components in the set  detect possible inconsistencies in the requirements

5 Definition of Configuration  Given: Specification (of desired functionality) = requirements Possible parts = components Possible combinations  Find: A combination of the parts (= configuration) which satisfies the specification  A search problem

6 Configuration Example  Building a software system from modules:  Components  Components = the modules Ports = the variables (need values or provide values)  Constraints  Constraints = descriptions of the number and types of values needed  Constraints  Constraints = constraints about the compatibility of one module with another configuration  Description of the desired configuration = user's description of what the software system is supposed to do

7 Example – T-shirt configuration  The configuration of a T-shirt requires that we specify: the size (small, medium, or large) the print (``Men in Black'' - MIB or``Save the Whales'' - STW) the color (black, white, or red)  There are the following rules: If the small size is chosen then the STW print cannot be selected If the MIB print is chosen then the black color has to be chosen as well If the STW print is chosen then the black color cannot be selected.

8 Configuration: Examples  Physical products: Computer parts Elevators Kitchens Trucks Etc.  Non-physical products: Insurance packages Investment policies Real estate assignments (user profiling) Medical recipes …

9 Configuration Example AB AB A B A B AB Configuration-1 Part-1 Part-2 Part-1-1 Part-1-2 Part-1-3

10 Παράδειγμα Διαμόρφωσης  Διαμόρφωση ενός εξαρτήματος για ένα υπολογιστικό σύστημα ADCB Εξάρτημα συστήματος A-1A-2B-1B-2C-1C-2D-1D-2 Τα A,B,C,D ή συνδυασμοί τους προσδιορίζονται από τις απαιτήσεις του πελάτη για την υλοποίηση του εξαρτήματος. Το καθένα μπορεί να υλοποιηθεί με δύο τρόπους

11 Παράδειγμα Διαμόρφωσης ΤμήμαΑπαιτούμενα εξαρτήματα A-12 τύπου B A-23 τύπου B B-12 τύπου C B-2- C-1- C-2- D-11 τύπου B, τύπου 2 C D-21 τύπου C-1 Πίνακας κανόνων / περιορισμών

12 Παράδειγμα Διαμόρφωσης  Προδιαγραφές πελάτη: {A,D} A A-1A-2 2B3B 2B-12B-2 1B-1,1B-2 3B-1… 4C 2C 4C-1… 2C-1… D D-1D-2 2CC-1 B-1B-2 2C 2C-1… … B επιλογές απαιτήσεις

13 Configuration aspects  one cannot design new components during the configuration task  each component is restricted in advance to only be able to "connect" to other certain components in fixed ways (i.e., they can't be modified to get arbitrary connectivity)  the solution specifies both the components in the configuration & how they are related

14 Design (generalization of config.) Design = complex task with several logical parts: functionality system type general types of components configuration of types of components actual components values of the attributes of those components

15 Design (generalization of config.) Configuration is a special case of design In design: - set of possible parts - not fixed in advance - possible combinations - not fixed in advance Design is typical synthetic task – with open- ended solution space Configuration is analytic task – with closed solution space (in practice it is very large)

16 Use of Configuration Flexibility in production: fast changing product range wide variety of product range Reduce stocks Build-to-order (‘a la carte’) Flexibility to custom manufacturing economics of mass production

17 Configuration vs. Classification  Configuration is more difficult than classification  Classification  select one class  Configuration  select subset of parts; allow multiple copies of parts; select combination of the chosen parts (architecture)

18 Configuration models  Used as a basis for different types of tasks  Configuring ‘therapies’ part of larger diagnosis & therapy task  Configuring alternative combinations of steps for a plan Part of a planning process

19 Configuration  Configuration as AI problem Heuristic algorithms for finding sub-optimal solutions  Configuration as search problem Two search spaces: Selection space  Search for appropriate / compatible / optimal components Arrangement space  Search for appropriate / compatible /optimal arrangement of the components

20 Configuration picture component hierarchy arrangement model specifications additional specifications matching refinement, expansion abstract & partial solutions expanded & refined solutions

21 Configuration Sub-tasks Selection =  Components are selected to satisfy the requirements (Selection = choosing components) Association =  Components are placed into the configuration (Association = logical relationships between components)  Evaluation =  Evaluation = Compatibility Testing and Goal satisfaction testing. Configuration = Selection + Association + Evaluation

22 Configuration Implementation Configuration implementation depends on: known in advance What and how much is known about each subtask in advance knowledge How much knowledge is used in each subtask mix & ordersubtasks What is the mix & order of the subtasks moved forward Whether knowledge from later subtasks can be moved forward into earlier subtasks to prevent failures

23 Selection example  ensure that only compatible components are selected  if an evaluation is known then the best (optimal) set of components should be selected Selection = Choosing Components + Compatibility Testing

24 Configuration variation  Arrangement  Arrangement = establishing specific relationships (precisely locate one component with respect to another or with respect to some reference location) Association  "logical relationships", used in Association :"next to","connected to“, etc. Configuration = Selection + Association + Arrangement + Evaluation + Arrangement + Evaluation

25 Arrangement task Configuration 1 Precise description of the positions of all three circles = arrangement 1 A B C Moving circles produces another arrangement 2 B A C

26 Components Grain Size  large modules less flexible strong requirements for other modules preconfigured smaller modules less configuration needs to be done  small modules more flexibility require more configuration

27 Experience  how much experience is available To guide the search for combinations of modules that satisfy the requirements  build previously discovered sub-configurations into the system search is further reduced  add heuristic knowledge prefer one module over another in a situation lowering the chance of backtrack & remake this decision allows to do things in previously successful order

28 Configuration as a CSP  design & configuration problems formulated as constraint satisfaction problems  If given: the pattern of connections constraints on this pattern not known components   equivalent to a crossword puzzle  attempt to find a set of values for some variables which are related by constraints  configuration  a sequence of CSPs  a Dynamic CSP

29 Example – T-shirt configuration  The configuration of a T-shirt requires that we specify: the size (small, medium, or large) the print (``Men in Black'' - MIB or``Save the Whales'' - STW) the color (black, white, or red)  There are the following rules: If the small size is chosen then the STW print cannot be selected If the MIB print is chosen then the black color has to be chosen as well If the STW print is chosen then the black color cannot be selected.

30 Example – T-shirt configuration  This configuration problem can be modelled as a CSP with three variables x1,x2,x3 representing size, print, and color respectively  The domains of the variables are D(x1)={small,medium,large} D(x2)={MIB,STW} D(x3)={black,white,red}  The first constraint is a binary constraint between variables x1 and x2 with allowed tuples: {,,,, }  The second constraint is a binary constraint between variables x_2 and x_3 with allowed tuples: {,, }

31 Configuration as a CSP  used for checking compatibilities between choices (i.e. ports of components)  represent restrictions on choices "posted" to (i.e., attached to) the things they restrict, to affect its subsequent use, such as its refinement "propagated" through configuration, to affect other components  used to record decisions not corresponding to objects in the system restrict the set of components without deciding which (i.e. partial choice) implement least commitment strategy (i.e. choices are delayed to accumulate more information; avoid premature decisions)

32 Main configuration techniques  Generate and test  Forward / Backward chaining  Constraint-based search  Specialized search methods Επέκταση και διευθέτηση Σταδιακή εργασία με πρόβλεψη Πρόταση και αναθεώρηση

33 Επέκταση και διευθέτηση  Η μέθοδος αυτή αρχικά συγκεντρώνει τις προδιαγραφές των κύριων εξαρτημάτων  Μετά επεκτείνει τη διαμόρφωση για να συμπεριλάβει όλα τα απαιτούμενα εξαρτήματα  Μετά διευθετεί (τοποθετεί) τα εξαρτήματα  Είναι κατάλληλη για προβλήματα όπου οι αποφάσεις επιλογής εξαρτημάτων δεν εξαρτώνται από τις αποφάσεις διευθέτησης

34 Επέκταση και διευθέτηση  Η επέκταση και διευθέτηση περιλαμβάνει 3 βοηθητικές διεργασίες Υπολογισμός του συνόλου των απαιτήσεων για ένα εξάρτημα όταν δίνονται οι αρχικές προδιαγραφές  get-requirements Επιλογή των καλύτερων εξαρτημάτων από το σύνολο των υποψηφίων  get-best-parts Προσδιορισμός της καλύτερης διευθέτησης των εξαρτημάτων  arrange-parts

35 Επέκταση και διευθέτηση  Αλγόριθμος Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές (get-requirements) Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) Για κάθε κύριο εξάρτημα κάνε τα ακόλουθα  Εισήγαγε το κύριο εξάρτημα στη λίστα εξαρτημάτων  Πρόσθεσε τα απαιτούμενα εξαρτήματα που αντιστοιχούν στο παραπάνω κύριο εξάρτημα (add-required-parts) Διευθέτησε τα εξαρτήματα που βρίσκονται στη λίστα εξαρτημάτων (arrange-parts) Επέστρεψε τη λύση

36 Επέκταση και διευθέτηση  add-required-parts Συγκέντρωσε τις άμεσες απαιτήσεις εξαρτημάτων που αντιστοιχούν στο συγκεκριμένο εξάρτημα (get-requirements) Εάν υπάρχει έστω μια απαίτηση εξαρτήματος  Πάρε τα νέα εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts)  Για κάθε νέο εξάρτημα επανέλαβε τα ακόλουθα: Εισήγαγε το νέο εξάρτημα στη λίστα εξαρτημάτων Πρόσθεσε τα απαιτούμενα εξαρτήματα που αντιστοιχούν στο παραπάνω κύριο εξάρτημα (add- required-parts)

37 Επέκταση και διευθέτηση  Η μέθοδος αυτή στηρίζεται σε προϋποθέσεις Υπάρχει συνάρτηση αξιολόγησης, η οποία επιλέγει τα καλύτερα εξαρτήματα που ικανοποιούν τις απαιτήσεις Η διευθέτηση των επιλεχθέντων εξαρτημάτων είναι πάντα δυνατή  Δεν υπάρχουν περιορισμοί που δε μπορούν να ικανοποιηθούν. Έτσι η επιλογή και η διευθέτηση είναι ανεξάρτητες Τα εξαρτήματα δε διαμοιράζονται

38 Παράδειγμα  Διαμόρφωση εσωτερικού χώρου ενός δωματίου  Εξαρτήματα Τραπέζια, γραφεία, καρέκλες, κρεβάτια, κτλ.  Απαιτήσεις κύριων εξαρτημάτων Γραφείο 1.5x0.80, κρεβάτι 2x0.90, κτλ.  Απαιτούμενα εξαρτήματα για τα κύρια Γραφείο – καρέκλα Βιβλιοθήκη – ράφια Πόρτες – χερούλια  Προδιαγραφές δωματίου 10x5

39 Σταδιακή εργασία με πρόβλεψη  Η επέκταση και διευθέτηση ακολουθεί αυστηρή σειρά στη διαδικασία διαμόρφωσης Προσδιορισμός εξαρτημάτων βάση απαιτήσεων Επιλογή καλύτερων εξαρτημάτων Διευθέτηση επιλεχθέντων εξαρτημάτων  Συχνά οι παραπάνω διεργασίες αλληλεξαρτώνται Π.χ. η διαμόρφωση ενός σύνθετου συστήματος μπορεί να απαιτεί το διαχωρισμό της διεργασίας σε μικρότερα τμήματα

40 Σταδιακή εργασία με πρόβλεψη  Η σταδιακή εργασία με πρόβλεψη χωρίζει τη διαδικασία διαμόρφωσης σε μικρότερα τμήματα εργασιών (subtasks) Η κάθε υποεργασία περιλαμβάνει μια μικρότερη διαδικασία διαμόρφωσης Οι υποεργασίες εκτελούνται σε κάποια σειρά ή ανεξάρτητα ανάλογα με τις αλληλεπιδράσεις  Η τεχνική αυτή χρησιμοποιείται όταν οι αλληλεπιδράσεις μέσα στις υποεργασίες είναι πολύ πιο ισχυρές από ότι μεταξύ διαφορετικών υποεργασιών

41 Σταδιακή εργασία με πρόβλεψη  Αλγόριθμος Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές (get-requirements) Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) Βάση των απαιτήσεων δημιούργησε υποεργασίες Όσο υπάρχουν υποεργασίες που δεν έχουν εκτελεστεί  Έλεγξε τις συνθήκες που πρέπει να πληρούνται για να ξεκινήσει η εκτέλεση κάποιας υποεργασίας και επέλεξε μια υποεργασία  Εκτέλεσε την εργασία καλώντας την αντίστοιχη διαδικασία Επέστρεψε τη λύση

42 Σταδιακή εργασία με πρόβλεψη  Για την εκτέλεση κάθε υποεργασίας πρέπει να υπάρχει μια διαδικασία διαμόρφωσης Υλοποιημένη με οποιαδήποτε τεχνική χρειάζεται  Η σταδιακή εργασία με πρόβλεψη μπορεί να αντιμετωπίσει προβλήματα από αλληλεπιδράσεις λόγω διαμοίρασης εξαρτημάτων Αν δύο οι περισσότερες υποεργασίες εκτελεστούν παράλληλα και χρειάζονται το ίδιο εξάρτημα μπορεί να κατασκευάσουν αντικρουόμενες διαμορφώσεις  Οπότε χρειάζεται κάποια πρόβλεψη κατά την εκτέλεση υποεργασιών

43 Σταδιακή εργασία με πρόβλεψη  Η πρόβλεψη μπορεί να αποτρέψει μελλοντικές συγκρούσεις / αδιέξοδα Κάτι ανάλογο με το forward checking και το maintaining arc consistency σε CSPs  Για να γίνουν σωστές προβλέψεις απαιτείται εκτεταμένη ανάλυση του πεδίου εφαρμογής Η σταδιακή εργασία με πρόβλεψη είναι πολύ domain-dependent

44 Παράδειγμα  Η διαμόρφωση μιας πολυκατοικίας μπορεί να χωριστεί σε ένα σύνολο υποεργασιών Διαμόρφωση κάθε διαμερίσματος, διαμόρφωση κοινών χώρων, διαμόρφωση parking, κτλ.  Υπάρχουν αλληλεπιδράσεις μεταξύ των υποεργασιών? Αποφάσεις διευθέτησης υδραυλικών εγκαταστάσεων, σωλήνες καλοριφέρ, κ.α.

45 Πρόταση και αναθεώρηση  Οι προηγούμενες μέθοδοι δεν προσφέρουν δυνατότητες εναλλακτικών επιλογών ή οπισθοδρόμησης σε περίπτωση ασυμβατότητας Η πρόταση και αναθεώρηση είναι βασισμένη στην ικανοποίηση περιορισμών και προσφέρει αυτές τις δυνατότητες Κατά τη διάρκεια της διαμόρφωσης ελέγχονται περιορισμοί Αν υπάρχει παραβίαση τότε εναλλακτικές επιλογές μπορούν να δοκιμαστούν ή να αναιρεθεί η προηγούμενη επιλογή

46 Πρόταση και αναθεώρηση  Αλγόριθμος Αρχικοποίησε τη λίστα εξαρτημάτων σε κενή Συγκέντρωσε τις απαιτήσεις εξαρτημάτων που αντιστοιχούν στις αρχικές προδιαγραφές (get-requirements) Πάρε τα κύρια εξαρτήματα που αντιστοιχούν στις απαιτήσεις εξαρτημάτων (get-best-parts) Όσο δεν υπάρχει αποτυχία στις επιλογές και υπάρχουν επιλογές που πρέπει να γίνουν  Επέλεξε το επόμενο εξάρτημα στην ως τώρα μερική διαμόρφωση για το οποίο υπάρχει αναπάντητη επιλογή  Εάν υπάρχουν περιορισμοί σε σχέση με άλλα εξαρτήματα, ενεργοποίησε τους  Διευθέτησε το εξάρτημα  Εάν υπάρχουν περιορισμοί που παραβιάζονται επέλεξε εναλλακτική διευθέτηση  Αν δεν υπάρχουν εναλλακτικές λύσεις οπισθοδρόμησε στην προηγούμενη επιλογή Επέστρεψε τη λύση

47 Configuration Example - XCON  Πεδίο Γνώσης: διαμόρφωση υπολογιστικών συστημάτων VAX της DEC computers, ανάλογα με τις προδιαγραφές των πελατών  Κατασκευάστηκε: από την ομάδα του John McDermott, 1978 - 1981  Input: Τα ζητούμενα χαρακτηριστικά του υπολογιστικού συστήματος  Output: Διαμόρφωση του υπολογιστικού συστήματος

48 Configuration Example - XCON  XCON σύστημα για τη διαμόρφωση υπολογιστικών συστημάτων της DEC  Λειτουργία: Συλλογή προδιαγραφών από τον χρήστη Έλεγχος πληρότητας / προσθήκη εξαρτημάτων / απαιτήσεις και συμβατότητα λογισμικού Προσδιορισμός cpu, RAM, δίσκων, κτλ. Χωρική διευθέτηση εξαρτημάτων, απαιτήσεις σε ρεύμα καλώδια κτλ.  Το XCON διαθέτει ΒΔ με 31000 εξαρτήματα 40 τύποι εξαρτημάτων με 40 χαρακτηριστικά για καθένα περίπου

49 Configuration Example - XCON  Αναπαράσταση Γνώσης: Production rules.  Inference engine: Σταδιακή εργασία με πρόβλεψη και forward chaining για τη διαμόρφωση των υποεργασιών  Χειρισμός ασάφειας/αβεβαιότητας: Όχι: το σύστημα απλά κατασκευάζει μια λύση, που υποτίθεται ότι είναι ικανοποιητική

50 Configuration Example - XCON ΧαρακτηριστικάΤιμές ΚωδικόςRK11-EA CLASSBUNDLE TYPEDISK DRIVE SUPPORTEDYES COMPONENT LIST1 070-12292-25 1 RK07-EA 1 RK611

51 Configuration Example - XCON  Παράδειγμα κανόνα IF the most current active context is assigning a power supply AND a unibus adapter has been put in a cabinet AND the position it occupies in the cabinet is known AND there is space available for a power supply AND there is an available power supply AND there is no H7101 regulator available THEN add an H7101 regulator to the order

52 Configuration Example - XCON  Η λειτουργία του XCON περιλαμβάνει 6 κύρια στάδια και εκατοντάδες υπο-στάδια ή εργασίες που ανήκουν σε μια ιεραρχία Το 1ο στάδιο προσθέτει απαραίτητα εξαρτήματα που λείπουν σύμφωνα με τις προδιαγραφές Τα στάδια 2 και 3 τοποθετούν τα εξαρτήματα Το στάδιο 3 τοποθετεί τα όργανα ελέγχου Το στάδιο 5 παράγει σχεδιάγραμμα του συστήματος Το στάδιο 6 παράγει τις καλωδιώσεις υπολογίζοντας τις αποστάσεις μεταξύ συσκευών

53 Configuration Example - XCON  Το XCON χρησιμοποιεί τη μέθοδο σταδιακής εργασίας με πρόβλεψη Καθένα από τα 6 στάδια αναλύεται σε εργασίες όπου υπάρχει ισχυρή αλληλεπίδραση μεταξύ των ενεργειών Κατά την εκτέλεση κάθε εργασίας γίνεται πρόβλεψη για αποφυγή πιθανές ασυμβατότητες  Έτσι αποφεύγεται η ανάγκη για οπισθοδρόμηση

54 R1/XCON  Significance: A rather simple forward-chaining rule-based expert system, which nevertheless performed well, solved a difficult manufacturing problem, and proved to be enormously profitable.

55 R1/XCON  Digital Equipment Corporation's problem was that they were marketing the best- selling Vax-11 series of computers, and the department responsible for configuration was failing to keep up with customer demand.

56 R1/XCON  Each computer was the result of a consultation between a sales executive and the customer, designed to discover the customer's requirements, after which a configuration was drawn up, from which the system was built.

57 R1/XCON  Each configuration was taking 25 minutes, and orders were arriving at a rate of 10,000 a year.  There was a high level of errors in the configurations produced.

58 R1/XCON  DEC attempted to write a conventional program to do this task, with no success, then invited McDermott to write an AI system to do it. McDermott wrote R1/XCON.  By 1986, it had processed 80,000 orders, and achieved 95-98% accuracy. It was reckoned to be saving DEC $25M a year.

59 R1/XCON  However, R1/XCON suffered from the shortcomings of simple production-rule- based systems. When the nature of the task changed, fresh rules were simply added at the end of the rulebase. Soon, the rulebase was very large, unreliable and incomprehensible. Expensive rewriting was needed to restore the operation of the system.


Κατέβασμα ppt "Knowledge-based Systems Configuration (Διαμόρφωση) Some slides are by Lora Aroyo."

Παρόμοιες παρουσιάσεις


Διαφημίσεις Google