473,700 Members | 2,538 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Quadratic Optimization Problem

Hi,

I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.

What are the possible choices to do this.

Thanks
Amit

Nov 21 '06 #1
3 5172
am***********@g mail.com wrote:
I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.

What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?

Stefan
Nov 22 '06 #2
Stefan Behnel wrote:
am***********@g mail.com wrote:
I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.

What are the possible choices to do this.

Too bad these homework assignments get trickier every time, isn't it?
I think this sarcasm is unjustified. It is not obvious to me that this
is a homework assignment.

The problem where constraints are linear and the objective function is
linear (quadratic) is known as linear (quadratic) programming, and
there are specialized codes for these problems. I don't know of
software in any language for the particular problem of a linear
objective function with quadratic constraints, so I would use a general
algorithm for nonlinearly constrained optimization. Maybe CVXOPT
http://www.ee.ucla.edu/~vandenbe/cvxopt/ will work for the OP -- I have
not tried it.

The site http://www.solver.com/probconic.htm calls the problem "conic
optimization".

A good newsgroup to ask about optimization algorithms is
sci.math.num-analysis.

Nov 22 '06 #3
thanks, I was actually looking for a package only in python to do this
which can solve it directly. Since my problem is a nonlinear convex
optimization problem, there are a number of algorithms to get it
solved.
I will try using CVXOPT package.

Beliavsky wrote:
Stefan Behnel wrote:
am***********@g mail.com wrote:
I need to do a quadratic optimization problem in python where the
constraints are quadratic and objective function is linear.
>
What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?

I think this sarcasm is unjustified. It is not obvious to me that this
is a homework assignment.

The problem where constraints are linear and the objective function is
linear (quadratic) is known as linear (quadratic) programming, and
there are specialized codes for these problems. I don't know of
software in any language for the particular problem of a linear
objective function with quadratic constraints, so I would use a general
algorithm for nonlinearly constrained optimization. Maybe CVXOPT
http://www.ee.ucla.edu/~vandenbe/cvxopt/ will work for the OP -- I have
not tried it.

The site http://www.solver.com/probconic.htm calls the problem "conic
optimization".

A good newsgroup to ask about optimization algorithms is
sci.math.num-analysis.
Nov 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2327
by: fb | last post by:
Hello everyone. I'm having a touch of trouble solving a problem using the quadratic formula. I get a domain error...Somewhere in the sqrt function I think. Could you guys give me a hint on what's up? Is there maybe some kind of standard Quadratic function hiding away in the libraries? That would be nice to have...Here's my source: /* Trying to calculate the real roots of "ax^2 + bx + c = 0" using the quadratic formula ...
6
1721
by: chronoxx251 | last post by:
Hi, I'm doing a school project where I need to make a program to calulate the quadratic equation. Now, I already got that part taken care of with the following code: #include "stdafx.h" #include "math.h" #include "stdlib.h" #using <mscorlib.dll> using namespace System;
6
14843
by: Trev17 | last post by:
Hello, I am new to C++ and i have tried for several hours to make a program my teacher has given me as a lab. Here is the Lab question: the roots of the quadratic equation ax^2 + bx + c = 0, a cannot equal 0 are given by the following formula -b + or - square root of (b^2 - 4ac) / 2a. If b^2 - 4ac = 0 then equation has a single root. if b^2 - 4ac > 0 then equation has two real roots. if b^2 - 4ac < 0 then equation has two complex...
2
2123
by: DaRok28 | last post by:
// Program Description: // This program solves quadratic equations to find their roots. This // program takes values of a, b, and c as input and outputs the root(s). // The user can repeat the calculation for as many equations as they like. #include <iostream> #include <cmath> #include <complex> using namespace std;
11
2904
by: luftikus143 | last post by:
Hi there, I have a nice collection of photos on my photoblog, for which I created as well an archive, which shows the last 50 or so photos at the same time. Now, I would like to have the photos displayed all in the same size (although they are originally in different sizes, some cropped, some landscape, some portrait). Is it possible via the use of CSS to "squeeze" the photos in for example a quadratic shape without deforming the...
2
2607
by: ioannoual | last post by:
Hi...I 'am new in C and I want a program that solves a quadratic equation!! I try something by my self to write some code about that but I want you to help me writing a new one that will work!! #include <stdio.h> #include <stdlib.h> #include <math.h>
1
2389
by: bbench123 | last post by:
Make a program that will ask for values of a quadratic equation (ax2+bx+c). the program must determine the roots of the equation using the quadratic equation determinants to distinguish if the roots are imaginary no. or real no. quadratic eq. x= -b sqrt b2-4ac/2a
1
3000
by: candacefaye1 | last post by:
1. write a C++ program to decide if the coefficients of a quadratic equation have real roots. The three choices will be to write the message “zero divide” when A is zero, write the message “no real roots” if the discriminant is negative and find the two roots when there is no error condition. DO NOT FIND THE ROOT IF THERE IS AN ERROR CONDITION. 2. use a NESTED DECISION to do the three parts of the algorithm above. 3. write a...
10
1566
by: bkustel | last post by:
I'm stuck on a problem where I want to use marshal for serialization (yes, yes, I know (c)Pickle is normally recommended here). I favor marshal for speed for the types of data I use. However it seems that marshal.dumps() for large objects has a quadratic performance issue which I'm assuming is that it grows its memory buffer in constant increments. This causes a nasty slowdown for marshaling large objects. I thought I would get around...
0
8726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8645
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7810
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4404
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3089
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2028
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.