%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Instance of classes % % Jessica Chen-Burger %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% instance_of(processor_x, processor). instance_of(disk_controller_x, disk_controller). instance_of(io_x, io). instance_of(o1, optionI). instance_of(o2, optionII). instance_of(o3, optionIII). instance_of(o4, optionIV). instance_of(mother_boardx, mother_board). has(mother_boardx, slot1). has(mother_boardx, slot2). has(mother_boardx, slot3). has(mother_boardx, slot4). has(mother_boardx, slot5). has(mother_boardx, slot6). instance_of( slot1, slot). instance_att(slot1, position, 1). instance_att(slot1, length, long). instance_att(slot1, extra_power_data, normal). next_to(slot1, slot2). instance_of( slot2, slot). instance_att(slot2, position, 2). instance_att(slot2, length, long). instance_att(slot2, extra_power_data, extra). next_to(slot2, slot3). instance_of( slot3, slot). instance_att(slot3, position, 3). instance_att(slot3, length, long). instance_att(slot3, extra_power_data, extra). next_to(slot3, slot4). instance_of( slot4, slot). instance_att(slot4, position, 4). instance_att(slot4, length, short). instance_att(slot4, extra_power_data, extra). next_to(slot4, slot5). instance_of( slot5, slot). instance_att(slot5, position, 5). instance_att(slot5, length, short). instance_att(slot5, extra_power_data, normal). next_to(slot5, slot6). instance_of( slot6, slot). instance_att(slot6, position, 6). instance_att(slot6, length, short). instance_att(slot6, extra_power_data, normal). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Dynamic constraint: % constraint that are given by each request and may be % negociatable, e.g. less than 500 pounds, and with or without % sound card. This is in contrast with the STATIC constraint % which remains the same throughout the execution. % % The specificaton for capability is the "minimum specification", % i.e. it is possible that a card that has more than one % capabilities. Note that board may be the same board as board2, % i.e. if there is one board that has both of the desired % capabilities. dynamic_constraint([], [total_cost(Cost), less_than(Cost, 500), allocate(Board, _), allocate(Board2, _), special_req(Board, capability, [sound]), special_req(Board2, capability, [fast_graphics]) ]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% initial state initial_state([total_cost(0)]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % end of file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%