My Math Forum  

Go Back   My Math Forum > Science Forums > Computer Science

Computer Science Computer Science Forum


Thanks Tree2Thanks
  • 2 Post By DarnItJimImAnEngineer
Reply
 
LinkBack Thread Tools Display Modes
August 8th, 2019, 07:57 AM   #1
Member
 
Joined: Sep 2013

Posts: 91
Thanks: 2

How can you optimize when the constraint is a condition?

Hello

I want to minimize $-x_1*x_2*...*x_n$
The constraint is $c=0$. $c$'s value depends on the current $(x_1,...,x_n)$
If $c$ is not $0$, then $(x_1,...,x_n)$ is not a valid solution.
I have the formula to calculate $c$.
ricsi046 is offline  
 
August 8th, 2019, 12:25 PM   #2
Senior Member
 
Joined: Jun 2019
From: USA

Posts: 120
Thanks: 40

Depending on the form of c, one way is to rewrite the problem as an unconstrained function of (n-1) variables.

For example, to maximize $\displaystyle f(x_1,x_2,x_3) = x_1x_2x_3$ with the constraint $\displaystyle c=x_1+x_2+x_3=0$, you could rewrite this as maximizing $\displaystyle f(x_1,x_2) = x_1x_2(-x_1-x_2)$. Then just use your favourite optimization technique from there.

If c is not a "nice" function, though, then you may have to (re-)calculate $\displaystyle x_n$ and/or derivatives within optimization steps, or go to even more creative solutions.
Thanks from topsquark and ricsi046
DarnItJimImAnEngineer is offline  
Reply

  My Math Forum > Science Forums > Computer Science

Tags
condition, constraint, optimize



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how much should be spent on each to optimize output? puppypower123 Calculus 1 March 27th, 2017 03:51 PM
Optimize time between events. armagen Algebra 1 September 11th, 2013 04:01 PM
constraint problem helloprajna Economics 0 February 17th, 2013 11:04 PM
To draw function to optimize algebraico Linear Algebra 1 June 1st, 2011 08:47 AM
Derivative with a range constraint Gekko Calculus 3 June 12th, 2010 09:16 AM





Copyright © 2019 My Math Forum. All rights reserved.