Excel, Visual Basic Job by mrstruggler

Deadline 24/04/2012

See attached: [url removed, login to view] (for specification), [url removed, login to view] (for arrays to input) and [url removed, login to view] (for vb starting code)

VB Excel Project, Input a problem, produce a solution, Arrays/Userforms *$200*


Write a program that attempts to solve the “partial Latin square problem” using simple optimization techniques. Specifically your program will allow the user to input a problem, and will produce a solution using a descent method, and possibly other more sophisticated methods. The program should not allow the user to edit the spreadsheet directly. Instead, all user interaction should be carried out via UserForms and/or input boxes and message boxes.

Latin squares are n × n arrays filled with n different symbols, each occurring once per row and once per column. Here is an example using n = 5.

3 5 1 4 2

5 4 3 2 1

1 2 4 5 3

4 3 2 1 5

2 1 5 3 4

Deadline 24/04/2012

Task 1

Write a program that reads-in a specified problem file. Program should then produce an initial solution to this problem in a randomized fashion, such that (a) the givens appear in their correct positions in the grid, and (b) all rows contain the values 1,…,n exactly once, as explained above. If a problem contains no givens, then your program should be able to detect this and can simply return the “root solution” to the user. The root solution is simply a grid that has values (1, 2,…, n) on the first row, (2, 3,…, n, 1) on the second row, (3, 4,…, n, 1, 2) on the third row, and so on. For example, here are the root solutions for n = 3 and n = 5

Task 2

Assuming that your initial solution is not yet a Latin square, a cost function should now be written that calculates its quality according to the descriptions.

Next task is to write code that attempts to improve on the initial solution. To start, this is to be achieved using a random descent technique. This should operate by making a random alteration (move) to the solution and then re-evaluating. If the cost is lowered or stays the same, then we accept the changes, otherwise the change should be reset. This process is then repeated.

Task 3

Modify the code so that when an initial solution is first produced the user has a choice of using the descent method or simulated annealing. Hence write the code for carrying out the simulated annealing. You may wish to use a UserForm to allow the user to define the various choices and control parameters.

Task 4

If you have successfully completed Tasks 1-3, then try improving your program by making it more efficient, powerful and/or user-friendly. Extras to include:

Using UserForms to allow the user to specify input files, algorithm choice, algorithm parameters, etc.

Allowing your program to collect information on each run (e.g. initial cost, final cost, the changes in cost according to the number of evaluations, etc.) and then store this in a worksheet. You might also choose to include graphs that allow you to view the changes in cost that were achieved according to the number of evaluations.

Modifying your algorithm to see if further improvements might be made. For example, you could:

Make your solution evaluations more efficient by only recalculating the cost of the columns that were altered during a move;

Use different types of neighborhood operators, cooling schedules etc.

Attempt to introduce some heuristics into the algorithm e.g. clever methods for producing high-quality initial solutions, clever methods for making changes to a solution.

Kemahiran: Excel, Visual Basic

Lihat lagi: vb algorithm, types of it solutions, types of algorithm, solution specification, solution algorithm, simply fashion, simple spreadsheet examples, simple algorithm examples in c, simple algorithm example, program algorithm example, problem summary, making an algorithm, grid for graphs, graphs explained, graphs algorithm, final specification, excel specification, examples of different graphs, examples of an algorithm, example of number problem with solution, example of graphs, different types of algorithm, define algorithm in c, define algorithm, custom graphs in excel

Tentang Majikan:
( 1 ulasan ) Newport, United Kingdom

ID Projek: #1572336

1 pekerja bebas membida secara purata $200 untuk pekerjaan ini


Hired by the Employer

$200 USD dalam 7 hari
(97 Ulasan)