%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File: dynamic.db %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /************************************************************************* This is the message content for I-X XML wrapper. To see the recent I-X wrapper, consult I-X system. An old I-X wrapper is given below. ... priority ... "... the post_issue/2 predicate below...." To send back the message to Aberdeen I-X, change the sender-id to "Edinburgh". After instantiated examples in the field above, three such above messages will be sent separately, each becomes the message content in the AKT-BUS format. Priority is either medium, low or high. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Message that passes from I-X/WFS to other % agents/brokers/I-X/WFS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This is the action that posts an issue: post_issue(issue_packet((Sender/Sender_role, Receiver/Receiver_role), Issue_occ )). The content that has been sent is: issue_packet(Header, Issue_content). ------------------------------- issue/7 - class type, issue_occ/7 - issue instance issue(Instance, Issue, Status, Priority, Time, (Requester/Requester_type, Provider/Provider_type), Issue_content). Sender = Sender ID/name Sender_Role = the role type of sender given a context Requester = requester_ID or name Requester_role = the role type of the Requester given a context Instance = issue instance ID, Issue = issue type name, Priority = priority of the issue instance, i.e. high, medium and low. Default is medium. Status = Current_status/List_of_processes Time = Begin_time/End_time, Issue_content = the solution predicate ------------------------------ solution(+Customer, +Requirements, +Old_sol, -New_sol, -Difference). Customer = String, Customer Name or ID Requirements = List, customer Requirements Old_sol = List, Old, initial/basic solution for the requirements New_sol = List, the improved new solution Difference = Add_List/Delete_List, the differences between the new and old solutions, in the form of Add_list/Del_list. Add_list is a list of predicates that have been added to the old solution, Del_list is a list of predicates that have been deleted from the old_solution. If one updates the old solution according to the difference list, one can derive the new solution, or vice versa. + sign: indicates input value - sign: indicates required returned value In this case, values of all of the + signed variables are not to be changed during the communication. ----------------------------------------------- issue_packet( Header, Issue) Header = (Sender/Sender_type, Receiver/Receiver_type) *************************************************************************/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % example issue template % % init_solution indicates a minimum set of solution spec. % for any requirement, i.e. an io, a disk_controller % and processor board must be allocated. % % NOTE: that this is a class definition, not an occurrence !! % An initial/basic solution is given %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% issue(_Issue_Instance, _Issue, _Status, _Priority, _Begin_time/_End_time, (Customer/_Requester_type, _Provider/_Provider_type), [solution( Customer, _Requirement_list, [ exist(X), exist(Y), exist(Z), exist(Slot1), exist(Slot2), exist(Slot3), instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), instance_of(Slot1, slot), instance_of(Slot2, slot), instance_of(Slot3, slot), total_cost(_Cost) ], _New_solution, _Add_list/_Deleted_list )] ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % running example 1: for message content passing % to the KRAFT system. % % For the aberdeen side, Aberdeen does not need to alter total_cost % predicate. Initially, three running examples have been created % below. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % note that the capability description may be a subset % of a particular type of board. issue_packet((edinburgh/marketing, aberdeen/technology), issue_occ(e1, solve_technical_constraint, _Status, medium, 1/_End_time, (john/_Requester_type, _Provider/_Provider_type), solution(john, [total_cost(M), less_than(M, 1000) ], [ exist(X), exist(Y), exist(Z), exist(Slot1), exist(Slot2), exist(Slot3), instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), instance_of(Slot1, slot), instance_of(Slot2, slot), instance_of(Slot3, slot), total_cost(M) ], _New_solution, _Difference ) )). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % running example 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% issue_packet((edinburgh/marketing, aberdeen/technology), issue_occ(e2, solve_technical_constraint, _Status, medium, 2/_End_time, (mary/_Requester_type, _Provider/_Provider_type), solution(mary, [total_cost(M), less_than(M, 1500), special_req(_Board, capability, fast_graphics) ], [ exist(X), exist(Y), exist(Z), exist(Slot1), exist(Slot2), exist(Slot3), instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), instance_of(W, Board_type), property(Board_type, capability, List), in(fast_graphics, List), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), allocate(W, Slot4), instance_of(Slot1, slot), instance_of(Slot2, slot), instance_of(Slot3, slot), instance_of(Slot4, slot), total_cost(M) ], _New_Solution, _Difference ) ) ). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % running example 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% issue_packet((edinburgh/marketing, aberdeen/technology), issue_occ(e3, solve_technical_constraint, _Status, high, 1/_End_time, (lisa/_Requester_type, _Provider/_Provider_type), solution(lisa, [], [ exist(X), exist(Y), exist(Z), exist(Slot1), exist(Slot2), exist(Slot3), instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), instance_of(Slot1, slot), instance_of(Slot2, slot), instance_of(Slot3, slot), total_cost(_Cost) ], _New_Solution, _Difference ) )). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % end of file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%