Hello everybody, i need your help to solve this in c#:
X14 + X24 + X34 + 30 lambda = 130
X14 + X24 + X34 - 10 lambda = 90
X14 + X23 + X33 + 10 lambda = 100
X14 + X23 + X33 - 20 lambda = 70
X13 + X23 + X32 + 15 lambda = 95
X13 + X23 + X32 - 10 lambda = 70
X12 + X22 + X31 + 10 lambda = 80
X12 + X22 + X31 - 10 lambda = 60
X12 + X21 + X32 + 5 lambda = 65
X12 + X21 + X32 - 10 lambda = 60
X11 + X21 + X31 = 60
X14 + X24 + X34 = 150
X12 - X11 = 4
X13 - X12 = 4
X14 - X13 = 4
X22 - X21 = 4
X23 - X22 = 4
X24 - X23 = 4
X32 - X31 = 4
X33 - X32 = 4
X34 - X33 = 4
Xij = 0 (i = 1,2, ... , m ; j = 1,2, ... , n)
How do i solve this problem in c# winforms ?
i am confused, how i can get the answer /value for each data ( lambda , x11, x12, 13, etc )
Please help me.
Thank you.
Have a great day. :)
Loading
VulpesPosted Aug 31, 2011, 2:19 PM
Nico DarmawanPosted Sep 1, 2011, 1:26 AM
Finally i got it. So i must count the value of each Xij manually on the paper and then declare it in the program.
So for now it's impossible to customize the application, it means that for now i = 3, j = 4
It's because i can't count the value of each Xij, so i just rely on the value contained in the book.
Thank you so much for your help, patience and opinion.
God bless you. :)
Nico DarmawanPosted Aug 31, 2011, 12:33 PM
If you increased i or j, then the calculations would need to be revised but it's not difficult to allow for all this.
I am still dont get the idea for yours (above) sentences.
Revised?
You mean i must presuppose the value based on the current standard value?
A bit confuse how to do the calculations.
Do you mind to explain it sir?
Thank you very much.
VulpesPosted Aug 29, 2011, 2:30 PM
If it's equivalent to 100,000 one year then it might be equivalent to 103,000 the next year if there's 3% salary inflation.
You could set this value in a text or XML file and change it as needed.
You could also keep the Xij in the file and change them if it becomes clear that the weightings are no longer appropriate.
The highest score will always be X14 + X24 + X34 so if this increased (say) to 105, then the highest salary in the settings file would now be equivalent to a score of 105 rather than 99.6.
If you increased i or j, then the calculations would need to be revised but it's not difficult to allow for all this.
Nico DarmawanPosted Aug 29, 2011, 1:02 PM
It's very simple if i just use the answer from the book, save it into an array / db, access them according what i need in the future.
But what if the factor become 4 not 3? or each factor have more type: x11,x12,x13,x14,x15
Do you have any suggestion or idea?
Please tell me if you have in your mind sir.
Thank you Mr Vurpes for all your attention until now. :)
VulpesPosted Aug 29, 2011, 6:23 AM
To build an application on these lines would be very easy.
Nico DarmawanPosted Aug 29, 2011, 5:41 AM
i got crazy after read your reply cause i don't know what to do now.
I would like to make an salary application.
Explanation :
During this payroll employees in a company are often made ??with provisions that are firm. For example: payment of salaries based on years of service, or based on class, or education. Yet in reality there are many other factors that influence, such as the severity of a job or responsibility that must be borne employees in carrying out his job. Factors - factors like these is quite difficult if it has to be identified unequivocally. An employee who has a low complexity of work should earn a lower salary compared to a high complexity. As well as employees who work without supervision should receive higher salaries compared to that get full control. The size of heavy / light or a lot / a little of this oversight is not expressly or vague (fuzzy).
I choose 3 major factor that can be used to evaluate the job :
1. complexity of the work
2. the need for supervision
3. physical endurance
Each factor divide to 4 level :
Factor 1 : complexity of the work
x11 = low
x12 = intermediate
x13 = high enough
x14 = high
Factor 2 : the need for supervision
x21 = really need
x22 = need
x23 = little need
x24 = no need
Factor 3 : physical endurance
x31 = no need
x32 = little need
x33 = need
x34 = very need
What do you think of these idea?
So it is impossible to make this application?
I am so dizzy right now.
Do you have any recommendation or do you have ever make an application like this or do you know any blog about this?
Sorry if my english is bad (i used translate.google).
As a junior, i need your advice sir.
Thank you for everything until now. :)
VulpesPosted Aug 28, 2011, 8:51 AM
Nico DarmawanPosted Aug 27, 2011, 10:30 PM
Sorry to make you confuse, i just repair the sentences / statements above. Please take a look again. :)
My lecture just told to me to make the application based on the books, so when i asked him, he told me to look at the book again.
The book just give the answer :
lambda = 0.92 --> it means the result of the syntax above is 92% perfect.
x11 = 52.4
x12 = 56.4
x13 = 60.4
x14 = 66
x21 = 0
x22 = 12.8
x23 = 16.8
x24 = 21.6
x31 = 0
x32 = 4
x33 = 8
x34 = 12
The book is not telling the way how to find these result. Just said : use reguler linear programming!
So when i change the expression / syntax, i cant found the answer because i dont know the way to find it...
Example :
X14 + X24 + X34 + 30 lambda = 130 --> if i change the 130 to 160, i dont know how to find it...
As well as others...
Its make me crazy.
Whats your opinion / suggestion sir?
Thank you very much for reply my thread. I appreciate it. :)
VulpesPosted Aug 27, 2011, 3:06 PM
Nico DarmawanPosted Aug 27, 2011, 1:24 PM
Sorry you miss the problem...
X14 + X24 + X34 + 30 ? = 130 --> ? is 'lambda"
I have read a book with this problem. And my lecture told me to make an application like that.
All the answers are all in the books except one, that is there is no explanation the way how to get the value.
The book just say : "The form above can be solve with linear programming" --> Its make confuse.
Can you help me.
Thank you.
Nico DarmawanPosted Aug 27, 2011, 1:15 PM
There is no input sir.
Maybe i think the input are the expression / syntax it self like :
X14 + X24 + X34 + 30 lambda = 130
X14 + X24 + X34 - 10 lambda = 90
X14 + X23 + X33 + 10 lambda = 100
X14 + X23 + X33 - 20 lambda = 70
X13 + X23 + X32 + 15 lambda = 95
X13 + X23 + X32 - 10 lambda = 70
X12 + X22 + X31 + 10 lambda = 80
X12 + X22 + X31 - 10 lambda = 60
X12 + X21 + X32 + 5 lambda = 65
X12 + X21 + X32 - 10 lambda = 60
X11 + X21 + X31 = 60
X14 + X24 + X34 = 150
X12 - X11 = 4
X13 - X12 = 4
X14 - X13 = 4
X22 - X21 = 4
X23 - X22 = 4
X24 - X23 = 4
X32 - X31 = 4
X33 - X32 = 4
X34 - X33 = 4
Xij = 0 (i = 1,2, ... , m ; j = 1,2, ... , n)
And just want to get the value (output) for lambda, x11, x12, x13, x14, x21, etc.
Thats all.
My mathematic is bad, so i try to make an application to get that output / value.
Can you help me?
Thank you.
VulpesPosted Aug 26, 2011, 10:02 AM
It's better to use a library. Here are a couple of free ones:
http://www.codeproject.com/KB/recipes/matrixoperations.aspx
http://www.lutzroeder.com/dotnet/ (use Mapack)
Jaganathan BantheswaranPosted Aug 26, 2011, 4:30 AM
What is input here, what should be output? What is the error?
Explain more.