schedule-router proptotype
This commit is contained in:
parent
0316c41924
commit
55f8e7fb4a
18 changed files with 2359 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
package btools.memrouter;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
|
||||
import btools.expressions.BExpressionContextWay;
|
||||
import btools.expressions.BExpressionMetaData;
|
||||
|
||||
public class MemrouterTest
|
||||
{
|
||||
@Test
|
||||
public void memrouterTest() throws Exception
|
||||
{
|
||||
URL dummyurl = this.getClass().getResource( "/dummy.txt" );
|
||||
Assert.assertTrue( "dummy.txt not found", dummyurl != null );
|
||||
File workingDir = new File(dummyurl.getFile()).getParentFile();
|
||||
File profileDir = new File( workingDir, "/../../../misc/profiles2" );
|
||||
File dataDir = new File( workingDir, "/../../../brouter-map-creator/target/test-classes/tmp" );
|
||||
File lookupFile = new File( profileDir, "lookups.dat" );
|
||||
File profileFile = new File( profileDir, "trekking.brf" );
|
||||
File waytiles55 = new File( dataDir, "waytiles55" );
|
||||
File unodes55 = new File( dataDir, "unodes55" );
|
||||
File[] fahrplanFiles = new File[1];
|
||||
fahrplanFiles[0] = new File( workingDir, "fahrplan.txt" );
|
||||
|
||||
// read lookup + profile for lookup-version + access-filter
|
||||
BExpressionMetaData meta = new BExpressionMetaData();
|
||||
BExpressionContextWay expctxWay = new BExpressionContextWay(meta);
|
||||
meta.readMetaData( lookupFile );
|
||||
expctxWay.parseFile( profileFile, "global" );
|
||||
|
||||
|
||||
// run GraphLoader
|
||||
new GraphLoader().process( unodes55, waytiles55, fahrplanFiles, expctxWay );
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue