- Timestamp:
- 10/06/20 13:12:20 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocol/src/main/java/geniusweb/protocol/session/amop/AMOP.java
r21 r24 28 28 import geniusweb.protocol.CurrentNegoState; 29 29 import geniusweb.protocol.ProtocolException; 30 import geniusweb.protocol.WillBeCalled;31 30 import geniusweb.protocol.partyconnection.ProtocolToPartyConn; 32 31 import geniusweb.protocol.partyconnection.ProtocolToPartyConnFactory; … … 51 50 * <h1>parameter</h1> AMOP parties can receive a parameter: minVotes containing 52 51 * a Double. If set, the AMOP protocol checks that all {@link Votes} from that 53 * party have {@link Vote#getMinPower()} > minVotes. 54 * <h1>Protocol steps</h1> The protocol tries to start all parties. If not all 55 * parties start, the parties are freed up and another attempt is done to start 56 * all parties some time later. 52 * party have {@link Vote#getMinPower()} > minVotes. 53 * <h1>Protocol steps</h1> 54 * <ol> 55 * <li>The protocol tries to start all parties. If not all parties start, the 56 * parties are freed up and another attempt is done to start all parties some 57 * time later. 57 58 * <li>the variable remainingparties = {all parties} 58 59 * <li>The session deadline clock now starts ticking. 59 60 * <li>All parties are sent their settings. 60 * <li>Loop until {@link Deadline} is reached or |remainingparties| <2:61 * <li>Loop until {@link Deadline} is reached or |remainingparties|<2: 61 62 * <ol> 62 63 * <li>protocol sends {@link YourTurn} to all remainingparties. Each party now 63 64 * must submit an {@link Offer} within {@link #PHASE_TIME} seconds. If a party 64 65 * fails to submit it is send Finished and removed from from remainingparties. 65 * <li>protocol sends a {@link Voting} containing a List <Bid> containing all66 * received {@link Bid}s. Each party must place his {@link Votes} within67 * {@link #PHASE_TIME} seconds. If a party does not submit, it is send a66 * <li>protocol sends a {@link Voting} containing a List of {@link Bid} 67 * containing all received {@link Bid}s. Each party must place his {@link Votes} 68 * within {@link #PHASE_TIME} seconds. If a party does not submit, it is send a 68 69 * {@link Finished} and removed from remainingparties. Previous votes for the 69 70 * same bid do not count. But see {@link Agreements}. 70 * <li>The protocol determines a maximum sized subset of size N >=2 of the votes71 * for bid B for which the vote conditions hold. If there is such a subset, the72 * parties that placed these votes reached an agreement. They are added to the73 * a greement set, sent the {@link Finished} info and terminated. They are74 * removed from the remainingparties.71 * <li>The protocol determines a maximum sized subset of size N≥2 of the 72 * votes for bid B for which the vote conditions hold. If there is such a 73 * subset, the parties that placed these votes reached an agreement. They are 74 * added to the agreement set, sent the {@link Finished} info and terminated. 75 * They are removed from the remainingparties. 75 76 * </ol> 76 77 * <li>Any remaining parties are sent a {@link Finished} object without … … 109 110 /** 110 111 * 111 * @param state normally the initial state coming from SAOPSettings 112 * @param state normally the initial state coming from SAOPSettings 113 * @param logger the {@link Reporter} to use 112 114 */ 113 115 public AMOP(AMOPState state, Reporter logger) { … … 218 220 * overridable factory method, used for testing. 219 221 * 220 * @param r 221 * @param delayMs 222 * @param r the {@link Runnable} that will be called 223 * @param delayMs the time after which r will be called 222 224 * @return new WillBeCalled(r,delayms) 223 225 */
Note:
See TracChangeset
for help on using the changeset viewer.