FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair Class Reference

A patient-donor pair. More...

Public Member Functions

 PatientDonorPair (int id, boolean husbandDonor, ABO patientABO, ABO donorABO, PRA pra)
 Generates a pair according to the description and calculates its compatibility.
boolean canGiveTo (PatientDonorPair p2)
 Whether this pair's donor can give to the input pair's patient.
String toString ()

Public Attributes

Integer id
 The pair's ID.
ABO patientABO
 The patient's blood type.
ABO donorABO
 The donor's blood type.
PRA pra
 The patient's PRA level.
boolean compatible
 Whether the patient is compatible with the donor.
HashMap< Integer, Boolean > relations = new HashMap<Integer,Boolean>()
 Stores compatibility with other PatientDonor pairs.

Detailed Description

A patient-donor pair.

Constructor & Destructor Documentation

◆ PatientDonorPair()

frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.PatientDonorPair ( int id,
boolean husbandDonor,
ABO patientABO,
ABO donorABO,
PRA pra )

Generates a pair according to the description and calculates its compatibility.

Parameters
idthe pair ID
husbandDonorwhether the donor is the patient's husband
patientABOthe patient's blood type
donorABOthe donor's blood type
prathe patient's PRA level

References donorABO, id, frodo2.benchmarks.kidneys.KidneyExchange.KidneyExchange(), patientABO, and pra.

Referenced by canGiveTo().

Here is the call graph for this function:

Member Function Documentation

◆ canGiveTo()

boolean frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.canGiveTo ( PatientDonorPair p2)

Whether this pair's donor can give to the input pair's patient.

Parameters
p2the receiving PatientDonorPair
Returns
true iff this can donate to p2

References compatible, id, frodo2.benchmarks.kidneys.KidneyExchange.KidneyExchange(), patientABO, PatientDonorPair(), and pra.

Referenced by frodo2.benchmarks.kidneys.KidneyExchange.generateProblem().

Here is the call graph for this function:

◆ toString()

String frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.toString ( )
See also
java.lang.Object#toString()

Member Data Documentation

◆ compatible

boolean frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.compatible

Whether the patient is compatible with the donor.

Referenced by canGiveTo(), and frodo2.benchmarks.kidneys.KidneyExchange.KidneyExchange().

◆ donorABO

ABO frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.donorABO

The donor's blood type.

Referenced by PatientDonorPair().

◆ id

Integer frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.id

The pair's ID.

Referenced by canGiveTo(), and PatientDonorPair().

◆ patientABO

ABO frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.patientABO

The patient's blood type.

Referenced by canGiveTo(), and PatientDonorPair().

◆ pra

PRA frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.pra

The patient's PRA level.

Referenced by canGiveTo(), and PatientDonorPair().

◆ relations

HashMap<Integer,Boolean> frodo2.benchmarks.kidneys.KidneyExchange.PatientDonorPair.relations = new HashMap<Integer,Boolean>()

Stores compatibility with other PatientDonor pairs.


The documentation for this class was generated from the following file: