### Sidebar

public:vievs_manual:scheduling:multischeduling

# Multi Scheduling tool

The multi scheduling tool is a powerful way to create multiple schedules with different parameters. It can be used for a variety of different application like testing parameters or models or simply creating an optimal schedule.

This works well together with the other modules in VieVS.

As this is only for advanced users you might need a bit of internal information about the underlying matlab code. Check the examples at the bottom of this page for some help.

## The multisched.txt file

Here you specify everything for the multi scheduling tool.

This file is formatted in a specific way:

#### The "%" key

A “%” starts a comment.

#### The "#" key

A “#” at the start of a line means, that you start a new schedule. After your “#”-Line you can specify different parameters. By default VieVS will use the standard parameters from the param.m file and the catalogs, but you can override these parameters here.

Keep in mind, that you override this parameter ONLY FOR THIS SCHEDULE! This means if you have, for example, a standard PARA.MIN_SCAN of 20 and a standard PARAM.MAX_SCAN of 200 and your multisched.txt looks something like this


#
PARA.MIN_SCAN = 50;
#
PARA.MAX_SCAN = 100;

you will create two schedules. For the first schedule you use a PARA.MIN_SCAN of 50 (new) and a PARA.MAX_SCAN of 200 (default). For your second schedule you will use a PARA.MIN_SCAN of 20 (default) and a PARA.MAX_SCAN of 100 (new).

Everything under your “#”-Line is interpreted as MATLAB code. In theory you can change every parameter in the “station”, “twin”, “source” and “PARA” structures.

It is sufficient to only write a “#” to start a new schedule. Everything else in this line is treated like a comment.

If you just want to change some minor parameters you only have to write:

 PARA.PARAMETER = 1;

(check the param.txt file for a list of parameters) If you want to change something in the other structures you need some more knowlege of our VieVS_sched structure fields. Just write your code the same way you would add it in our *.m functions.

Because this is interpreted as MATLAB code don't forget to put a “;” at the end of your expression. Also keep in mind that MATLAB normally compiles code the first time you run it to enhance performance for furture runs. However, because this code can change at runtime it is not compiled! If there is a syntax error, this line is ignored!

#### The "+" key

It is not necessary to always process all specified schedules at once. Before the “#” block starts you have two lines, marked with and “+”, where you can specify your start index and end index. You can, for example create a multisched.txt file containing several hundred of schedules and than process only schedule 1 until 100 over the first night, and start with 101 until 200 over the second night. If you want to process every schedule simply write:


+ start_index  1
+ end_index    Inf

### Examples

#### weight factors and param.txt parameters

To get an optimal schedule it is often times good to try different individual weight factors. This can be done easily with the multi scheduling tool. Your file should look something like this:


### sched Nr:   1 NOTE:Everything after a "#" in this line is a comment!
PARA.WEIGHT_SCAN_END_TIME = 0.000000;
PARA.WEIGHT_SKY_COVERAGE = 0.000000;
PARA.WEIGHT_NUMBER_OF_OBS = 1.000000;
### sched Nr:   2
PARA.WEIGHT_SCAN_END_TIME = 0.000000;
PARA.WEIGHT_SKY_COVERAGE = 0.200000;
PARA.WEIGHT_NUMBER_OF_OBS = 0.800000;
### sched Nr:   3
PARA.WEIGHT_SCAN_END_TIME = 0.000000;
PARA.WEIGHT_SKY_COVERAGE = 0.250000;
PARA.WEIGHT_NUMBER_OF_OBS = 0.750000;
### sched Nr:   4
PARA.WEIGHT_SCAN_END_TIME = 0.000000;
PARA.WEIGHT_SKY_COVERAGE = 0.333333;
PARA.WEIGHT_NUMBER_OF_OBS = 0.666667;

and so on… You can change all parameters specified in the param.txt file in the same way.

#### GUI parameters

Parameters from the GUI can be changed in the following way:

Scan start time:


#
PARA.startmjd = 57147;
PARA.endmjd = 57148;
PARA.duration = 24;
#

Note: this will maybe not properly change the output name of the .skd file!

Signal to noise ratio:


#
PARA.MIN_SNR = [20 17]; % first parameter is X-band, second is S-band
#

Conditions:


#
PARA.optimization_type = {’iterative’};
PARA.optimization_condition = ’( nbl > 2 )’;
#

#### station structure

This requires more knowledge of the internal VieVS scheduling station structure. If you want to manipulate one station you fist need to find out its index in this structure.

Be careful! Every station name is 8 characters long! Add whitespaces at the end!

Delete a station:


#
% NOTE: The name HARTRAO must be 8-letters long, except you use something like strtrim()!
station(strcmp({station.name},’HARTRAO ’))=[];
#

change station coordinates:


#
new_coord = [4075539; 931735; 4801629];
station(strcmp({station.name},’WETTZELL’)).xyz = new_coord;
[lat,lon,h] = xyz2ell(new_coord’);
station(strcmp({station.name},’WETTZELL’)).llh = [lon,lat,h];
#

Note that everything is interpreted as matlab code. This means you can access all functions and define variables. But every variable is only visible for this “#” block.

#### source structure

You can do the same with the VieVS scheduling internal source structure:

Delete a source:


#
source(strcmp({source.name},’0059+581’))=[];
#

Change source weight:


#
source(strcmp({source.name},’0059+581’)).weight = 2;
#

## Multi core support

You can create this kind of multiple schedules with multi core support. To activate it browse in the main VieVS GUI window to Run/Run options and check the Use parallel processing checkbox. This will speed up the process probably a lot!

## Output and summary

The output is stored in VIEVS/DATA/SCHED here you can find the sub-directory that you have specified in the main VieVS GUI under Run/Run options. For each created schedule you get an separate sub folder with the name “v001” where the number corresponds with the block number in the multisched.txt file.

If you use this tool you will always write log files. The header.txt file is only saved once, because it is the same for each version. ( If you restart matlab and continue with the multi scheduling tool it could be possible that the header is different. Take care that you use the same options)

All other files are moved to the correspondent sub folders. Additionally a copy of your multisched.txt file is stored here.

Additionally some summaries files are created. This depends on the version you are using. It can be possible that you get a summary.xlsx file or some .csv files.

Because there were some problems with opening the Excel engine from matlab via a multi-thread program only the .csv version will be maintained in future.

In this summary files you find a lot of helpful statistics for each schedule which makes it easier to compare your results

## Multi scheduling and simulation

Simulating your results is easy with VieVS. Simply specify all settings in the main GUI for simulation and parameter estimation and select every modules at Run/Run options except of Run vie_glob.

Do not forget to use parallel processing, this helps with run time.

For the simulation choose an appropriate number of simulated days. Do NOT write ngs-files, because they are not needed and it takes a lot of time and storage space to create these files.