-
Notifications
You must be signed in to change notification settings - Fork 1
/
gctoyinit.jl
71 lines (70 loc) · 3.03 KB
/
gctoyinit.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
########################################################################################################
### GCMMA-MMA-Julia ###
### ###
### This file is part of GCMMA-MMA-Julia. GCMMA-MMA-Julia is licensed under the terms of GNU ###
### General Public License as published by the Free Software Foundation. For more information and ###
### the LICENSE file, see <https://github.com/pollinico/GCMMA-MMA-Julia/blob/main/LICENSE>. ###
### ###
### The orginal work is written by Krister Svanberg in MATLAB. ###
### This is the Julia version of the code written by Nicolò Pollini. ###
### version 18-05-2023 ###
########################################################################################################
#-------------------------------------------------------------
#
# Copyright (C) 2009 Krister Svanberg
#
# This file, gctoyinit.m, is part of GCMMA-MMA-code.
#
# GCMMA-MMA-code is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of
# the License, or (at your option) any later version.
#
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# (file COPYING) along with this file. If not, see
# <http://www.gnu.org/licenses/>.
#
# You should have received a file README along with this file,
# containing contact information. If not, see
# <http://www.smoptit.se/> or e-mail [email protected] or [email protected].
#
#------
#
# Version September 2009.
#
# Some parameters and the starting point are defined
# for the "toy problem":
# minimize x(1)^2 + x(2)^2 + x(3)^2
# subject to (x(1)-5)^2 + (x(2)-2)^2 + (x(3)-1)^2 =< 9
# (x(1)-3)^2 + (x(2)-4)^2 + (x(3)-3)^2 =< 9
# 0 =< x(j) =< 5, for j=1,2,3.
#
#
m = 2
n = 3
epsimin = 0.0000001
xval = [4.0, 3.0, 2.0]
xold1 = copy(xval)
xold2 = copy(xval)
xmin = [0.0, 0.0, 0.0]
xmax = [5.0, 5.0, 5.0]
low = copy(xmin)
upp = copy(xmax)
c = [1000.0, 1000.0]
d = [1.0, 1.0]
a0 = 1;
a = [0.0, 0.0]
raa0 = 0.01
raa = 0.01*[1.0, 1.0]
raa0eps = 0.000001
raaeps = 0.000001*[1.0, 1.0]
outeriter = 0
maxoutit = 1
kkttol = 0
#
#---------------------------------------------------------------------