Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/13 15:50:53 (12 years ago)
Author:
fschoepp
Message:

#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:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/ChartController.cs

    r9062 r9166  
    157157          return Json("error", JsonRequestBehavior.AllowGet);
    158158        }
     159
     160        [HttpGet]
     161        public JsonResult GetDatatableContent(string datatable, string datarow) {
     162          try {
     163            var model = Session["jobDetails"] as JobDetailsModel;
     164            var plotableData = new PlotableData();
     165
     166            for (var i=0; i < model.Runs.Count; i++) {             
     167              foreach (var result in model.Runs[i].Results) {
     168                if (result.Value.Name == datatable) {
     169                  var matrix = result.Value as DecimalMatrix;
     170                  var index = Array.IndexOf(matrix.RowNames, datarow);
     171                  plotableData.Series.Add(
     172                    new SeriesEntry() {
     173                      Label = "" + (i + 1) + ". Run - " + datatable + " - " + datarow,
     174                      Values = matrix.Value[index]
     175                    }
     176                  );
     177                  break;
     178                }
     179              }
     180            }
     181
     182            return Json(plotableData, JsonRequestBehavior.AllowGet);
     183          }
     184          catch (Exception e) {
     185            Trace.TraceError(e.Message);
     186          }
     187          Response.StatusCode = 400;
     188          Response.Status = "Session timed out";
     189          return Json("error", JsonRequestBehavior.AllowGet);
     190        }
     191
     192        [HttpGet]
     193        public JsonResult GetDatatables() {
     194          try {
     195            var model = Session["jobDetails"] as JobDetailsModel;
     196            var dts = new DatatableContainer();
     197            var datatables = new List<string>();
     198            foreach (var param in model.Runs[0].Results) {
     199              if (param.Value is DecimalMatrix) {
     200                datatables.Add(param.Value.Name);
     201              }
     202            }
     203
     204            dts.Datatables = datatables.ToArray();
     205
     206            return Json(dts, JsonRequestBehavior.AllowGet);
     207          }
     208          catch (Exception e) {
     209            Trace.TraceError(e.Message);
     210          }
     211          Response.StatusCode = 400;
     212          Response.Status = "Session timed out or ";
     213          return Json("error", JsonRequestBehavior.AllowGet);
     214        }
     215
     216        [HttpGet]
     217        public JsonResult GetRowNames(string datatable) {
     218          var model = Session["jobDetails"] as JobDetailsModel;
     219          try {
     220            foreach (var param in model.Runs[0].Results) {
     221              if (param.Value.Name == datatable) {
     222                var matrix = param.Value as DecimalMatrix;
     223               
     224                var rowNames = new RowNameContainer() {
     225                  RowNames = new List<string>(matrix.RowNames)
     226                };
     227                return Json(rowNames, JsonRequestBehavior.AllowGet);               
     228              }
     229            }           
     230          }
     231          catch(Exception ex) {
     232            Trace.WriteLine(ex.Message);
     233          }
     234          Response.StatusCode = 400;
     235          Response.Status = "Session timed out";
     236          return Json("error", JsonRequestBehavior.AllowGet);
     237        }
    159238    }
    160239}
Note: See TracChangeset for help on using the changeset viewer.