Given an array of decimals dimension 6x11, a subset of these array elements (4x5) should be varied to obtain all possible configurations.
Constraints are on the values of the possible elements in the subset (4x5) are:
-All immediate neighboring of the selected element X in the subset must vary according to the following a-0.2<=X<=a+0.2 by steps of 0.1 where a is a given number.
-each configuration should be passed to an algorithm that calculates a value (according to a formula) using each of the previous array configurations to search for the configuration that makes this value THE MINIMUM.
Data will be provided.
Code should be written in VBA inside Excel or preferably in C++
PSEUCODE IS AVAILABLE and DRIVER CODE in C++ is attached.
all it needs is to implement the array generator function as per the description and pass it to calculate the fuel cost and hence find the array conf that minimizes fuel cost.
all the program needs is to generate all the possible combination by modifying a subset in the original array such that each element is distant only by 0.1 from its neighbor. once generated the array is fed to the main function to calculate the fuel cost and so forth. there is one only array config that yield a minimum in the fuel cost. I want to find this array. hope you get it