How to solve Berlin Airlift Linear Optimization Problem

How to solve Berlin Airlift Linear Optimization Problem - Simplex LP - Messages

#1 Posted: 12/19/2017 10:01:12 AM
usamakhan

usamakhan

3 likes in 75 posts.

Group: User

How will you go about solving following problem in Smath

Problem statement is as follows:

Quote

On June 24, 1948, the former Soviet Union blocked all land and water routes through East Germany to Berlin. A gigantic airlift was organized using American and British planes to supply food, clothing and other supplies to more than 2 million people in West Berlin. The cargo capacity was 30,000 cubic feet for an American plane and 20,000 cubic feet for a British plane. To break the Soviet blockade, the Western Allies had to maximize cargo capacity, but were subject to the following restrictions: No more than 44 planes could be used. The larger American planes required 16 personnel per flight; double that of the requirement for the British planes. The total number of personnel available could not exceed 512. The cost of an American flight was $9000 and the cost of a British flight was $5000. The total weekly costs could note exceed $300,000. Find the number of American and British planes that were used to maximize cargo capacity.



Based on this the author & using an online LP solver I have:

http://prntscr.com/hpk4j5

#2 Posted: 12/19/2017 1:45:04 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

You can use the "simplex" package in Maxima (linear optimization)

See page Examples> Maxima usage> Linear optimization in the interactive handbook.

Example maxima linear optimization.png
Example maxima linear optimization.sm (41 KiB) downloaded 47 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Posted: 12/19/2017 9:12:22 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

How will you go about solving following problem in Smath



Maybe plot the problem 1rst ?
Next solve solely with Smath, whereas Maxima is not component of stable 6179.

CriticalRegion.PNG
#4 Posted: 12/20/2017 10:22:16 AM
usamakhan

usamakhan

3 likes in 75 posts.

Group: User

Thanks for the answers Jean would you be kind enough to attach the .sm file too. For field engineers like us your math skills seems rather cryptic & is digested properly after 2/3 days of experimenting
#5 Posted: 12/20/2017 11:59:15 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thanks for the answers Jean would you be kind enough to attach the .sm file too.


Here is + some extra stuff. Maybe there is way to draw an inscribed 3D ?

Jean

Solve GivenFind Critical Region Copy.sm (39 KiB) downloaded 46 time(s).

#6 Posted: 12/20/2017 7:59:09 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Using Smath Studio with Maxima and the example of Martin Kraska.

Metodo_Simplex.png

Metodo_Simplex.sm (52 KiB) downloaded 39 time(s).

Best Regards

Carlos


#7 Posted: 12/21/2017 3:27:26 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Here is a small and simple Simplex algorithm without the use of the Maxima function.


Small_Simplex_algorithm.png

Small_Simplex_Algorithm.sm (16 KiB) downloaded 40 time(s).

Best regards

Carlos


CAUTION: The algorithm is NOT TESTED, but it works well for this example.

It is necessary to refine it so that it work in all cases.
1 users liked this post
frapuano 12/21/2017 6:37:00 PM
#8 Posted: 12/21/2017 4:10:07 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Thanks Carlos for the "Simplex algo"
#9 Posted: 12/22/2017 1:40:32 AM
CBG

CBG

77 likes in 312 posts.

Group: User

A little Simplex algorithm improved


Small_Simplex_Algorithm_Improved.sm (88 KiB) downloaded 42 time(s).


Best regards

Carlos
#10 Posted: 12/22/2017 2:46:37 AM
CBG

CBG

77 likes in 312 posts.

Group: User

I'm sorry, I found a bug in the Simplex algorithm.

Now it's fixed.

Small_Simplex_Algorithm_Improved_2.sm (135 KiB) downloaded 54 time(s).


Best regards

Carlos
#11 Posted: 12/22/2017 10:12:27 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I'm sorry, I found a bug in the Simplex algorithm.



That huge number in the program, can be replaced by ∞ [Smath machine number]
RemToDo => check vs Mathcad
First A[i ... badly indexed.

Small_Simplex_Algorithm_Improved_2.sm (140 KiB) downloaded 48 time(s).

1 users liked this post
CBG 12/22/2017 12:54:00 PM
#12 Posted: 12/22/2017 12:57:52 PM
CBG

CBG

77 likes in 312 posts.

Group: User




Thanks Jean, Now we just have to continue testing the Simplex algorithm, to identify possible faults.

regards

Carlos
#13 Posted: 12/22/2017 1:38:07 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thanks Jean, Now we just have to continue testing the Simplex algorithm, to identify possible faults.



I have tested only this one => 1/1 Mathcad 11
Gorgeous, hope for more good !

Jean

Undocumented Copy.sm (25 KiB) downloaded 52 time(s).
  • New Posts New Posts
  • No New Posts No New Posts