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,7 +112,7 @@ 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;
@ -346,6 +346,15 @@ 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.
* *
@ -357,15 +366,6 @@ public class VehicleRoutingProblem {
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 VehicleRoutingTransportCosts transportCosts; */
private final static Logger logger = Logger.getLogger(VehicleRoutingProblem.class);
private VehicleRoutingActivityCosts activityCosts;
/** /**
* @deprecated not used anymore * contains transportation costs, i.e. the costs traveling from location A to B
*/ */
private Neighborhood neighborhood; private final VehicleRoutingTransportCosts transportCosts;
/**
* contains activity costs, i.e. the costs imposed by an activity
*/
private final VehicleRoutingActivityCosts activityCosts;
/**
* map of jobs, stored by jobId
*/
private final Map<String, Job> jobs; private final Map<String, Job> jobs;
/** /**
@ -478,12 +485,22 @@ 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.
@ -492,12 +509,10 @@ public class VehicleRoutingProblem {
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());