Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline ioncube  
#1 Posted : 19 December 2017 16:01:12(UTC)
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 61
Man
Pakistan

Was thanked: 2 time(s) in 2 post(s)
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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 19 December 2017 19:45:04(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
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 (42kb) downloaded 23 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#3 Posted : 20 December 2017 03:12:22(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ioncube Go to Quoted Post
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
Offline ioncube  
#4 Posted : 20 December 2017 16:22:16(UTC)
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 61
Man
Pakistan

Was thanked: 2 time(s) in 2 post(s)
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 Good
Offline Jean Giraud  
#5 Posted : 20 December 2017 17:59:15(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: ioncube Go to Quoted Post
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 (40kb) downloaded 27 time(s).

Offline CBG  
#6 Posted : 21 December 2017 01:59:09(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Using Smath Studio with Maxima and the example of Martin Kraska.

Metodo_Simplex.png

Metodo_Simplex.sm (53kb) downloaded 23 time(s).

Best Regards

Carlos


Offline CBG  
#7 Posted : 21 December 2017 21:27:26(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Here is a small and simple Simplex algorithm without the use of the Maxima function.


Small_Simplex_algorithm.png

Small_Simplex_Algorithm.sm (17kb) downloaded 22 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.

Edited by user 21 December 2017 22:13:26(UTC)  | Reason: Not specified

thanks 1 user thanked CBG for this useful post.
on 22/12/2017(UTC)
Offline Jean Giraud  
#8 Posted : 21 December 2017 22:10:07(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Thanks Carlos for the "Simplex algo"
Offline CBG  
#9 Posted : 22 December 2017 07:40:32(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
A little Simplex algorithm improved


Small_Simplex_Algorithm_Improved.sm (89kb) downloaded 20 time(s).


Best regards

Carlos
Offline CBG  
#10 Posted : 22 December 2017 08:46:37(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
I'm sorry, I found a bug in the Simplex algorithm.

Now it's fixed.

Small_Simplex_Algorithm_Improved_2.sm (136kb) downloaded 32 time(s).


Best regards

Carlos
Offline Jean Giraud  
#11 Posted : 22 December 2017 16:12:27(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: CBG Go to Quoted Post
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 (141kb) downloaded 27 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 22/12/2017(UTC)
Offline CBG  
#12 Posted : 22 December 2017 18:57:52(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)



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

regards

Carlos
Offline Jean Giraud  
#13 Posted : 22 December 2017 19:38:07(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: CBG Go to Quoted Post
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 (26kb) downloaded 33 time(s).
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.