Last change
on this file since 9630 was
9166,
checked in by fschoepp, 12 years ago
|
#1888:
- Model: OptimizationScenario may be a tree of algorithms (and problems)
- Model: Renamed InputParameters to ProblemParameters (as they are the parameters of a problem)
- Model: Added JobExecutionDetails which contain Repetitions + Group (resource to use)
- ScenarioParser parses the new XML scenario files
- Website + Model: You are now able to add/remove rows from a table (no JavaScript involved yet)
- Website + Controller: Added repetitions (enables batch jobs) and group (resource to use) to OaaS which will be used by the controller to schedule the job
- Website: Updated templates to use new model structure
- Website + Scenarios: Added the new algorithm Benchmark Algorithm
- Controller: Added a singleton to make the (Azure/Mockup)-DAL exchangeable
- Controller: Added mockup classes for DAL + IScenarioManager
- Website/Result Page: Line Diagrams will be added via JavaScript, crawling their data using AJAX
- Website: Most configuration parameters can be set in the ServiceDefinition directly
- Added a mockup for the Membership classes: These can be used if no network connection is available or if other parts of the app shall be tested
- Scenarios: Updated TSP mappings to new xsd
|
File size:
1.2 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Data;
|
---|
6 | using HeuristicLab.Services.Optimization.ControllerService.Model;
|
---|
7 | using HeuristicLab.Optimization;
|
---|
8 | using HeuristicLab.Services.Optimization.ControllerService;
|
---|
9 | using HeuristicLab.Algorithms.Benchmarks;
|
---|
10 | using HeuristicLab.Parameters;
|
---|
11 | using HeuristicLab.PluginInfrastructure;
|
---|
12 |
|
---|
13 |
|
---|
14 | namespace HeuristicLab.Mappers {
|
---|
15 | public class BenchmarkScenarioMapper : IScenarioMapper {
|
---|
16 | public void MapScenario(OptimizationScenario scenario, out IAlgorithm algorithm) {
|
---|
17 | var alg = scenario.FirstAlgorithm;
|
---|
18 | var bm = new BenchmarkAlgorithm();
|
---|
19 | var bmFullName = HLMapper.GetStringValue(alg.Parameters.FindByName("Benchmark"));
|
---|
20 | bm.BenchmarkParameter.Value = bm.Benchmark = bm.BenchmarkParameter.ValidValues.First(b => b.GetType().FullName == bmFullName);
|
---|
21 | ((ValueParameter<IntValue>)bm.Parameters["ChunkSize"]).Value = HLMapper.ConvertToIntValue(alg.Parameters.FindByName("ChunkSize"));
|
---|
22 | ((ValueParameter<DoubleValue>)bm.Parameters["TimeLimit"]).Value = HLMapper.ConvertToDoubleValue(alg.Parameters.FindByName("TimeLimit"));
|
---|
23 |
|
---|
24 | algorithm = bm;
|
---|
25 | }
|
---|
26 | }
|
---|
27 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.