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 OchkovVF  
#1 Posted : 26 March 2024 23:52:29(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 335
Man
Russian Federation

Was thanked: 24 time(s) in 23 post(s)
How can we solve this task in SMath?
3-mass.pdf (314kb) downloaded 38 time(s).

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

Offline StvMath  
#2 Posted : 09 April 2024 07:07:47(UTC)
StvMath


Rank: Advanced Member

Groups: Registered
Joined: 26/07/2022(UTC)
Posts: 35
United Kingdom
Location: UK

Was thanked: 21 time(s) in 18 post(s)
I decided to have some fun by trying to solve this using only SMath basic capabilities. I found it easier to turn everything upside-down (i.e. to pretend that gravity pulled up instead of down!) and only reverted to the normal view when plotting the position graphs.
I used an ultra-simple approach based on getting three sets of guesses for each mass coordinate and iterating until their differences were smaller than my specified tolerance. It’s crude, but it worked!
Life would be much simpler of course if SMath had its own minimize or maximize function.


3_weights_stvmath.sm (38kb) downloaded 13 time(s).
thanks 1 user thanked StvMath for this useful post.
on 09/04/2024(UTC)
Offline OchkovVF  
#3 Posted : 09 April 2024 09:08:28(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 335
Man
Russian Federation

Was thanked: 24 time(s) in 23 post(s)

>Life would be much simpler of course if SMath had its own minimize or maximize function...

...with constrains.
Offline OchkovVF  
#4 Posted : 09 April 2024 20:52:23(UTC)
OchkovVF


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 06/04/2023(UTC)
Posts: 335
Man
Russian Federation

Was thanked: 24 time(s) in 23 post(s)
3-mass.png
Offline StvMath  
#5 Posted : 09 April 2024 22:25:15(UTC)
StvMath


Rank: Advanced Member

Groups: Registered
Joined: 26/07/2022(UTC)
Posts: 35
United Kingdom
Location: UK

Was thanked: 21 time(s) in 18 post(s)
Originally Posted by: OchkovVF Go to Quoted Post



Yes. In the loop where it checks for unacceptable y2 values I should have added the line, msg:="Unacceptable y2 values. Try different initial guesses".
Additionally, by changing lambda = lambda/2 to lambda = -lambda, it seems to work ok!
If you change the initial guess for y2 to 11.5 it also works ok.


Note: The method is very crude. It won't work for more than three weights, for example, without significant modification.

Edited by user 10 April 2024 00:57:05(UTC)  | Reason: To correct error

Offline StvMath  
#6 Posted : 14 April 2024 05:07:21(UTC)
StvMath


Rank: Advanced Member

Groups: Registered
Joined: 26/07/2022(UTC)
Posts: 35
United Kingdom
Location: UK

Was thanked: 21 time(s) in 18 post(s)
I'm still playing with this example!

The attached uses a force-based approach, rather than an energy=based one.

I couldn't figure out how to use the in-built Jacobian functions for my forces function, so had to construct it by hand (luckily, it's a very simple task here).

3_weights_stvmath_b.sm (39kb) downloaded 15 time(s).
thanks 3 users thanked StvMath for this useful post.
on 14/04/2024(UTC),  on 14/04/2024(UTC),  on 14/04/2024(UTC)
Users browsing this topic
Guest
Similar Topics
Proper Keto Capsules UK [Updated 2024] Benefits, Working, Price & Purchase? (Questions)
by skinfixmix 20/04/2024 01:53:21(UTC)
Proper Keto Capsules UK Reviews: Work, Benefits, Order, Price & Ingredients? (Questions)
by skinfixmix 20/04/2024 01:48:38(UTC)
[OpenSuse] symbols not showing properly on screen (Bugs & Problems)
by charlamb 30/06/2022 21:49:24(UTC)
Arcade Games Improve Reflexes And Muscle Memory -gameeurope.com (Samples)
by te86ll001 08/04/2022 04:52:11(UTC)
UI not scaled properly on High DPI device (Bugs & Problems)
by AZot 21/02/2022 06:12:42(UTC)
some utilities for sections and geometric properties (Samples)
by churichuro 14/12/2021 21:15:02(UTC)
Structural Shape Property Extractor Plugin (Questions)
by HWDstorm 30/08/2021 06:12:42(UTC)
SMath won't input properly (Questions)
by Britt1 03/05/2019 16:54:42(UTC)
Meta Properties (Questions)
by Seçkin USLU 03/05/2019 13:35:34(UTC)
Bug - Examples - Properties of generic Polygons (Bugs & Problems)
by Alex M. 03/05/2019 00:01:18(UTC)
[Maple Wrapper] 6179 Improper parfrc (Bugs & Problems)
by Jean Giraud 26/01/2017 05:58:29(UTC)
How to Ensure if the Property is Actually Ready for Tenant or Not (Bugs & Problems)
by vivekeetrade 27/09/2016 13:20:03(UTC)
Tooltip doesn't show brackets properly (Bugs & Problems)
by mikekaganski 06/04/2016 04:18:08(UTC)
Prode Properties (Extensions)
by uni 22/06/2014 19:54:29(UTC)
the proper upkeep of the device (Extensions)
by amy 06/09/2013 12:45:58(UTC)
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.