1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 | using HeuristicLab.PluginInfrastructure;
|
---|
7 | using HeuristicLab.JsonInterface.App;
|
---|
8 | using HeuristicLab.Algorithms.GeneticAlgorithm;
|
---|
9 | using HeuristicLab.Problems.TravelingSalesman;
|
---|
10 | using HeuristicLab.JsonInterface;
|
---|
11 | using System.IO;
|
---|
12 | using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
|
---|
13 | using HeuristicLab.PluginInfrastructure.Manager;
|
---|
14 | using HeuristicLab.SequentialEngine;
|
---|
15 | using System.Threading;
|
---|
16 |
|
---|
17 | namespace Heuristiclab.ConfigStarter {
|
---|
18 | public class Program {
|
---|
19 |
|
---|
20 | public static void Main(string[] args) {
|
---|
21 |
|
---|
22 | try {
|
---|
23 | string pluginPath = Path.GetFullPath(Directory.GetCurrentDirectory());
|
---|
24 | var pluginManager = new PluginManager(pluginPath);
|
---|
25 | pluginManager.DiscoverAndCheckPlugins();
|
---|
26 |
|
---|
27 | } catch(Exception e) {
|
---|
28 | Console.WriteLine(e);
|
---|
29 | }
|
---|
30 |
|
---|
31 | HEAL.Attic.Mapper.StaticCache.UpdateRegisteredTypes();
|
---|
32 |
|
---|
33 |
|
---|
34 | HeuristicLabJsonInterfaceAppApplication app = new HeuristicLabJsonInterfaceAppApplication();
|
---|
35 |
|
---|
36 | GeneticAlgorithm alg = new GeneticAlgorithm();
|
---|
37 | alg.MaximumGenerations.Value = 10000;
|
---|
38 | TravelingSalesmanProblem tsp = new TravelingSalesmanProblem();
|
---|
39 | tsp.Coordinates[0, 0] = 123;
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | SymbolicRegressionSingleObjectiveProblem prop = new SymbolicRegressionSingleObjectiveProblem();
|
---|
44 |
|
---|
45 | alg.Problem = tsp;
|
---|
46 |
|
---|
47 | File.WriteAllText(@"C:\Workspace\Template.json", JCGenerator.GenerateTemplate(alg));
|
---|
48 | JsonTemplateInstantiator.Instantiate(@"C:\Workspace\Template.json");
|
---|
49 | /*
|
---|
50 | List<ICommandLineArgument> arguments = new List<ICommandLineArgument>();
|
---|
51 | arguments.Add(new StartArgument("JsonInterface"));
|
---|
52 | arguments.Add(new OpenArgument(@"C:\Workspace\Template.json"));
|
---|
53 | arguments.Add(new OpenArgument(@"C:\Workspace\ConfigProto1.json"));
|
---|
54 |
|
---|
55 | app.Run(arguments.ToArray());
|
---|
56 | */
|
---|
57 | }
|
---|
58 | }
|
---|
59 | }
|
---|