-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed vehicle editing and added funtionality for importing/exporting …
…vehicles, vehicles are now persistent in disk
- Loading branch information
1 parent
ec3b711
commit dac8d1e
Showing
15 changed files
with
407 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package model.followingmodels; | ||
|
||
import java.util.Iterator; | ||
import javax.xml.stream.events.Attribute; | ||
|
||
/** | ||
* | ||
* @author Denis Florin Cobeti | ||
*/ | ||
public interface FollowingModel { | ||
|
||
public String toSimulation(); | ||
public void importAttributes(Iterator<Attribute> attributes); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package model.followingmodels; | ||
|
||
/** | ||
* | ||
* @author darkm | ||
*/ | ||
public class FollowingModelFactory { | ||
|
||
public static FollowingModel getFollowingModel(String type){ | ||
FollowingModel model; | ||
|
||
switch(type){ | ||
case IDM.NAME: | ||
model = new IDM(); | ||
break; | ||
case Kerner.NAME: | ||
model = new Kerner(); | ||
break; | ||
case Krauss.NAME: | ||
model = new Krauss(); | ||
break; | ||
case PW2009.NAME: | ||
model = new PW2009(); | ||
break; | ||
default: | ||
model = new Kerner(); | ||
break; | ||
} | ||
return model; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.