Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/12 13:31:18 (12 years ago)
Author:
abeham
Message:

#1329:

  • Added JSSPData class to problem instances
  • Added problem instance provider for some ORLIB JSSP instances (abz, ft, la01-20)
  • Adapted JSSP to load and export jssp problems
  • Adapted JSSP problem view to derive from ProblemView
  • Added static methods to MakespanEvaluator and MeanTardinessEvaluator
  • Fixed a bug in PRVUniformOnePositionManipulator
Location:
trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3
Files:
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/HeuristicLab.Problems.Scheduling.Views-3.3.csproj

    r8806 r8882  
    115115    <Compile Include="Plugin.cs" />
    116116    <Compile Include="Properties\AssemblyInfo.cs" />
    117     <Compile Include="SchedulingProblemImportDialog.cs">
    118       <SubType>Form</SubType>
    119     </Compile>
    120     <Compile Include="SchedulingProblemImportDialog.Designer.cs">
    121       <DependentUpon>SchedulingProblemImportDialog.cs</DependentUpon>
    122     </Compile>
    123117  </ItemGroup>
    124118  <ItemGroup>
     
    128122  </ItemGroup>
    129123  <ItemGroup>
    130     <EmbeddedResource Include="JobShopSchedulingProblemView.resx">
    131       <DependentUpon>JobShopSchedulingProblemView.cs</DependentUpon>
    132     </EmbeddedResource>
    133     <EmbeddedResource Include="SchedulingProblemImportDialog.resx">
    134       <DependentUpon>SchedulingProblemImportDialog.cs</DependentUpon>
    135     </EmbeddedResource>
    136   </ItemGroup>
    137   <ItemGroup>
    138124    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    139125      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
     
    176162      <Private>False</Private>
    177163    </ProjectReference>
     164    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
     165      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
     166      <Name>HeuristicLab.Optimization.Views-3.3</Name>
     167      <Private>False</Private>
     168    </ProjectReference>
    178169    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    179170      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
     
    185176      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    186177      <Private>False</Private>
     178    </ProjectReference>
     179    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     180      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     181      <Name>HeuristicLab.Problems.Instances-3.3</Name>
    187182    </ProjectReference>
    188183    <ProjectReference Include="..\..\HeuristicLab.Problems.Scheduling\3.3\HeuristicLab.Problems.Scheduling-3.3.csproj">
  • trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.Designer.cs

    r6406 r8882  
    2525    /// </summary>
    2626    private void InitializeComponent() {
    27       this.importButton = new System.Windows.Forms.Button();
    28       this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
    29       this.tabControl1 = new System.Windows.Forms.TabControl();
    30       this.tabPage1 = new System.Windows.Forms.TabPage();
    31       this.tabPage2 = new System.Windows.Forms.TabPage();
    32       this.ganttChart = new GanttChart();
     27      this.problemTabControl = new System.Windows.Forms.TabControl();
     28      this.problemTabPage = new System.Windows.Forms.TabPage();
     29      this.visualizationTabPage = new System.Windows.Forms.TabPage();
     30      this.ganttChart = new HeuristicLab.Encodings.ScheduleEncoding.Views.GanttChart();
     31      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).BeginInit();
     32      this.problemInstanceSplitContainer.Panel1.SuspendLayout();
     33      this.problemInstanceSplitContainer.Panel2.SuspendLayout();
     34      this.problemInstanceSplitContainer.SuspendLayout();
    3335      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    34       this.tabControl1.SuspendLayout();
    35       this.tabPage1.SuspendLayout();
    36       this.tabPage2.SuspendLayout();
     36      this.problemTabControl.SuspendLayout();
     37      this.problemTabPage.SuspendLayout();
     38      this.visualizationTabPage.SuspendLayout();
    3739      this.SuspendLayout();
     40      //
     41      // problemInstanceSplitContainer
     42      //
     43      this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     44      this.problemInstanceSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     45      //
     46      // problemInstanceSplitContainer.Panel2
     47      //
     48      this.problemInstanceSplitContainer.Panel2.Controls.Add(this.problemTabControl);
     49      //
     50      // ProblemInstanceConsumerViewHost
     51      //
     52      this.ProblemInstanceConsumerViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     53      this.ProblemInstanceConsumerViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
     54      this.ProblemInstanceConsumerViewHost.Location = new System.Drawing.Point(0, 0);
     55      this.ProblemInstanceConsumerViewHost.Size = new System.Drawing.Size(511, 26);
     56      //
     57      // parameterCollectionView
     58      //
     59      this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     60      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     61      this.parameterCollectionView.Location = new System.Drawing.Point(3, 3);
     62      this.parameterCollectionView.Size = new System.Drawing.Size(491, 271);
    3863      //
    3964      // nameTextBox
     
    4166      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    4267      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    43       this.nameTextBox.Size = new System.Drawing.Size(650, 20);
     68      this.nameTextBox.Size = new System.Drawing.Size(439, 20);
    4469      //
    4570      // infoLabel
    4671      //
    47       this.infoLabel.Location = new System.Drawing.Point(714, 3);
     72      this.infoLabel.Location = new System.Drawing.Point(492, 3);
    4873      //
    49       // importButton
     74      // problemTabControl
    5075      //
    51       this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    52                   | System.Windows.Forms.AnchorStyles.Right)));
    53       this.importButton.Location = new System.Drawing.Point(6, 26);
    54       this.importButton.Name = "importButton";
    55       this.importButton.Size = new System.Drawing.Size(724, 23);
    56       this.importButton.TabIndex = 3;
    57       this.importButton.Text = "Import";
    58       this.importButton.UseVisualStyleBackColor = true;
    59       this.importButton.Click += new System.EventHandler(this.importButton_Click);
     76      this.problemTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     77            | System.Windows.Forms.AnchorStyles.Left)
     78            | System.Windows.Forms.AnchorStyles.Right)));
     79      this.problemTabControl.Controls.Add(this.problemTabPage);
     80      this.problemTabControl.Controls.Add(this.visualizationTabPage);
     81      this.problemTabControl.Location = new System.Drawing.Point(3, 27);
     82      this.problemTabControl.Name = "problemTabControl";
     83      this.problemTabControl.SelectedIndex = 0;
     84      this.problemTabControl.Size = new System.Drawing.Size(505, 303);
     85      this.problemTabControl.TabIndex = 5;
    6086      //
    61       // parameterCollectionView
     87      // problemTabPage
    6288      //
    63       this.parameterCollectionView.AllowEditingOfHiddenParameters = true;
    64       this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    65                   | System.Windows.Forms.AnchorStyles.Left)
    66                   | System.Windows.Forms.AnchorStyles.Right)));
    67       this.parameterCollectionView.Caption = "ParameterCollection View";
    68       this.parameterCollectionView.Content = null;
    69       this.parameterCollectionView.Location = new System.Drawing.Point(3, 0);
    70       this.parameterCollectionView.Name = "parameterCollectionView";
    71       this.parameterCollectionView.ReadOnly = false;
    72       this.parameterCollectionView.Size = new System.Drawing.Size(713, 387);
    73       this.parameterCollectionView.TabIndex = 4;
     89      this.problemTabPage.Controls.Add(this.parameterCollectionView);
     90      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
     91      this.problemTabPage.Name = "problemTabPage";
     92      this.problemTabPage.Padding = new System.Windows.Forms.Padding(3);
     93      this.problemTabPage.Size = new System.Drawing.Size(497, 277);
     94      this.problemTabPage.TabIndex = 0;
     95      this.problemTabPage.Text = "Problem";
     96      this.problemTabPage.UseVisualStyleBackColor = true;
    7497      //
    75       // tabControl1
     98      // visualizationTabPage
    7699      //
    77       this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    78                   | System.Windows.Forms.AnchorStyles.Left)
    79                   | System.Windows.Forms.AnchorStyles.Right)));
    80       this.tabControl1.Controls.Add(this.tabPage1);
    81       this.tabControl1.Controls.Add(this.tabPage2);
    82       this.tabControl1.Location = new System.Drawing.Point(6, 56);
    83       this.tabControl1.Name = "tabControl1";
    84       this.tabControl1.SelectedIndex = 0;
    85       this.tabControl1.Size = new System.Drawing.Size(724, 413);
    86       this.tabControl1.TabIndex = 5;
    87       //
    88       // tabPage1
    89       //
    90       this.tabPage1.Controls.Add(this.parameterCollectionView);
    91       this.tabPage1.Location = new System.Drawing.Point(4, 22);
    92       this.tabPage1.Name = "tabPage1";
    93       this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
    94       this.tabPage1.Size = new System.Drawing.Size(716, 387);
    95       this.tabPage1.TabIndex = 0;
    96       this.tabPage1.Text = "Problem";
    97       this.tabPage1.UseVisualStyleBackColor = true;
    98       //
    99       // tabPage2
    100       //
    101       this.tabPage2.Controls.Add(this.ganttChart);
    102       this.tabPage2.Location = new System.Drawing.Point(4, 22);
    103       this.tabPage2.Name = "tabPage2";
    104       this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
    105       this.tabPage2.Size = new System.Drawing.Size(716, 387);
    106       this.tabPage2.TabIndex = 1;
    107       this.tabPage2.Text = "Visualization";
    108       this.tabPage2.UseVisualStyleBackColor = true;
     100      this.visualizationTabPage.Controls.Add(this.ganttChart);
     101      this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
     102      this.visualizationTabPage.Name = "visualizationTabPage";
     103      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
     104      this.visualizationTabPage.Size = new System.Drawing.Size(497, 277);
     105      this.visualizationTabPage.TabIndex = 1;
     106      this.visualizationTabPage.Text = "Visualization";
     107      this.visualizationTabPage.UseVisualStyleBackColor = true;
    109108      //
    110109      // ganttChart
    111110      //
    112       this.ganttChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    113                   | System.Windows.Forms.AnchorStyles.Left)
    114                   | System.Windows.Forms.AnchorStyles.Right)));
    115       this.ganttChart.Location = new System.Drawing.Point(0, 3);
     111      this.ganttChart.Dock = System.Windows.Forms.DockStyle.Fill;
     112      this.ganttChart.Location = new System.Drawing.Point(3, 3);
    116113      this.ganttChart.Name = "ganttChart";
    117       this.ganttChart.Size = new System.Drawing.Size(716, 384);
     114      this.ganttChart.Size = new System.Drawing.Size(491, 271);
    118115      this.ganttChart.TabIndex = 0;
    119116      //
     
    122119      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    123120      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    124       this.Controls.Add(this.tabControl1);
    125       this.Controls.Add(this.importButton);
    126121      this.Name = "JobShopSchedulingProblemView";
    127       this.Size = new System.Drawing.Size(733, 472);
    128       this.Controls.SetChildIndex(this.importButton, 0);
    129       this.Controls.SetChildIndex(this.nameLabel, 0);
    130       this.Controls.SetChildIndex(this.nameTextBox, 0);
    131       this.Controls.SetChildIndex(this.infoLabel, 0);
    132       this.Controls.SetChildIndex(this.tabControl1, 0);
     122      this.problemInstanceSplitContainer.Panel1.ResumeLayout(false);
     123      this.problemInstanceSplitContainer.Panel2.ResumeLayout(false);
     124      this.problemInstanceSplitContainer.Panel2.PerformLayout();
     125      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceSplitContainer)).EndInit();
     126      this.problemInstanceSplitContainer.ResumeLayout(false);
    133127      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    134       this.tabControl1.ResumeLayout(false);
    135       this.tabPage1.ResumeLayout(false);
    136       this.tabPage2.ResumeLayout(false);
     128      this.problemTabControl.ResumeLayout(false);
     129      this.problemTabPage.ResumeLayout(false);
     130      this.visualizationTabPage.ResumeLayout(false);
    137131      this.ResumeLayout(false);
    138       this.PerformLayout();
    139132
    140133    }
     
    142135    #endregion
    143136
    144     private System.Windows.Forms.Button importButton;
    145     private Core.Views.ParameterCollectionView parameterCollectionView;
    146     private System.Windows.Forms.TabControl tabControl1;
    147     private System.Windows.Forms.TabPage tabPage1;
    148     private System.Windows.Forms.TabPage tabPage2;
     137    private System.Windows.Forms.TabControl problemTabControl;
     138    private System.Windows.Forms.TabPage problemTabPage;
     139    private System.Windows.Forms.TabPage visualizationTabPage;
    149140    private GanttChart ganttChart;
    150141  }
  • trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/JobShopSchedulingProblemView.cs

    r8603 r8882  
    2020#endregion
    2121
    22 using System;
    2322using System.Windows.Forms;
    24 using HeuristicLab.Core;
    25 using HeuristicLab.Core.Views;
    26 using HeuristicLab.Encodings.ScheduleEncoding;
    2723using HeuristicLab.MainForm;
    28 using HeuristicLab.PluginInfrastructure;
     24using HeuristicLab.Optimization.Views;
    2925
    3026namespace HeuristicLab.Problems.Scheduling.Views {
    3127  [View("JobShop Scheduling Problem View")]
    3228  [Content(typeof(JobShopSchedulingProblem), true)]
    33   public partial class JobShopSchedulingProblemView : NamedItemView {
    34     public JobShopSchedulingProblemView() {
    35       InitializeComponent();
    36     }
    37     private SchedulingProblemImportDialog spImportDialog;
     29  public partial class JobShopSchedulingProblemView : ProblemView {
    3830
    3931    public new JobShopSchedulingProblem Content {
     
    4234    }
    4335
     36    public JobShopSchedulingProblemView() {
     37      InitializeComponent();
     38      Controls.Remove(parameterCollectionView);
     39      parameterCollectionView.Dock = DockStyle.Fill;
     40      problemTabPage.Controls.Add(parameterCollectionView);
     41    }
     42
    4443    protected override void OnContentChanged() {
    4544      base.OnContentChanged();
    4645      if (Content == null) {
    47         parameterCollectionView.Content = null;
    4846        ganttChart.Reset();
    4947      } else {
    50         parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;
    5148        FillGanttChart(Content);
    5249      }
     
    5451
    5552    private void FillGanttChart(JobShopSchedulingProblem content) {
    56       //Add Jobs as Categories
    5753      ganttChart.Reset();
    5854      int jobCount = 0;
    59       Random random = new Random(1);
    60       foreach (Job j in content.JobData) {
     55      foreach (var j in content.JobData) {
    6156        double lastEndTime = 0;
    62         foreach (Task t in content.JobData[jobCount].Tasks) {
     57        foreach (var t in content.JobData[jobCount].Tasks) {
    6358          int categoryNr = t.JobNr;
    6459          string categoryName = "Job" + categoryNr;
     
    7469      }
    7570    }
    76 
    77     protected override void SetEnabledStateOfControls() {
    78       base.SetEnabledStateOfControls();
    79       parameterCollectionView.Enabled = Content != null;
    80       importButton.Enabled = Content != null && !ReadOnly;
    81     }
    82 
    83     private void importButton_Click(object sender, EventArgs e) {
    84       if (spImportDialog == null) spImportDialog = new SchedulingProblemImportDialog();
    85 
    86       if (spImportDialog.ShowDialog(this) == DialogResult.OK) {
    87         try {
    88           switch (spImportDialog.Format) {
    89             case SPFormat.ORLib:
    90               Content.ImportFromORLibrary(spImportDialog.SPFileName);
    91               break;
    92           }
    93 
    94 
    95           if (!string.IsNullOrEmpty(spImportDialog.OptimalScheduleFileName))
    96             Content.ImportJSMSolution(spImportDialog.OptimalScheduleFileName);
    97           OnContentChanged();
    98         }
    99         catch (Exception ex) {
    100           ErrorHandling.ShowErrorDialog(this, ex);
    101         }
    102       }
    103     }
    10471  }
    10572}
  • trunk/sources/HeuristicLab.Problems.Scheduling.Views/3.3/Plugin.cs.frame

    r8603 r8882  
    3232  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3333  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
     34  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     35  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
    3436  [PluginDependency("HeuristicLab.Problems.Scheduling", "3.3")]
    3537  public class HeuristicLabProblemsSchedulingViewsPlugin : PluginBase {
Note: See TracChangeset for help on using the changeset viewer.