Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
conveks
tutorials
Commits
b5b900b5
Commit
b5b900b5
authored
6 years ago
by
Erin Kuci
Browse files
Options
Downloads
Patches
Plain Diff
some cleaning
parent
8f0c0cdc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Lbracket/topo.py
+4
-10
4 additions, 10 deletions
Lbracket/topo.py
with
4 additions
and
10 deletions
Lbracket/topo.py
+
4
−
10
View file @
b5b900b5
...
...
@@ -3,8 +3,8 @@
#
import
numpy
as
np
import
conveks
import
onelab
import
conveks
c
=
onelab
.
client
(
__file__
)
...
...
@@ -92,13 +92,7 @@ conveks.mma.initialize(x, lowerBound, upperBound)
# Set appropriate options for MMA
conveks
.
mma
.
option
.
setNumber
(
'
General.Verbosity
'
,
4
)
conveks
.
mma
.
option
.
setNumber
(
'
General.SaveHistory
'
,
0
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.isRobustMoveLimit
'
,
1
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.isRobustAsymptotes
'
,
1
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.type
'
,
0
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.addConvexity
'
,
1
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.asymptotesRmax
'
,
100.0
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.asymptotesRmin
'
,
0.001
)
conveks
.
mma
.
option
.
setNumber
(
'
SubProblem.move
'
,
0.1
)
# Get iteration count (here it will be 1 - could be different in case of restart)
it
=
conveks
.
mma
.
getOuterIteration
()
...
...
@@ -112,7 +106,7 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st
attributes
=
{
'
Highlight
'
:
'
LightYellow
'
})
# get (copy of) current point
x
=
np
.
array
(
conveks
.
mma
.
getCurrentPoint
()
)
x
=
conveks
.
mma
.
getCurrentPoint
()
if
filtering
:
setElementTable
(
'
Optimization/Results/filterInput
'
,
elements
,
x
)
...
...
@@ -160,7 +154,7 @@ while change > maxChange and it <= maxIter and c.getString('topo/Action') != 'st
c
.
sendInfo
(
'
Optimization: it. {}, obj. {}, constr. {}, change {}
'
.
format
(
it
,
objective
,
constraints
[
0
],
change
))
# call MMA and update the current point
conveks
.
mma
.
setMoveLimits
(
lowerBound
,
upperBound
,
0.1
)
#
conveks.mma.setMoveLimits(lowerBound, upperBound, 0.1)
conveks
.
mma
.
updateCurrentPoint
(
constraints
,
grad_objective
,
grad_constraints
)
change
=
conveks
.
mma
.
getDesignChange
()
it
=
conveks
.
mma
.
getOuterIteration
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment