Presentation is loading. Please wait.

Presentation is loading. Please wait.

Use Case: Composition OWL-S applied to the Berardi-Hull problem.

Similar presentations


Presentation on theme: "Use Case: Composition OWL-S applied to the Berardi-Hull problem."— Presentation transcript:

1 Use Case: Composition OWL-S applied to the Berardi-Hull problem

2 Component Web Services op1: book the plane ticket op2: register for event op3: book a hotel room Problem: Compose in ways corresponding to needs of tourist, researcher, manager Variations: One-shot vs. reusable composition

3 Representing service define atomic process take_it_and_leave Inputs: … Outputs: {okay - Boolean, carrier_there, carrier_back - Airline, fnum_there - Flight_num, occ_going - Flight_occ, fnum_back - Flight_num, occ_returning - Flight_occ} Results: -- continued below --

4 Results: Bundling Conditions, Outputs, & Effects results: when (fl_there fl_back - Flight) (tightly_scheduled(fl_there, fl_back)) & available(fl_there, 1) & available(fl_back, 1)) -> (exists (fl_there fl_back - Flight) tightly_scheduled(fl_there, fl_back) & air_reserved(cust, fl_there) & air_reserved(cust, fl_back)) output: {okay = true, carrier_there = fl_there.carrier, carrier_back = fl_back.carrier, fnum_there = fl_there.num, fnum_back = fl_back.num, occ_going = fl_there.occ_desig, occ_back = fl_back.occ_desig} Condition Effect Output

5 Failure Case when () (not (exists (fl_there fl_back - Flight) tightly_scheduled(fl_there, fl_back)))) output: {okay = false}

6 Auxiliary Definition tightly_scheduled(fl_there, fl_back) iff (flight_departs_from(fl_there, departure_place) & flight_lands_at(fl_there, arrive_place) & flight_departs_from(fl_there, arrive_place) & flight_lands_at(fl_there, departure_place) & flight_depart_time(fl_there) = max_over((λ (fl1) flight_departs_from(fl1, departure_place) & flight_lands_at(fl1, arrive_place) & flight_depart_time(fl1) =< date_leave), flight_depart_time) & flight_depart_time(fl_back) = min_over((λ (fl1) flight_departs_from(fl1, departure_place) & flight_lands_at(fl1, arrive_place) & flight_arrive_time(fl1) >= date_back), flight_depart_time))

7 Hotel define atomic process book_hotel Inputs: {name_hotel – String, place_hotel – Location, date_leave, date_back – Date} Outputs: {okay - Boolean} Results: when (h - Hotel) name(h) = name_hotel & located(h, place_hotel) & (forall (d – Date) on_or_before(date_leave, d) & before(d, date_back) -> hotel_available(h, d)) -> hotel_reserved(cust, h, convex_hull(date_leave, day_before(date_back))) outputs: {okay = true} + failure case {okay = false}

8 Goals: Tourist reserved(emh, Pamplona_Run_04) & exists (date - Time_interval) beg(date) = day(start(Pamplona_Run_04)) - 1 day & end(date) = day(start(Pamplona_Run_04)) + 1 day & exists(h - Hotel) dist(h, Pamplona) =< 5 km & cost_per_night(h) =< 100 Euro & reserved(emh, Pamplona_Run_04) & hotel_reserved(emh, h, date) & exists(af - Air_flight)...

9 Goals: Manager let e = pi_meeting(miracle_intelligence, qtr(2004,1)) registered(rr, e) & let ps = set_of_all ((\\ (p) presentation(p) & at_conf(p, e) & given_by(rr))) ch = set_of_all ((\\ (m) small_group_discussion(m) & participant(m, rr) & participant(m, Program-mgr (miracle_intelligence)))) --CONTINUED--

10 Goals: Manager (cont.) exists (intvl - Time_interval) beg(intvl) = min(min_over (ps, (λ(p) beg(scheduled_time(p)))), min_over (ch, (λ (m) beg(scheduled_time(m)))) & end(intvl) = max(max_over (ps, (\\ (p) beg(scheduled_time(p)))), max_over (ch, (\\ (m) beg(scheduled_time(m))))

11 Goals: Manager (cont.) & exists (af_there af_back - Air_flight) &... & af_there = time (arg_max (λ (f) before(arrival_time(f), beg(intvl))) (λ (f) beg(intvl) - arrival_time(f))) & af_back =... & exists (h - Hotel) for_all (beg_date end_date - Day) beg_date = … & end_date = … -> hotel_reserved (rr, h, convex_hull(beg_date, end_date)))

12 Okay, this looks hopelessly hairy … but most of it is pure computation (maxes, mins, etc.)

13 Planning Paradigm Take goal of user agent and match it against effects of services. Preconditions become new goals; the planner must find services and inputs that achieve all the outstanding goals. Composition is automatic

14 Tourist Case Goal is is Hotel ?h & dist(?h, Pamplona) =< 5 km & cost_per_night(?h) =< 100 Euro & reserved(emh, Pamplona_Run_04) & hotel_reserved(emh, ?h, date) & is Air_flight ?af & beg(?date) = day(start(Pamplona_Run_04)) - 1 day & end(?date) = day(start(Pamplona_Run_04)) + 1 day &... Matches effect of book_hotel Added to Conditions of book_hotel

15 Where Did the Composition Happen? Multiple actions get instantiated, involving multiple web services. The order may be unimportant, or the Berardi-Hull argument may play a role (not clear).

16 Why Book Flights Ahead of Time? Because you can? Better question: Why sometimes delay booking (e.g, use PriceLine?) First, we have to make explicit the time-dependence of prices. Second, we have to allow for optimization of objective functions.

17 Planning wrt Existing Composite Process Suppose an omnibus travel-agent process advertises its process model: define composite process S4tP() participants: {customer} // Plus the service itself, of course inputs: {…} outputs: {…} { accept(open_session); send to customer (confirm_session); run_all {parallel { ---ticket process--- || { iterate { ---event-booking process } || ---hotel process--- }} stop_after accept from customer (close_session)}}

18 Approach: Decompose composite into individual control flows. Introduce state where needed. Example: open_session puts us in session open state. Each thread through the process becomes a series of actions to plan with.


Download ppt "Use Case: Composition OWL-S applied to the Berardi-Hull problem."

Similar presentations


Ads by Google