3. Tutorial to create the NetRes instances using SolutionsUpdate

  1. Download. It is required the MT30 instance set files, ResSet files, dataset files, and the tool, SolutionsUpdate.exe.

The tool can be downloaded (Windows and Mac): SolutionsUpdate.zip

Instance Files (MT30 and ResSet files)

You can download these files to any folder. The MT30 instances will provide the network and the ResSet the resource profile. The exact network and resource profile to use in each instance, is specified in the dataset files. Make sure you extract this files from the zip file, in order to give a pathname, when required by the tool.

  1. Generate the instances of NetRes. The NetRes set have 7 built datasets, each one focus on a specific indicator, and will have a csv file for each dataset.

One of the 7 datasets is the NetRes(SP), and its dataset file is named “NetResSP.csv”. Each dataset contains many instances, for the selected one, exists 540000 instances. To generate part and not all the dataset, make step 3 of this tutorial. Now, open a command line, go to the folder where you download the files, and execute the command:

SolutionUpdate NR_SP.csv netressp

The instances will be saved with the prefix name of “netressp” followed by an ID going from 1 to 540000 and extension filename. The first instance is named “netressp1.rcp”, the last one “netressp540000.rcp”. Make sure you have enough disk space for these files. Note also that this command originates a disk intensive usage. In this example, you could give, of course, another prefix or another dataset file. The files are going to the default folder, but you can add a folder in the prefix. If you want the files to go to an existing folder “SP” in the current folder, and keep the same filenames, you can use the prefix “SP\netressp”.

  1. Generate part of a dataset of NetRes. Used to create sub-dataset, if there are not needed all the instances.

The NetRes set is built to allow the use of a large number of instances. But some usages, a few instances are enough. For example, you may be interested in a SP diverse set of instances, with a small number of instances, let’s say of 540 instances.

In this case, you need two steps for this propose: making a sub-dataset and generate the files. For making the sub-dataset you may just clone the existing dataset file and delete the lines corresponding to the instances that you do not want. But the tool can do it for you. In this case you want 1/1,000 part of the all dataset. The following command allow to do just that:

SolutionUpdate NR_SP.csv NR_SP540.csv 1-540000:1000

The previous command generates a new file named “NR_SP540.csv”, with only 540 instances specified. It goes from 1 to 540,000, with steps of 1,000, so the instances that are extracted are fully specified, and can be easy referenced to other researchers. Now is required the second step, to get the instances. It is the step 2 of tutorial, but using the created datafile “NR_SP540.csv” to generate just the 540 instances.

  1. Create a new dataset of NetRes. We have 7 datasets built from NetRes, that focus on 7 indicators, but you may want another dataset.

In this case, you may do that by cloning an existing dataset file and change the columns Ref1, Ref2 and Ref3. Alternatively, you can create a CSV file from the scratch, and fill those columns. Each line specifies one instance file, with the network on the Ref1 column, the resource file in Ref2, and resource profile number on Ref3. You should delete any extra lines that do not belong to the dataset, or add as many as required. The first column has the ID of the instances, that should be an incremental integer. You may ignore all other columns. Suppose you have done that, and now exist the “MyNetRes.csv” file. Then it is required to initialize the dataset with the following command:

SolutionUpdate MyNetRes.csv reset

This will rebuild all other columns, missing or belonging to the previous dataset that was cloned. Any existing results are removed. Now you may want to execute step 2 of this tutorial, with this file, to create the instances files.