Displaying 20 results from an estimated 4000 matches similar to: "tiny typo in optim/N-M documentation (PR#1109)"
2007 Dec 22
1
using solve.qp without a quadratic term
I was playing around with a simple example using solve.qp ( function is in the quadprog package ) and the code is below. ( I'm not even sure there if there is a reasonable solution because I made the problem up ).
But, when I try to use solve.QP to solve it, I get the error that D in the quadratic function is not positive
definite. This is because Dmat is zero
because I don't have a
2023 Jan 30
1
[PATCH 01/23] block: factor out a bvec_set_page helper
Add a helper to initialize a bvec based of a page pointer. This will help
removing various open code bvec initializations.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
block/bio-integrity.c | 7 +------
block/bio.c | 12 ++----------
include/linux/bvec.h | 15 +++++++++++++++
3 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/block/bio-integrity.c
2003 Jun 02
1
Help with factorized argument in solve.QP
Hi
I'm having problems getting the "factorized" argument in solve.QP (part
of the quadprog library) to work as expected. The helpfile states that
when the factorized argument is set to TRUE, then the function requires
the inverse of a square-root factor of the Hessian instead of the
Hessian itself. That is, when factorized=TRUE, the Dmat argument should
be a matrix R^(-1), such
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
vDPA supports the possibility to use user VA in the iotlb messages.
So, let's add support for user VA in vringh to use it in the vDPA
simulators.
Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
---
Notes:
v3:
- refactored avoiding code duplication [Eugenio]
v2:
- replace kmap_atomic() with kmap_local_page() [see previous patch]
- fix cast warnings when
2007 Sep 03
2
The quadprog package
Hi everybody,
I'm using Windows XP Prof, R 2.5.1 and a Pentium 4 Processor.
Now, I want to solve a quadratic optimization program (Portfolio Selection) with the quadprog package
I want to minimize (\omega'%*%\Sigma%*%\omega)
Subject to
(1) \iota' %*% \omega = 1 (full investment)
(2) R'%*%\omega = \mu (predefined expectation value)
(3) \omega \ge 0 (no short sales).
Where
2010 Feb 19
1
Quadprog help
I am having some problems using Quadprog in R. I want to minimize the
objective function :
200*P1-1/2*10*P1^2+100*P2-1/2*5*P2^2+160*P3-1/2*8*P3^2+50*P4-1/2*10*P4^2+50*P
5-1/2*20*P5^2+50*P6-1/2*10*P6^2,
Subject to a set of constrains including not only the variables P1, P2, P3,
P4, P5, P6, but also the variables X1, X2,X3,X4,X5,X6,X7,X8,X9.
As the set of variables X's are not
2006 Jun 06
1
Problems using quadprog for solving quadratic programming problem
Hi,
I'm using the package quadprog to solve the following quadratic programming problem.
I want to minimize the function
(b_1-b_2)^2+(b_3-b_4)^2
by the following constraints b_i, i=1,...,4:
b_1+b_3=1
b_2+b_4=1
0.1<=b_1<=0.2
0.2<=b_2<=0.4
0.8<=b_3<=0.9
0.6<=b_4<=0.8
In my opinion the solution should be b_1=b_2=0.2 und b_3=b_4=0.8.
Unfortunately R doesn't find
2023 Mar 23
1
[PATCH v3 4/8] vringh: support VA with iotlb
On Tue, Mar 21, 2023 at 11:43?PM Stefano Garzarella <sgarzare at redhat.com> wrote:
>
> vDPA supports the possibility to use user VA in the iotlb messages.
> So, let's add support for user VA in vringh to use it in the vDPA
> simulators.
>
> Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
> ---
>
> Notes:
> v3:
> - refactored
2011 May 11
1
Problem with constrained optimization with maxBFGS
Dear all,
I need to maximize the v:
v= D' W D
D is a column vector ( n , 1)
W is a given matrix (n, n)
subject to:
sum D= 1
(BTW, n is less than 300)
I´ve tried to use maxBFGS, as follows:
#####################################
objectiveFunction<-function(x)
{
return(t(D)%*%W%*%D)
}
Amat<-diag(nrow(D))
Amat<-rbind((rep(-1, nrow(D))), Amat)
bvec<-matrix( c(0), nrow(D)+1,
2013 Mar 15
1
quadprog issues---how to define the constriants
Hi list:
This is my first time to post my question on the list. Thanks for your
help.
I am solving a quadratic programming using R. Here is my question:
w = arg min 0.5*w'Mw - w'N
s. t. sum(w) = 1;
w>0
note: w is weight vector, each w_i must >=0, and the sum of w =1.
Here is my R code:
A <-matrix(c(2.26,1.26,1.12,1.12,2.27,1.13,1.12,1.13,2.2),3,3);
B <-
2005 Jan 13
1
how to use solve.QP
At the risk of ridicule for my deficient linear algebra skills, I ask
for help using the solve.QP function to do portfolio optimization. I
am trying to following a textbook example and need help converting the
problem into the format required by solve.QP. Below is my sample code
if anyone is willing to go through it. This problem will not solve
because it is not set up properly. I hope I
2012 Nov 02
2
[PATCH] xen-blk: persistent-grants fixes
This patch contains fixes for persistent grants implementation v2:
* handle == 0 is a valid handle, so initialize grants in blkback
setting the handle to BLKBACK_INVALID_HANDLE instead of 0. Reported
by Konrad Rzeszutek Wilk.
* new_map is a boolean, use "true" or "false" instead of 1 and 0.
Reported by Konrad Rzeszutek Wilk.
* blkfront announces the
2010 Jul 23
1
(no subject)
Dear R list,
I use the constrOptim to maximize a function with four constriants but the answer does not leave from the starting value and there is only one outer iteration. The function is defined as follows:
tm<-function(p){
p1<-p[1]; p2<-p[2]; p3<-p[3];
p4<-1-p1-p2-p3;
p1*p2*p3*p4}
##the constraints are p1>=0; p2>=0; p3>=0 and p4>=0 i.e. p1+p2+p3<=1
2009 Feb 16
2
solve.QP with box and equality constraints
Dear list,
I am trying to follow an example that estimates a 2x2 markov transition
matrix across several periods from aggregate data using restricted least
squares.
I seem to be making headway using solve.QP(quadprog) as the unrestricted
solution matches the example I am following, and I can specify simple
equality and inequality constraints. However, I cannot correctly specify a
constraint
2010 Dec 04
1
Quadratic programming with semi-definite matrix
Hello.
I'm trying to solve a quadratic programming problem of the form min
||Hx - y||^2 s.t. x >= 0 and x <= t using solve.QP in the quadprog
package but I'm having problems with Dmat not being positive definite,
which is kinda okay since I expect it to be numerically semi-definite
in most cases. As far as I'm aware the problem arises because the
Goldfarb and Idnani method first
2007 Jul 10
2
integration over a simplex
Hello
The excellent adapt package integrates over multi-dimensional
hypercubes.
I want to integrate over a multidimensional simplex. Has anyone
implemented such a thing in R?
I can transform an n-simplex to a hyperrectangle
but the Jacobian is a rapidly-varying (and very lopsided)
function and this is making adapt() slow.
[
A \dfn{simplex} is an n-dimensional analogue of a triangle or
2002 Nov 22
1
simplex problem (PR#2317)
Full_Name: George F. LeCompte
Version: 1.6.1
OS: Windows 98
Submission from: (NULL) (208.8.162.161)
This may be a newbie problem. I am attempting tor unt the simplex routine from
the boot package. The example code doesn't find simplex. What's wrong here?
> help(simplex,package=boot)
> # from the resulting article
>
> # This example is taken from Exercise 7.5 of
2004 Jan 14
4
re hardware requirement - asterisk
I have just checked the Openbsd box on the if interface.
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:02:55:30:54:28
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::202:55ff:fe30:5428%fxp0 prefixlen 64 scopeid 0x1
xl0:
2023 Jan 30
2
[PATCH 22/23] vring: use bvec_set_page to initialize a bvec
Use the bvec_set_page helper to initialize a bvec.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/vhost/vringh.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 33eb941fcf1546..a1e27da544814a 100644
--- a/drivers/vhost/vringh.c
+++ b/drivers/vhost/vringh.c
@@ -1126,9 +1126,8 @@ static int
2009 Jun 19
2
Manipulate solution of simplex
Hi,
I need some help. I'm doing a project that demands me to obtain several
simplex solutions and I would like to can keep the solution in a vector or
something to be able to use it after I get it.
The comand simplex() prints the solution but how can I keep it?
Another alternative would be to export it to excel, how can I do this?
I just see the solution and have to note it on a paper or