mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Add parameter in xsd schema to set fastRegret from configuration
This commit is contained in:
parent
3011634477
commit
9150f086a3
2 changed files with 6 additions and 0 deletions
|
|
@ -103,6 +103,11 @@ class InsertionFactory {
|
||||||
|
|
||||||
if (insertionName.equals("regretInsertion")) {
|
if (insertionName.equals("regretInsertion")) {
|
||||||
iBuilder.setInsertionStrategy(InsertionBuilder.Strategy.REGRET);
|
iBuilder.setInsertionStrategy(InsertionBuilder.Strategy.REGRET);
|
||||||
|
|
||||||
|
String fastRegret = config.getString("fastRegret");
|
||||||
|
if (fastRegret != null) {
|
||||||
|
iBuilder.setFastRegret(Boolean.parseBoolean(fastRegret));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return iBuilder.build();
|
return iBuilder.build();
|
||||||
} else throw new IllegalStateException("cannot create insertionStrategy, since it has no name.");
|
} else throw new IllegalStateException("cannot create insertionStrategy, since it has no name.");
|
||||||
|
|
|
||||||
|
|
@ -248,6 +248,7 @@
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="allowVehicleSwitch" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
|
<xs:element name="allowVehicleSwitch" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xs:element name="fastRegret" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
|
||||||
<xs:element name="experimental" minOccurs="0" maxOccurs="1">
|
<xs:element name="experimental" minOccurs="0" maxOccurs="1">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue