Skip to main content

Instance generator for JSP

Project description

Instance Generator Job Shop Scheduling

Description

Benchmark generator for the Job Shop Problem (BG-JSP)

Generating a JSP problem instance

To generate an instance of the problem, we will use the Generator class, located in the Generador module. To do this, we initialize the generator, giving it the following parameters:

  1. JSON:json

    • Description: Parameter that indicates if the generated instance will be stored in JSON format.
    • Possible values: Boolean value. Only the values True or False can be obtained.
    • Example of possible values: True, False
    • Default value: False
  2. DZN:dzn

    • Description: Parameter that indicates if the generated instance will be stored in DZN format.
    • Possible values: Boolean value. Only the values True or False can be obtained.
    • Example of possible values: True, False
    • Default value: False
  3. Taillard:taillard

    • Description: Parameter that indicates if the generated instance will be stored in taillard format.
    • Possible values: Boolean value. Only the values True or False can be obtained.
    • Example of possible values: True, False
    • Default value: False
  4. Save Path:savepath

    • Description: Path where the problem instance file will be generated.
    • Possible values: String.
    • Example of possible values: ./problems, ./instances
    • Default value: ./output

Once the generator has been initialized, we proceed to generate different instances of the JSP problem with different values for this initialization; for that we use the following function using the following parameters to customize the generated instances:

  1. Jobs:jobs

    • Description: Number of jobs that will have the problem generated.
    • Possible values: Integer value.
    • Example of possible values: 3, 4.
    • Default value: 10
  2. Machines:machines

    • Description: Number of machines that will have the problem generated.
    • Possible values: Integer value.
    • Example of possible values: 6, 2.
    • Default value: 4
  3. Release and Due Date:ReleaseDateDueDate

    • Descripción: Establish that each task has an instant of release and completion limit.
    • Possible values:
      • 0: Neither the works nor the operations of each of them will have an instant release or time limit for completion.
      • 1: The work will have an instant of release and instant of completion limit.
      • 2: The operations of each job will have a release time and a limiting end time.
    • Example of possible values: 1, 2
    • Default value: 0
  4. Speeds:speed

    • Description: Number of speeds that will be available to perform each task.
    • Possible values: Integer value.
    • Example of possible values: 3, 5
    • Default value: 1
  5. Distribution:distribution

    • Description: Type of distribution to be followed for data generation.
    • Possible values: You can only set one of the following values: uniform normal exponential.
    • Example of possible values: uniform, exponential
    • Default value: normal
  6. Seed:seed

    • Description: Base number for data generation.
    • Possible values: Integer value.
    • Example of possible values: 84, 32
    • Default value: 1

Example of JSON generated

This JSON shows how the data generated from a JSP problem with 2 machines and 4 jobs will look. For this generation, we have the following code:

from IGJSP.generador import Generator
generator = Generator(json=True,savepath="output")
generator.generate_new_instance(jobs=4,machines=2,ReleaseDateDueDate=2,distribution="exponential",seed=53) 
{
    "nbJobs": [
        0,
        1
    ],
    "nbMchs": [
        0,
        1,
        2,
        3
    ],
    "speed": 1,
    "timeEnergy": [
        {
            "jobId": 0,
            "operations": {
                "0": {
                    "speed-scaling": [
                        {
                            "procTime": 8,
                            "energyCons": 92
                        }
                    ],
                    "release-date": 30,
                    "due-date": 41
                },
                "2": {
                    "speed-scaling": [
                        {
                            "procTime": 17,
                            "energyCons": 84
                        }
                    ],
                    "release-date": 41,
                    "due-date": 77
                },
                "3": {
                    "speed-scaling": [
                        {
                            "procTime": 3,
                            "energyCons": 97
                        }
                    ],
                    "release-date": 77,
                    "due-date": 80
                },
                "1": {
                    "speed-scaling": [
                        {
                            "procTime": 7,
                            "energyCons": 93
                        }
                    ],
                    "release-date": 80,
                    "due-date": 88
                }
            },
            "release-date": 30,
            "due-date": 88
        },
        {
            "jobId": 1,
            "operations": {
                "1": {
                    "speed-scaling": [
                        {
                            "procTime": 4,
                            "energyCons": 96
                        }
                    ],
                    "release-date": 0,
                    "due-date": 5
                },
                "3": {
                    "speed-scaling": [
                        {
                            "procTime": 3,
                            "energyCons": 97
                        }
                    ],
                    "release-date": 5,
                    "due-date": 9
                },
                "2": {
                    "speed-scaling": [
                        {
                            "procTime": 1,
                            "energyCons": 99
                        }
                    ],
                    "release-date": 9,
                    "due-date": 10
                },
                "0": {
                    "speed-scaling": [
                        {
                            "procTime": 6,
                            "energyCons": 94
                        }
                    ],
                    "release-date": 10,
                    "due-date": 17
                }
            },
            "release-date": 0,
            "due-date": 17
        }
    ],
    "minMakespan": 35,
    "minEnergy": 752,
    "maxMinMakespan": 14,
    "maxMinEnergy": 0
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

igjsp-0.0.7.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

igjsp-0.0.7-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file igjsp-0.0.7.tar.gz.

File metadata

  • Download URL: igjsp-0.0.7.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for igjsp-0.0.7.tar.gz
Algorithm Hash digest
SHA256 4d0b6eef6de83d6a780d72a7563fd9bcbdb858b53f3bb19e62f9385bbfae5811
MD5 9d6414021f405ff6d458dbf41c5e1f37
BLAKE2b-256 797a051a27673781cf9684c104086b17c362420894b0b0c2094b34d2f3f3744d

See more details on using hashes here.

File details

Details for the file igjsp-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: igjsp-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for igjsp-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 79b9e7b48adf9b8428bd99dbe654574da251a771462d73b762c8a49e109e6eb0
MD5 2aa7d9a56e0d205bfe8aa3868b737c13
BLAKE2b-256 7a8baceebc6e22e3169726275ed86e2d842c65bf145259b25ee2e9e588e3e59c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page