Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSun, 06 Jul 2014 17:36:02 +0200Automated optimum solutionhttps://ask.libreoffice.org/en/question/3363/automated-optimum-solution/(THIS MIGHT BE CONFUSING. YOU CAN JUST JUMP TO MODELING)
Aoa. I am a student of civil engineering and i am attempting to make a spreadsheet to help me design structural members but i am at the best a novice at programming. So any help is appreciated.
Say i need a total steel area "A" and the steel available is as 0.11, 0.2, 0.31, 0.44,0.6, 0.79, 1, 1.27, 1.56, 2.25 and 5 squared inches. Moreover if i use a single type of steel bar, i can take either even or odd number of bars but if i use multiple bars, i can have an odd number of only type of bars, the rest must be even. Odd bars are not a necessity, i can have even number of all types of bars.
MODELING:
A' = a*X + b*Y using two types of bars.
X or Y = [0.11, 0.2, 0.31, 0.44, 0.6, 0.79, 1, 1.27, 1.56, 2.25, 5].
a = [0,2,4,6,....,(A/0.11 rounded up to nearest multiple of 2)].
b = [0,1,2,3,4,....,(A/0.11 rounded up to nearest whole number)].
A is the area required and A' is what i get. I want a very small difference.
For simplicity
a = [0,2,4] and
b = [0,1,2,3].
So what i need is the 10 out of the ~1500 possibilities that give me the least value of |A-A'|. Positive / negative does not matter.
I know this is a lot to ask and really appreciate your consideration and help.Sun, 17 Jun 2012 21:02:29 +0200https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/Comment by bencomp for <p>(THIS MIGHT BE CONFUSING. YOU CAN JUST JUMP TO MODELING)
Aoa. I am a student of civil engineering and i am attempting to make a spreadsheet to help me design structural members but i am at the best a novice at programming. So any help is appreciated.
Say i need a total steel area "A" and the steel available is as 0.11, 0.2, 0.31, 0.44,0.6, 0.79, 1, 1.27, 1.56, 2.25 and 5 squared inches. Moreover if i use a single type of steel bar, i can take either even or odd number of bars but if i use multiple bars, i can have an odd number of only type of bars, the rest must be even. Odd bars are not a necessity, i can have even number of all types of bars.</p>
<p>MODELING:
A' = a<em>X + b</em>Y using two types of bars.
X or Y = [0.11, 0.2, 0.31, 0.44, 0.6, 0.79, 1, 1.27, 1.56, 2.25, 5].
a = [0,2,4,6,....,(A/0.11 rounded up to nearest multiple of 2)].
b = [0,1,2,3,4,....,(A/0.11 rounded up to nearest whole number)].
A is the area required and A' is what i get. I want a very small difference.
For simplicity
a = [0,2,4] and
b = [0,1,2,3].</p>
<p>So what i need is the 10 out of the ~1500 possibilities that give me the least value of |A-A'|. Positive / negative does not matter.
I know this is a lot to ask and really appreciate your consideration and help.</p>
https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?comment=36548#post-id-36548This is quite an interesting spreadsheet problem that I cannot solve. On a more general note though, it sounds like you need someone to do your homework, which is a bit out of scope for a Q&A.Sun, 06 Jul 2014 17:36:02 +0200https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?comment=36548#post-id-36548Answer by qubit for <p>(THIS MIGHT BE CONFUSING. YOU CAN JUST JUMP TO MODELING)
Aoa. I am a student of civil engineering and i am attempting to make a spreadsheet to help me design structural members but i am at the best a novice at programming. So any help is appreciated.
Say i need a total steel area "A" and the steel available is as 0.11, 0.2, 0.31, 0.44,0.6, 0.79, 1, 1.27, 1.56, 2.25 and 5 squared inches. Moreover if i use a single type of steel bar, i can take either even or odd number of bars but if i use multiple bars, i can have an odd number of only type of bars, the rest must be even. Odd bars are not a necessity, i can have even number of all types of bars.</p>
<p>MODELING:
A' = a<em>X + b</em>Y using two types of bars.
X or Y = [0.11, 0.2, 0.31, 0.44, 0.6, 0.79, 1, 1.27, 1.56, 2.25, 5].
a = [0,2,4,6,....,(A/0.11 rounded up to nearest multiple of 2)].
b = [0,1,2,3,4,....,(A/0.11 rounded up to nearest whole number)].
A is the area required and A' is what i get. I want a very small difference.
For simplicity
a = [0,2,4] and
b = [0,1,2,3].</p>
<p>So what i need is the 10 out of the ~1500 possibilities that give me the least value of |A-A'|. Positive / negative does not matter.
I know this is a lot to ask and really appreciate your consideration and help.</p>
https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?answer=13898#post-id-13898Hi @Ishaq,
Have you found a solution to your problem?
It sounds like this is a complicated problem that might be best addressed by someone with a background in engineering. Unfortunately I can't sort the Ask site users by degree, but sometimes I wish that I could :-)Wed, 06 Mar 2013 10:02:33 +0100https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?answer=13898#post-id-13898Answer by ROSt52 for <p>(THIS MIGHT BE CONFUSING. YOU CAN JUST JUMP TO MODELING)
Aoa. I am a student of civil engineering and i am attempting to make a spreadsheet to help me design structural members but i am at the best a novice at programming. So any help is appreciated.
Say i need a total steel area "A" and the steel available is as 0.11, 0.2, 0.31, 0.44,0.6, 0.79, 1, 1.27, 1.56, 2.25 and 5 squared inches. Moreover if i use a single type of steel bar, i can take either even or odd number of bars but if i use multiple bars, i can have an odd number of only type of bars, the rest must be even. Odd bars are not a necessity, i can have even number of all types of bars.</p>
<p>MODELING:
A' = a<em>X + b</em>Y using two types of bars.
X or Y = [0.11, 0.2, 0.31, 0.44, 0.6, 0.79, 1, 1.27, 1.56, 2.25, 5].
a = [0,2,4,6,....,(A/0.11 rounded up to nearest multiple of 2)].
b = [0,1,2,3,4,....,(A/0.11 rounded up to nearest whole number)].
A is the area required and A' is what i get. I want a very small difference.
For simplicity
a = [0,2,4] and
b = [0,1,2,3].</p>
<p>So what i need is the 10 out of the ~1500 possibilities that give me the least value of |A-A'|. Positive / negative does not matter.
I know this is a lot to ask and really appreciate your consideration and help.</p>
https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?answer=13927#post-id-13927@Ishaq - if I understand your problem correctly you have 2 parameters and 4 variables (a, b, x, y) which vary in a certain range. Even if the number of possible values are limited, the number of possible combination is rather big.
I assume that a spreadsheet cannot handle this as you have only 3 dimensions (rows, columns and sheets or 1 sheet with a column or row)
I feel you need to create a macro with 3 - 4 loops covering dynamically the range of your parameters and variables. The macro needs to identify the combination you are looking for. A flowchart could possible help you to identify the macro structure you need.
Once you work on a macro and run into programming problems, place a question here. There are quite some macro experts around.Wed, 06 Mar 2013 14:04:32 +0100https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?answer=13927#post-id-13927Comment by ROSt52 for <p><a href="/en/users/1378/ishaq/">@Ishaq</a> - if I understand your problem correctly you have 2 parameters and 4 variables (a, b, x, y) which vary in a certain range. Even if the number of possible values are limited, the number of possible combination is rather big.</p>
<p>I assume that a spreadsheet cannot handle this as you have only 3 dimensions (rows, columns and sheets or 1 sheet with a column or row)</p>
<p>I feel you need to create a macro with 3 - 4 loops covering dynamically the range of your parameters and variables. The macro needs to identify the combination you are looking for. A flowchart could possible help you to identify the macro structure you need. </p>
<p>Once you work on a macro and run into programming problems, place a question here. There are quite some macro experts around.</p>
https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?comment=13933#post-id-13933what-if operations in Calc can handle only 2 variables, the same as in Excel. Wed, 06 Mar 2013 14:26:08 +0100https://ask.libreoffice.org/en/question/3363/automated-optimum-solution/?comment=13933#post-id-13933