Click here to Skip to main content
15,845,909 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello everybody. I want to optimize a non-linear expression in Python that cannot be directly entered into the code initially. It needs to be calculated first through matrix operations and then optimized. This expression involves 20 or more variables. How can to accomplish this task in Python?

What I have tried:

I tried to solve this problem with GEKKO library but i was not successful.
Updated 5-Aug-23 9:48am
Richard MacCutchan 5-Aug-23 4:12am    
The first thing you need to do is to design the algorithm - that is the mathematics of the problem. Until you do that you are wasting your time thinking about Python.
aboueshaghi aboueshaghi 5-Aug-23 4:37am    
My problem is not about algorithm.
Richard MacCutchan 5-Aug-23 4:53am    
Well no one here can guess what it is about.

1 solution

How can solve nonlinear optimization problem in Python?

As is, you are looking for God's Algorithm. This secret algorithm works by just looking at the problem makes the solution jump to your face :)
You are careful to give extremely vague description of the problem which prevent any search on your problem.
Since your problem can be your understanding of the problem or of the GEKKO library, your question is a guessing game and in fact, no body can help you.

You need to do a precise describe of the problem you want to solve.
-Because we can check your understanding of the problem.
-With linear programming, there is ways to make linear a non linear problem.
-Because solutions to your problem can be known.
-Because the solution can be to create a custom algorithm.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900