Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/19/17 11:10:14 (6 years ago)
Author:
fholzing
Message:

#2864: CleanUp of old code, added LOP benchmark instances

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2864_PermutationProblems/HeuristicLab.Problems.Instances.PFSP/3.3/FSSPTAILIBParser.cs

    r15521 r15541  
    6767            }
    6868        }
    69 
    70         /// <summary>
    71         /// Reads from the given stream data which is expected to be in the JSSP ORLIB format.
    72         /// </summary>
    73         /// <remarks>
    74         /// The stream is not closed or disposed. The caller has to take care of that.
    75         /// </remarks>
    76         /// <param name="stream">The stream to read data from.</param>
     69     
    7770        public void Parse(Stream stream)
    7871        {
     
    111104            }
    112105        }
    113 
    114         /// <summary>
    115         /// Writes to the given stream data which is expected to be in the JSSP ORLIB format.
    116         /// </summary>
    117         /// <remarks>
    118         /// The stream is not closed or disposed. The caller has to take care of that.
    119         /// </remarks>
    120         /// <param name="stream">The stream to write data to.</param>
     106   
    121107        public void Export(Stream stream)
    122108        {
    123             //TODO: complete Export, seems as if it is just a dummy (copy-paste)-implementation
    124109            using (var writer = new StreamWriter(stream, Encoding.UTF8, 4092, true))
    125110            {
    126111                writer.WriteLine(Name);
    127112                writer.WriteLine(Description);
    128                 writer.WriteLine(Jobs.ToString(CultureInfo.InvariantCulture.NumberFormat) + " " + Machines.ToString(CultureInfo.InvariantCulture.NumberFormat));
    129                 for (int i = 0; i < Machines; i++)
     113                writer.WriteLine(Jobs + '\t' + Machines);
     114                writer.WriteLine(BestKnownQuality);
     115
     116                for (int k = 0; k < Machines; k++)
    130117                {
    131                     for (int j = 0; j < Jobs; j++)
     118                    for (int i = 0; i < Jobs; i++)
    132119                    {
    133                         writer.Write(ProcessingTimes[i, j] + " ");
     120                        writer.Write(ProcessingTimes[k, i] + "\t");
    134121                    }
    135122                    writer.WriteLine();
     123                }
     124
     125                if (BestKnownSchedule != null) {
     126                    writer.WriteLine(BestKnownSchedule);
    136127                }
    137128                writer.Flush();
    138129            }
    139130        }
    140 
    141131    }
    142132}
Note: See TracChangeset for help on using the changeset viewer.