Revize 0e7b6b11
Přidáno uživatelem Roman Kalivoda před téměř 4 roky(ů)
Server/ServerApp/Predictor/PredictorConfiguration.cs | ||
---|---|---|
9 | 9 |
|
10 | 10 |
namespace ServerApp.Predictor |
11 | 11 |
{ |
12 |
class PredictorConfiguration |
|
12 |
public class PredictorConfiguration
|
|
13 | 13 |
{ |
14 |
public static readonly string DEFAULT_CONFIG_PATH = Path.GetFullPath(Path.GetDirectoryName(Environment.CurrentDirectory) + @"\Predictor.config"); |
|
14 |
public static readonly string DEFAULT_CONFIG_PATH = Path.Combine(Path.GetDirectoryName(Environment.CurrentDirectory), "Predictor.config"); |
|
15 |
|
|
16 |
public static readonly string DEFAULT_MODEL_DATA_PATH = Path.Combine(Path.GetDirectoryName(Environment.CurrentDirectory), "model_data"); |
|
15 | 17 |
|
16 | 18 |
public int TimeResolution { get; set; } |
17 | 19 |
|
... | ... | |
19 | 21 |
|
20 | 22 |
public int PredictorCount { get; set; } |
21 | 23 |
|
24 |
public string ModelDataPath { get; set; } |
|
25 |
|
|
22 | 26 |
public static PredictorConfiguration LoadConfig(string filename) |
23 | 27 |
{ |
24 | 28 |
string json = System.IO.File.ReadAllText(filename); |
... | ... | |
44 | 48 |
return new PredictorConfiguration |
45 | 49 |
{ |
46 | 50 |
TimeResolution = 3, |
51 |
ModelDataPath = DEFAULT_MODEL_DATA_PATH, |
|
47 | 52 |
PredictorCount = 7, |
48 | 53 |
BuildingsToAreas = new Dictionary<string, int> |
49 | 54 |
{ |
Také k dispozici: Unified diff
Re #9049 Implementation of GetDataFileNames and Load methods