1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

add javadoc

This commit is contained in:
oblonski 2013-12-28 08:25:30 +01:00
parent 7bab058b0b
commit c4d2e65992
2 changed files with 63 additions and 47 deletions

View file

@ -112,23 +112,23 @@ public class VehicleRoutingProblem {
private FleetSize fleetSize = FleetSize.INFINITE; private FleetSize fleetSize = FleetSize.INFINITE;
/* /**
* @deprecated is not going to be used anymore * @deprecated is not going to be used anymore
*/ */
private FleetComposition fleetComposition = FleetComposition.HOMOGENEOUS; private FleetComposition fleetComposition = FleetComposition.HOMOGENEOUS;
private Collection<VehicleType> vehicleTypes; private Collection<VehicleType> vehicleTypes;
/** /**
* @deprecated is not going to be used anymore * @deprecated is not going to be used anymore
*/ */
private Collection<Constraint> problemConstraints; private Collection<Constraint> problemConstraints;
private Collection<jsprit.core.problem.constraint.Constraint> constraints; private Collection<jsprit.core.problem.constraint.Constraint> constraints;
/** /**
* by default all locations are neighbors * by default all locations are neighbors
* @deprecated is not going to be used anymore * @deprecated is not going to be used anymore
*/ */
private Neighborhood neighborhood = new Neighborhood() { private Neighborhood neighborhood = new Neighborhood() {
@ -346,25 +346,25 @@ public class VehicleRoutingProblem {
return this; return this;
} }
/**
* Returns an unmodifiable collection of already added jobs.
*
* @return collection of jobs
*/
public Collection<Job> getAddedJobs(){
return Collections.unmodifiableCollection(jobs.values());
}
/** /**
* Gets an unmodifiable collection of already added services. * Gets an unmodifiable collection of already added services.
* *
* @return collection of services * @return collection of services
* @deprecated use .getAddedJobs() instead * @deprecated use .getAddedJobs() instead
*/ */
@Deprecated @Deprecated
public Collection<Service> getAddedServices(){ public Collection<Service> getAddedServices(){
return Collections.unmodifiableCollection(services); return Collections.unmodifiableCollection(services);
} }
/**
* Returns an unmodifiable collection of already added jobs.
*
* @return collection of jobs
*/
public Collection<Job> getAddedJobs(){
return Collections.unmodifiableCollection(jobs.values());
}
/** /**
* Sets the fleetComposition. * Sets the fleetComposition.
@ -457,17 +457,24 @@ public class VehicleRoutingProblem {
HETEROGENEOUS, HOMOGENEOUS; HETEROGENEOUS, HOMOGENEOUS;
} }
private static Logger logger = Logger.getLogger(VehicleRoutingProblem.class); /**
* logger logging for this class
*/
private final static Logger logger = Logger.getLogger(VehicleRoutingProblem.class);
private VehicleRoutingTransportCosts transportCosts; /**
* contains transportation costs, i.e. the costs traveling from location A to B
*/
private final VehicleRoutingTransportCosts transportCosts;
private VehicleRoutingActivityCosts activityCosts; /**
* contains activity costs, i.e. the costs imposed by an activity
/** */
* @deprecated not used anymore private final VehicleRoutingActivityCosts activityCosts;
*/
private Neighborhood neighborhood;
/**
* map of jobs, stored by jobId
*/
private final Map<String, Job> jobs; private final Map<String, Job> jobs;
/** /**
@ -478,26 +485,34 @@ public class VehicleRoutingProblem {
/** /**
* Collection that contains all available types. * Collection that contains all available types.
*/ */
private Collection<VehicleType> vehicleTypes; private final Collection<VehicleType> vehicleTypes;
/** /**
* An enum that indicates type of fleetSize. By default, it is INFINTE * An enum that indicates type of fleetSize. By default, it is INFINTE
*/ */
private FleetSize fleetSize = FleetSize.INFINITE; private final FleetSize fleetSize;
/**
* contains all constraints
*/
private final Collection<jsprit.core.problem.constraint.Constraint> constraints;
/**
* @deprecated not used anymore
*/
private Neighborhood neighborhood;
/** /**
* An enum that indicates fleetSizeComposition. By default, it is HOMOGENOUS. * An enum that indicates fleetSizeComposition. By default, it is HOMOGENOUS.
* @deprecated * @deprecated
*/ */
private FleetComposition fleetComposition; private FleetComposition fleetComposition;
/** /**
* deprecated * @deprecated
*/ */
private Collection<Constraint> problemConstraints; private Collection<Constraint> problemConstraints;
private Collection<jsprit.core.problem.constraint.Constraint> constraints;
private VehicleRoutingProblem(Builder builder) { private VehicleRoutingProblem(Builder builder) {
this.jobs = builder.jobs; this.jobs = builder.jobs;
this.fleetComposition = builder.fleetComposition; this.fleetComposition = builder.fleetComposition;
@ -518,17 +533,6 @@ public class VehicleRoutingProblem {
"transportCost="+transportCosts+"][activityCosts="+activityCosts+"]"; "transportCost="+transportCosts+"][activityCosts="+activityCosts+"]";
} }
/**
* Returns fleet-composition.
*
* @return fleetComposition which is either FleetComposition.HETEROGENEOUS or FleetComposition.HOMOGENEOUS
* @deprecated it is not used and thus has no effect
*/
@Deprecated
public FleetComposition getFleetComposition() {
return fleetComposition;
}
/** /**
* Returns type of fleetSize, either INFINITE or FINITE. * Returns type of fleetSize, either INFINITE or FINITE.
* *
@ -596,6 +600,17 @@ public class VehicleRoutingProblem {
return Collections.unmodifiableCollection(constraints); return Collections.unmodifiableCollection(constraints);
} }
/**
* Returns fleet-composition.
*
* @return fleetComposition which is either FleetComposition.HETEROGENEOUS or FleetComposition.HOMOGENEOUS
* @deprecated it is not used and thus has no effect
*/
@Deprecated
public FleetComposition getFleetComposition() {
return fleetComposition;
}
/** /**
* @deprecated see builder.setNeighborhood(...). addConstraint(...) instead. * @deprecated see builder.setNeighborhood(...). addConstraint(...) instead.
* @return the neighborhood * @return the neighborhood

View file

@ -218,6 +218,7 @@ public class VrpXMLWriter {
} }
} }
@SuppressWarnings("deprecation")
private void writeProblemType(XMLConfiguration xmlConfig){ private void writeProblemType(XMLConfiguration xmlConfig){
xmlConfig.setProperty("problemType.fleetSize", vrp.getFleetSize()); xmlConfig.setProperty("problemType.fleetSize", vrp.getFleetSize());
xmlConfig.setProperty("problemType.fleetComposition", vrp.getFleetComposition()); xmlConfig.setProperty("problemType.fleetComposition", vrp.getFleetComposition());