%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /* This is the message content of I-X. The I-X wrapper is: medium ".... post_issue/2 predicate below...." To send back the message to Aberdeen I-X, change the sender-id to "Edinburgh". After instantiated the three examples in the field above, three such above messages will be sent separately, each becomes the message content in the AKT-BUS format. */ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Message that passes from I-X/WFS to other % agents/brokers/I-X/WFS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /* post_issue((Sender/Sender_role, Receiver/Receiver_role), Issue). Issue = issue(Instance, Issue, State, Priority, Time, Issue_content). Sender = Sender ID/name Sender_Role = the role type of sender given a context Receiver = receiver ID/name Receiver_role = the role type of receiver given a context Instance = issue instance ID, Issue = issue type name, State = current status of the issue instance, i.e. high, medium and low. Default is medium. Time = Begin_time/End_time, Issue_content = issue content, in this case, our solution space. example template: issue(issue0, solve_technical_constraint, created, high, 3/End_time, [solution(.....) ] ). */ /************************************************************************* solution(+Customer, +Requirements, +Old_sol, -New_sol, -Difference). Customer = String, Customer ID/Name Requirements = List, customer Requirements Old_sol = List, Old, initial/basic solution for the requirements New_sol = List, the improved new solution Difference = 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 manipulates the old solution according to the difference list, one can derive the new solution. + 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. *************************************************************************/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % solution predicate 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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% post_issue((Sender/Sender_role, Receiver/Receiver_role), issue(Issue_Instance, Issue, Status, Priority, Begin_time/End_time, [solution( Customer, Requirements, [ instance_of(X, processor), % initial/basic solution instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), total_cost(Cost) ], New_solution, % revised 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. post_issue((edinburgh/marketing, aberdeen/technology), issue(issue1, solve_technical_constraint, created, high, 1/End_time, solution(john, [total_cost(M), less_than(M, 1000), ], [ instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), total_cost(Cost) ], New, Difference ) )). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % running example 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% post_issue((edinburgh/marketing, aberdeen/technology), issue(issue2, solve_technical_constraint, created, high, 2/End_time, solution(mary, [total_cost(M), less_than(M, 1500) special_req(B, capability, [fast_graphics]) ], [ instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), total_cost(Cost) ], New, Difference ) )). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % running example 3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% post_issue((edinburgh/marketing, aberdeen/technology), issue(issue3, solve_technical_constraint, created, high, 1/End_time, solution(lisa, [], [ instance_of(X, processor), instance_of(Y, disk_controller), instance_of(Z, io), allocate(X, Slot1), allocate(Y, Slot2), allocate(Z, Slot3), total_cost(Cost) ], New, Difference ) )). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % end of file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%