ojalgo-user Mailing List for oj! Algorithms (Page 3)
Mathematics, linear algebra and optimisation
Brought to you by:
apete
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
(14) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2005 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
(8) |
Feb
(1) |
Mar
(2) |
Apr
(11) |
May
(6) |
Jun
|
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(4) |
Nov
|
Dec
(11) |
2008 |
Jan
(22) |
Feb
(4) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(6) |
Nov
(17) |
Dec
(5) |
2009 |
Jan
(15) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
(4) |
Jun
(5) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(14) |
Dec
|
2010 |
Jan
(3) |
Feb
(5) |
Mar
(2) |
Apr
(19) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
(7) |
Apr
(10) |
May
(1) |
Jun
(15) |
Jul
(1) |
Aug
|
Sep
|
Oct
(13) |
Nov
(9) |
Dec
(11) |
2012 |
Jan
|
Feb
(1) |
Mar
(9) |
Apr
(23) |
May
(16) |
Jun
(9) |
Jul
(13) |
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(12) |
Mar
(7) |
Apr
(24) |
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(16) |
Nov
(7) |
Dec
(3) |
2014 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
(2) |
2015 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(4) |
Sep
(6) |
Oct
(3) |
Nov
(15) |
Dec
(4) |
2016 |
Jan
(6) |
Feb
|
Mar
(18) |
Apr
(5) |
May
(9) |
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
(5) |
2017 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
(12) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(1) |
2018 |
Jan
(5) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(4) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vincent de C. C. <dec...@ya...> - 2017-02-15 22:45:21
|
Hey Anders, I was running some simulations and one of my covariance matrices was returning NaN everywhere.I was able to trace the issue back to one of my entries, which only has 2 elements in its CalendarDateSeries (compared to an average of 10 for all the other elements in the collection).When I add that calendarDateSeries to the collection that serves as parameter of the makeCovarianceMatrix in the FinanceUtils class, I get a covariance matrix that's made up of NaNs. Is there a constraint on the size of each CalendarDateSeries that make up the timeSeriesCollection?I'm using ojAlgo-40.0.4, although I was able to replicate the issue on version 42.0.0 of the jar. Thanks,Vince |
From: Anders P. <an...@op...> - 2017-01-21 09:02:22
|
The methods passMatching(…) in Access1D, Access2D, AccessAnyD, Mutate1D, Mutate2D and MutateAnyD as well as the interfaces Callback1D, Callback2D and CallbackAnyD have been deprecated. They were introduced with v41, but the design was a mistake. v42 will offer similar functionality some other way. /Anders > On 16 Jan 2017, at 13:11, Sree <tec...@gm...> wrote: > > Thanks Anders Peterson. > > I saw your reply from the daily digest mail. For some reason I'm not receiving mails from the list. > > Regards, > Sree > > On Mon, Jan 16, 2017 at 1:02 AM, Sree <tec...@gm...> wrote: > Hi, > > I'm trying ojAlgo for an ML module. I was looking for a function to do element-wise multiplication of two matrices or primitiveDenseStores, but could not find yet from the documentation. > > Can anyone please tell me how to do this or give pointers to documentation about this ? > > Regards > Sree > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Sree <tec...@gm...> - 2017-01-16 12:11:54
|
Thanks Anders Peterson. I saw your reply from the daily digest mail. For some reason I'm not receiving mails from the list. Regards, Sree On Mon, Jan 16, 2017 at 1:02 AM, Sree <tec...@gm...> wrote: > Hi, > > I'm trying ojAlgo for an ML module. I was looking for a function to do > element-wise multiplication of two matrices or primitiveDenseStores, but > could not find yet from the documentation. > > Can anyone please tell me how to do this or give pointers to documentation > about this ? > > Regards > Sree > > > |
From: Anders P. <an...@op...> - 2017-01-15 20:35:18
|
PrimitiveDenseStore store1 = …. PrimitiveDenseStore store2 = …. PrimitiveDenseStore store3 = store1.copy(); store3.modifyMatching(PrimitiveFunction.MULTIPLY, store2); or if it’s ok to modify one of the original matrices (store1 for example): store1.modifyMatching(PrimitiveFunction.MULTIPLY, store2); /Anders > On 15 Jan 2017, at 20:32, Sree <tec...@gm...> wrote: > > Hi, > > I'm trying ojAlgo for an ML module. I was looking for a function to do element-wise multiplication of two matrices or primitiveDenseStores, but could not find yet from the documentation. > > Can anyone please tell me how to do this or give pointers to documentation about this ? > > Regards > Sree > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Sree <tec...@gm...> - 2017-01-15 19:32:32
|
Hi, I'm trying ojAlgo for an ML module. I was looking for a function to do element-wise multiplication of two matrices or primitiveDenseStores, but could not find yet from the documentation. Can anyone please tell me how to do this or give pointers to documentation about this ? Regards Sree |
From: Anders P. <an...@op...> - 2016-12-10 15:23:27
|
If you get a NullPointerException you usually get s stacktrace that will tell you exactly where the problem occurred. Individual series have a firstKey and a lastKey (provided they contain any entries at all). In order to coordinate multiple series, the CoordinationSet must determine the latest/last firstKey and the earliest/first lastKey of all series. In your CoordinationSet (I guess) you’ve input a series that is empty. You do state that “My firstKey isn't null. Just the earliestFirstKey.” but did you check all the series. There would typically be more than one. /Anders > On 10 Dec 2016, at 15:05, Vincent de CHACUS C. <dec...@ya...> wrote: > > Hi Anders, > > In the prune method of the CoordinationSet Class, what's the difference between the earliestFirstKey and the firstKey? And, this may be a long shot, but what scenario in my dataset could cause the earliestFirstKey to be null? > > Note: My firstKey isn't null. Just the earliestFirstKey. > > Thanks, > Vince > > > > > > > To accomplish great things, we must not only act, but also dream; not only plan, but also believe > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today.http://sdm.link/xeonphi_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Vincent de C. C. <dec...@ya...> - 2016-12-10 14:20:25
|
Hi Anders, In the prune method of the CoordinationSet Class, what's the difference between the earliestFirstKey and the firstKey? And, this may be a long shot, but what scenario in my dataset could cause the earliestFirstKey to be null? Note: My firstKey isn't null. Just the earliestFirstKey. Thanks,Vince To accomplish great things, we must not only act, but also dream; not only plan, but also believe |
From: Anders P. <an...@op...> - 2016-12-02 09:00:26
|
Are you saying that you’ve successfully executed assignment problems with 8k binary variables using the ojAlgo solvers? If you want to try and reduce heap space you must first know what it consists of. Run a profiler to learn what is consuming the heap. Wy guess is that the design of the integer solver and how it interacts with the sub-solvers is not efficient enough for you. (maybe there’s something we can improve, and if you’ve already succeeded with 8k variables...) /Anders > On 2 Dec 2016, at 02:26, Karan Singh <kar...@gm...> wrote: > > I apologize for the typo - I meant 8K - 15K variables. 80K would be quite the problem! > > Thanks, > Karan > > On Thu, Dec 1, 2016 at 5:25 PM, Karan Singh <kar...@gm...> wrote: > Hello all, > > I'm working on a large (80K - 150K binary variables) general assignment problem with a few constraints & preferences. I am attempting to assign workers to shifts. > > The library has been working well for me, but I recently ran into heap space issue. I found that with 5000 variables, I require 2GB of heap space, and with 8000 variables, I require 4GB of heap space. This problem may scale in the future, so I'd like to limit heap space. > > Does anyone have any suggestions? I'd be happy with a slower solution, if there's a way to perhaps use less space. > > Thanks, > Karan > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Karan S. <kar...@gm...> - 2016-12-02 01:26:07
|
I apologize for the typo - I meant 8K - 15K variables. 80K would be quite the problem! Thanks, Karan On Thu, Dec 1, 2016 at 5:25 PM, Karan Singh <kar...@gm...> wrote: > Hello all, > > I'm working on a large (80K - 150K binary variables) general assignment > problem with a few constraints & preferences. I am attempting to assign > workers to shifts. > > The library has been working well for me, but I recently ran into heap > space issue. I found that with 5000 variables, I require 2GB of heap space, > and with 8000 variables, I require 4GB of heap space. This problem may > scale in the future, so I'd like to limit heap space. > > Does anyone have any suggestions? I'd be happy with a slower solution, if > there's a way to perhaps use less space. > > Thanks, > Karan > |
From: Karan S. <kar...@gm...> - 2016-12-02 01:25:16
|
Hello all, I'm working on a large (80K - 150K binary variables) general assignment problem with a few constraints & preferences. I am attempting to assign workers to shifts. The library has been working well for me, but I recently ran into heap space issue. I found that with 5000 variables, I require 2GB of heap space, and with 8000 variables, I require 4GB of heap space. This problem may scale in the future, so I'd like to limit heap space. Does anyone have any suggestions? I'd be happy with a slower solution, if there's a way to perhaps use less space. Thanks, Karan |
From: Anders P. <an...@op...> - 2016-10-21 06:53:46
|
There is (currently) no direct way to do that. The calculations are performed entirely using primitive double values, and the results can be extracted with decomp.getD() and decomp.getV() - returning primitive valued matrices. As a convenience utility there is an additional method getEigenvalues() that returns an array of complex numbers. These complex numbers are constructed from the elements of “D”. There is no corresponding method that would construct complex valued eigenvectors from “V”. If you add an issue at GitHub I’ll look into this (at some point) to see what can be done. https://github.com/optimatika/ojAlgo/issues If you know what to do then you can do it and supply a patch (pull request at GitHub) /Anders > On 21 Oct 2016, at 06:52, JUAN JOSE RENGIFO ALZATE <jua...@co...> wrote: > > Hi, I'm trying to compute complex eigenvectors from complex eigenvalues just like that: > > final double[][] tmpData = new double[][] {{1,0,3},{0,4,1},{-5,1,0}}; > final PrimitiveDenseStore storeR = PrimitiveDenseStore.FACTORY.rows(tmpData); > > final Eigenvalue<Double> Vector = Eigenvalue.PRIMITIVE.make(); > > final Double complejo = Vector.calculateDeterminant( storeR ); > > BasicLogger.debug( Vector.getV() ); > > but "Vector.getV()" are real values... How I can get complex eigenvectors from "storeR"? > > Thanks you. > > > > Ing.Juan José Rengifo > Universidad del Valle > Cali, Colombia. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: JUAN J. R. A. <jua...@co...> - 2016-10-21 05:21:43
|
Hi, I'm trying to compute complex eigenvectors from complex eigenvalues just like that: final double[][] tmpData = new double[][] {{1,0,3},{0,4,1},{-5,1,0}}; final PrimitiveDenseStore storeR = PrimitiveDenseStore.FACTORY.rows(tmpData); final Eigenvalue<Double> Vector = Eigenvalue.PRIMITIVE.make(); final Double complejo = Vector.calculateDeterminant( storeR ); BasicLogger.debug( Vector.getV() ); but "Vector.getV()" are real values... How I can get complex eigenvectors from "storeR"? Thanks you. Ing.Juan José Rengifo Universidad del Valle Cali, Colombia. |
From: Mx S. <mx....@gm...> - 2016-09-19 19:18:47
|
0,019750009624811 0,00175466355073697 0,00216556253052996 0,00125071462290962 0,00364760647631332 0,00325561914497165 0,00714103467551089 0,000105732745160433 -0,000479167839779001 0,00744235170691191 0,000921979436621203 -0,00332278446197061 0,00521465076317592 0,0019724693569441 0,00174285557276485 -0,000763855057151012 0,00350126966785379 0,00147465274214869 0,0095032430673567 0,00252916184383526 0,00646560384682098 0,00290858767542701 0,00506608697044073 0,00175466355073697 0,0047294034628479 -0,000190464224216538 -0,000608856650071748 0,00124978518577015 0,0012629303204284 0,000318567780456146 -0,000352414320999228 -0,000381263498991843 0,0013040324950695 -0,000687766389152601 0,00174156846138524 -0,00132575397946538 -0,000331785199120717 0,00211464994453612 -0,000600094298757554 0,00105965953691386 0,000869860131075283 0,00108401785091458 -0,000476222730586392 0,000115590657166315 0,00127235734375543 0,00072429866198209 0,00216556253052996 -0,000190464224216538 0,00411421707546878 0,000744175317356318 0,00140165355226072 0,0018659227649585 0,00167854681425379 7,053218556973E-05 -0,000264100927666965 0,00172279561173434 0,000650388878974787 0,000357697956048265 0,00258405816579283 -0,00105380999132927 0,00303429852679715 8,6446903670392E-05 0,0007289577291711 0,000153845575695673 0,00120468129506762 0,000438748589012335 0,00175408925830078 0,000314640075552325 0,000884221766409981 0,00125071462290962 -0,000608856650071748 0,000744175317356318 0,00912712971207441 0,00203518698173767 0,00345796379733683 0,00299193958894896 8,19697711876682E-05 -4,26454692954168E-05 0,000466482531747214 0,000449945611032161 -0,00090898395481263 0,00117234230975402 0,00320336470673809 0,00265674727153536 0,00112843528564613 0,00245030080238824 0,00176815743091756 0,00267145863581769 0,00611411709192834 0,00421771896776525 0,00139225277467335 0,00243620143884501 0,00364760647631332 0,00124978518577015 0,00140165355226072 0,00203518698173767 0,00466711753991201 0,00166549597340142 0,00300549714872028 0,00026449413215435 0,000213298509899806 0,00337895200473902 -5,85341406138671E-05 0,000207108419557681 -0,000126785379513136 -0,000844516611862874 0,00249646541099106 -0,00193115990419708 0,00175868303928449 0,000863708493458714 0,00253719390308466 0,00193021950913146 0,00164615298496011 0,00196888930071002 0,000974883223944492 0,00325561914497165 0,0012629303204284 0,0018659227649585 0,00345796379733683 0,00166549597340142 0,00599698443942367 0,00407697981277873 -9,3573090285483E-05 -7,52492532969867E-05 0,00215293136453347 0,00177697431916303 -0,000629903943237848 0,00190688229313999 0,00312642426526588 0,00231624040172106 0,000260255709724154 0,00377439184754812 0,000778922134541326 0,00362117011700829 0,00378038176775685 0,00379973492309016 0,00144302427744321 0,00449183433092118 0,00714103467551089 0,000318567780456146 0,00167854681425379 0,00299193958894896 0,00300549714872028 0,00407697981277873 0,00938362900232952 0,000255855917483139 1,91447164716347E-05 0,00439792659071636 0,00160498024599608 -0,00045178564593211 0,0029213444291076 0,00372275966309536 -0,000157964978935225 -0,00139720480418929 0,0026707362531838 0,000855776768802659 0,00348575247951218 0,00532591567142677 0,00295731483672988 0,00267015868023876 0,00337032544279448 0,000105732745160433 -0,000352414320999228 7,053218556973E-05 8,19697711876682E-05 0,00026449413215435 -9,3573090285483E-05 0,000255855917483139 0,00015464620731998 8,40157580344946E-05 0,000388654098977075 -5,92107722172488E-05 -0,000113420792619777 -4,8153547663352E-05 1,82990391535021E-05 -0,000235413250600422 -0,000291789129810398 -1,6583244664667E-05 -0,000224958267090671 0,000112957885351002 0,000118786403072708 1,03891717044691E-05 -0,000267662527821457 2,29219420427059E-05 -0,000479167839779001 -0,000381263498991843 -0,000264100927666965 -4,26454692954168E-05 0,000213298509899806 -7,52492532969867E-05 1,91447164716347E-05 8,40157580344946E-05 0,00022350245489753 0,000271413194612812 -1,31415878845261E-05 -0,000322975945861095 -0,000361948124874835 9,16242968538021E-05 -0,000316360051620407 -9,38844334275005E-05 -0,000200189449955776 -0,000196315946599505 5,39262430398634E-05 7,43520573064079E-05 -0,000214560353320312 -0,000176417524073362 -0,000168154990969744 0,00744235170691191 0,0013040324950695 0,00172279561173434 0,000466482531747214 0,00337895200473902 0,00215293136453347 0,00439792659071636 0,000388654098977075 0,000271413194612812 0,00818729999345717 0,00114225335155235 -0,00148971294640025 0,00278156922852349 -0,000154038069241823 0,00125383912787536 -0,000466784977919902 0,00208715872764619 0,0012172340673978 0,00515538092017819 0,00330766996424642 0,00123381313453489 0,0033380067815542 0,00275062233591379 0,000921979436621203 -0,000687766389152601 0,000650388878974787 0,000449945611032161 -5,85341406138671E-05 0,00177697431916303 0,00160498024599608 -5,92107722172488E-05 -1,31415878845261E-05 0,00114225335155235 0,00260280272444897 -0,000287946470586474 0,00230926464466546 0,00191154601039561 0,000767064068558998 0,000972511033189553 0,00161181271188339 0,000795041600555817 0,00027262891056208 0,00311360511619617 0,000716313326754343 0,00347422550231333 0,00182619575727404 -0,00332278446197061 0,00174156846138524 0,000357697956048265 -0,00090898395481263 0,000207108419557681 -0,000629903943237848 -0,00045178564593211 -0,000113420792619777 -0,000322975945861095 -0,00148971294640025 -0,000287946470586474 0,00432379919458237 -0,00224354314853354 -0,000773594905219493 0,00142746451480471 -0,000522997407250408 -3,46749383828184E-05 0,000246832345660205 -0,00282870910749968 -0,000442018745771302 -0,00253641389194201 -0,000789542675928443 -0,00165056524024003 0,00521465076317592 -0,00132575397946538 0,00258405816579283 0,00117234230975402 -0,000126785379513136 0,00190688229313999 0,0029213444291076 -4,8153547663352E-05 -0,000361948124874835 0,00278156922852349 0,00230926464466546 -0,00224354314853354 0,00778936017597851 0,00181626540160626 0,00184945312674354 0,00217461463331026 0,000957906628512953 3,84634835454537E-05 0,00309637059867406 0,00561434053661901 0,00340464518359497 0,00416950770242309 0,00287651962463621 0,0019724693569441 -0,000331785199120717 -0,00105380999132927 0,00320336470673809 -0,000844516611862874 0,00312642426526588 0,00372275966309536 1,82990391535021E-05 9,16242968538021E-05 -0,000154038069241823 0,00191154601039561 -0,000773594905219493 0,00181626540160626 0,00740940046951388 -0,000471790533890038 0,00132558595200945 0,00144254503569297 -3,33820594580286E-05 0,00258320072683565 0,00522214268429391 0,00289361368153113 0,00340400928829166 0,0024971749081462 0,00174285557276485 0,00211464994453612 0,00303429852679715 0,00265674727153536 0,00249646541099106 0,00231624040172106 -0,000157964978935225 -0,000235413250600422 -0,000316360051620407 0,00125383912787536 0,000767064068558998 0,00142746451480471 0,00184945312674354 -0,000471790533890038 0,0102493314243506 0,000333177206210812 0,00215725494360193 0,000451756689162533 0,00118816756996775 0,000978861888952297 0,0042791542395833 0,0022795402806531 0,00191647815573794 -0,000763855057151012 -0,000600094298757554 8,6446903670392E-05 0,00112843528564613 -0,00193115990419708 0,000260255709724154 -0,00139720480418929 -0,000291789129810398 -9,38844334275005E-05 -0,000466784977919902 0,000972511033189553 -0,000522997407250408 0,00217461463331026 0,00132558595200945 0,000333177206210812 0,00549571851735916 -0,000346431308323328 0,00167509829405457 0,00140413237981294 0,00132034644308908 -2,66194465135997E-05 0,00181207485835634 -0,000434093418100398 0,00350126966785379 0,00105965953691386 0,0007289577291711 0,00245030080238824 0,00175868303928449 0,00377439184754812 0,0026707362531838 -1,6583244664667E-05 -0,000200189449955776 0,00208715872764619 0,00161181271188339 -3,46749383828184E-05 0,000957906628512953 0,00144254503569297 0,00215725494360193 -0,000346431308323328 0,00471436100008008 0,00164875562033123 0,00330020009273037 0,00474106720955189 0,00304780943428587 0,00227498325900189 0,00364637115202556 0,00147465274214869 0,000869860131075283 0,000153845575695673 0,00176815743091756 0,000863708493458714 0,000778922134541326 0,000855776768802659 -0,000224958267090671 -0,000196315946599505 0,0012172340673978 0,000795041600555817 0,000246832345660205 3,84634835454537E-05 -3,33820594580286E-05 0,000451756689162533 0,00167509829405457 0,00164875562033123 0,00498996394459553 0,00229986708460562 0,00422936296920683 0,000887116189235993 0,00422842071068081 -0,000439510846435022 0,0095032430673567 0,00108401785091458 0,00120468129506762 0,00267145863581769 0,00253719390308466 0,00362117011700829 0,00348575247951218 0,000112957885351002 5,39262430398634E-05 0,00515538092017819 0,00027262891056208 -0,00282870910749968 0,00309637059867406 0,00258320072683565 0,00118816756996775 0,00140413237981294 0,00330020009273037 0,00229986708460562 0,0100157125368336 0,00578174521600904 0,00577142024745677 0,00371752476024466 0,00300413825901375 0,00252916184383526 -0,000476222730586392 0,000438748589012335 0,00611411709192834 0,00193021950913146 0,00378038176775685 0,00532591567142677 0,000118786403072708 7,43520573064079E-05 0,00330766996424642 0,00311360511619617 -0,000442018745771302 0,00561434053661901 0,00522214268429391 0,000978861888952297 0,00132034644308908 0,00474106720955189 0,00422936296920683 0,00578174521600904 0,0263104152924388 0,00424099184961512 0,010762472828664 0,00295235008355632 0,00646560384682098 0,000115590657166315 0,00175408925830078 0,00421771896776525 0,00164615298496011 0,00379973492309016 0,00295731483672988 1,03891717044691E-05 -0,000214560353320312 0,00123381313453489 0,000716313326754343 -0,00253641389194201 0,00340464518359497 0,00289361368153113 0,0042791542395833 -2,66194465135997E-05 0,00304780943428587 0,000887116189235993 0,00577142024745677 0,00424099184961512 0,00938800632734299 0,00292718967497603 0,0030255433293519 0,00290858767542701 0,00127235734375543 0,000314640075552325 0,00139225277467335 0,00196888930071002 0,00144302427744321 0,00267015868023876 -0,000267662527821457 -0,000176417524073362 0,0033380067815542 0,00347422550231333 -0,000789542675928443 0,00416950770242309 0,00340400928829166 0,0022795402806531 0,00181207485835634 0,00227498325900189 0,00422842071068081 0,00371752476024466 0,010762472828664 0,00292718967497603 0,0159536920797698 0,000726570750554582 0,00506608697044073 0,00072429866198209 0,000884221766409981 0,00243620143884501 0,000974883223944492 0,00449183433092118 0,00337032544279448 2,29219420427059E-05 -0,000168154990969744 0,00275062233591379 0,00182619575727404 -0,00165056524024003 0,00287651962463621 0,0024971749081462 0,00191647815573794 -0,000434093418100398 0,00364637115202556 -0,000439510846435022 0,00300413825901375 0,00295235008355632 0,0030255433293519 0,000726570750554582 0,00629851693608689 |
From: Anders P. <an...@op...> - 2016-09-12 18:17:40
|
> On 11 sep. 2016, at 20:23, Max Muraz <mx....@gm...> wrote: > > I have finished a part of my tests between Version 37 and 40.0.4 . > Here are my results. > > The 40.0.4 version had performance problems with covariance matrix not positive define. Version 37 not. > I don't knew that I had to pass as input a matrix positive define. A positive (semi) definite covariance matrix has always been a requirement. The underlying optimisation solvers do however try to be lenient and return a solution if at all possible. It seems earlier versions were more forgiving, and I’m not sure exactly what to do to restore that. In finance a covariance matrix should be positive definite for other/more reasons. Negative eigenvalues implies negative risk, and that’s not possible. Using historical data to calculate returns, correlations and covariances does not produce a god given truth. > To test if matrix is positive define I used the Cholesky Decomposition and in case that the matrix is not positive definite I tried using MarketEquilibrium.clean ( ). Why not always clean the covariance matrix? … or assert nonnegative eigenvalues some other way. > I sent as attachments .txt files that I used as parameters of MarketEquilibrium and MarkowitzModel class, including result weight vectors for both version 37 and 40.0.4, the results are very closed, but different, in the 40.0.4 version there are also negative and very small elements. The weights from v37 looks a little too perfect to come straight from the solver. They must have been rounded somewhere along the way. The MarkowitzModel does (again) contain a filter to remove negative weights, but other rounding errors from the solver are propagated as is. (I thought v40.0.4 had that filter already, but I’ve now uploaded v40.0.5.) If you call the normalise() method on any FinancePortfolio instance you’ll get nicely rounded weights that sum to 1.0 exactly. /Anders > I hope it is of your interest. > Thank you for your kind help and support. > > Max Muraz > > <0_CovarianceMatrix.txt><0_ExpectedReturns.txt><0_Limits.txt><0_RiskAversionFactor.txt><37_Results.txt><40_Results.txt>------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Max M. <mx....@gm...> - 2016-09-11 18:23:29
|
0,0035178438151699 0,000101410123057189 0,00106870547818807 0,000101410123057189 0,000141045405620333 0,00120470149818709 0,00133087575144644 0,00215877383127222 0,00215764134399045 0,00110855188776368 0,00102892474174338 0,00126778099488015 0,000785145443670699 0,000101410123057189 0,000155195068874756 0,000101904686767257 0,000155195068874756 0,000103422826938152 1,96568795839746E-05 5,61028130251333E-05 4,9040431908748E-05 4,34869302075396E-05 -0,000164420938095398 9,7992209205646E-05 -1,98637398915335E-05 0,000154119165427 0,00106870547818807 0,000101904686767257 0,00136889352534327 0,000101904686767257 0,000172628766487192 0,000899852358344051 0,00106078412325279 0,000852673729017799 0,00068763407886718 0,000831340783245313 0,00114795082710781 0,000841107829576246 0,000731486751144979 0,000101410123057189 0,000155195068874756 0,000101904686767257 0,000155195068874756 0,000103422826938152 1,96568795839746E-05 5,61028130251333E-05 4,9040431908748E-05 4,34869302075396E-05 -0,000164420938095398 9,7992209205646E-05 -1,98637398915335E-05 0,000154119165427 0,000141045405620333 0,000103422826938152 0,000172628766487192 0,000103422826938152 0,000121583191381422 5,17434465827004E-05 7,68258716446709E-05 6,81673572885394E-05 5,51166244092365E-05 -3,00129264161304E-05 0,000115076136888554 4,24743220928861E-05 0,000108209627554975 0,00120470149818709 1,96568795839746E-05 0,000899852358344051 1,96568795839746E-05 5,17434465827004E-05 0,00127834749411839 0,00126480494798728 0,00139011350523315 0,000905963495645495 0,00160655691186299 0,000777024725243201 0,001229085836563 0,000327584327658812 0,00133087575144644 5,61028130251333E-05 0,00106078412325279 5,61028130251333E-05 7,68258716446709E-05 0,00126480494798728 0,00249775283915757 0,00130203246670336 0,000961047879497715 0,00142466560651224 0,00114588174481377 0,00105513251648879 0,000747251029895298 0,00215877383127222 4,9040431908748E-05 0,000852673729017799 4,9040431908748E-05 6,81673572885394E-05 0,00139011350523315 0,00130203246670336 0,00238289519772117 0,00155695356855585 0,00186132605969493 0,000768945150738431 0,00162328351228707 0,000286963240881594 0,00215764134399045 4,34869302075396E-05 0,00068763407886718 4,34869302075396E-05 5,51166244092365E-05 0,000905963495645495 0,000961047879497715 0,00155695356855585 0,00165089903906648 0,000751252400843951 0,000695490959763478 0,000765679809643136 0,000561281012252382 0,00110855188776368 -0,000164420938095398 0,000831340783245313 -0,000164420938095398 -3,00129264161304E-05 0,00160655691186299 0,00142466560651224 0,00186132605969493 0,000751252400843951 0,00430525245150516 0,000356130464146851 0,00284147607933836 -0,000785823591443783 0,00102892474174338 9,7992209205646E-05 0,00114795082710781 9,7992209205646E-05 0,000115076136888554 0,000777024725243201 0,00114588174481377 0,000768945150738431 0,000695490959763478 0,000356130464146851 0,0012140487282245 0,000423496060162502 0,00104342612816484 0,00126778099488015 -1,98637398915335E-05 0,000841107829576246 -1,98637398915335E-05 4,24743220928861E-05 0,001229085836563 0,00105513251648879 0,00162328351228707 0,000765679809643136 0,00284147607933836 0,000423496060162502 0,0026031840493369 -0,000492839785575952 0,000785145443670699 0,000154119165427 0,000731486751144979 0,000154119165427 0,000108209627554975 0,000327584327658812 0,000747251029895298 0,000286963240881594 0,000561281012252382 -0,000785823591443783 0,00104342612816484 -0,000492839785575952 0,00138651201347318 |
From: Massimo M. <mx....@gm...> - 2016-09-10 07:36:31
|
I apologize, but this message has been inserted from Gmail in spam and I read it just now . I'll try as soon your advices and if I have still problems I'll try to translate the .net code in Java to explain better and sending of ojAlgo - user. Have a nice weekend. Massimo Murazzano. 2016-09-08 17:25 GMT+02:00 Anders Peterson <an...@op...>: > You can also try to turn on model validation: > > tmpMarkowitzModel.optimisation().validate(true); > > and if it indicates there is a problem with the covariance matrix not > being positive definite you need to fix that. Calling the clean() method on > MarketEquilibrium is one way to to that. > > > /Anders > > > > > On 31 aug. 2016, at 18:18, Massimo Murazzano <mx....@gm...> > wrote: > > > > In these days I'm comparing ojAlgo 3.7 with 4..0. I send you as > attachments the inputs (text files separated by tabs) that are completed > within a reasonable time by version 3.7 and not by 4.0. > > Max Muraz. > > > > <CovarianceMatrix.txt><ExpectedReturns.txt><Limits. > txt><RiskAversionFactor.txt>-------------------------------- > ---------------------------------------------- > > _______________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > ------------------------------------------------------------ > ------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > |
From: Anders P. <an...@op...> - 2016-09-08 15:25:23
|
You can also try to turn on model validation: tmpMarkowitzModel.optimisation().validate(true); and if it indicates there is a problem with the covariance matrix not being positive definite you need to fix that. Calling the clean() method on MarketEquilibrium is one way to to that. /Anders > On 31 aug. 2016, at 18:18, Massimo Murazzano <mx....@gm...> wrote: > > In these days I'm comparing ojAlgo 3.7 with 4..0. I send you as attachments the inputs (text files separated by tabs) that are completed within a reasonable time by version 3.7 and not by 4.0. > Max Muraz. > > <CovarianceMatrix.txt><ExpectedReturns.txt><Limits.txt><RiskAversionFactor.txt>------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Anders P. <an...@op...> - 2016-08-31 21:02:26
|
Why don’t you supply a test case (Java code) that demonstrates the problem? While you’re testing you may try te latest snapshot available at SourceForge https://sourceforge.net/projects/ojalgo/files/ojAlgo/snapshot/ or just grab the latest source code from GitHub. /Anders > On 31 aug. 2016, at 18:18, Massimo Murazzano <mx....@gm...> wrote: > > In these days I'm comparing ojAlgo 3.7 with 4..0. I send you as attachments the inputs (text files separated by tabs) that are completed within a reasonable time by version 3.7 and not by 4.0. > Max Muraz. > > <CovarianceMatrix.txt><ExpectedReturns.txt><Limits.txt><RiskAversionFactor.txt>------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Massimo M. <mx....@gm...> - 2016-08-31 16:18:13
|
0,000487601089241623 0,000631604430630208 0,000621368777820266 0,000742427006302829 0,00068122689134116 0,000789206798305634 0,000683683613696676 0,000687661895645498 0,000238959785321438 0,000279918436342689 0,000272025100568901 0,000664796782878292 0,000164094988815526 0,000597601366004976 0,000569270430044402 0,000104070389807836 0,000119496465389096 9,67483895801035E-05 0,000422560407779765 0,0007582486272505 0,000614066180923804 0,000711209353198254 8,24212453660659E-05 0,000639000333556505 0,000218805874824061 0,00041389208262405 0,000668827961332593 8,24212453660659E-05 0,000873509128389056 0,000116359963006302 0,000649504609035056 0,000529625045886742 0,000630555385091813 0,00063982887633911 0,00063859339365675 0,000707071782542029 0,000577813957771789 0,000680313162473287 0,000581024966113138 0,000386703586971035 0,000483597168857905 0,000679806747470131 0,000882671917815686 0,000679407617077815 0,000639309565703662 0,000552096867603331 0,000781301128698278 0,0002642908074645 0,000631604430630208 0,00147951385749842 0,00134378223337963 0,00131557999186405 0,00138618139082027 0,00148117968663547 0,00138432561878841 0,00138859513925371 0,000114435996375478 -8,92385846561403E-06 0,000422829206284932 0,00152364734938035 0,000175958232057837 0,00122858163360488 0,00135858514917049 -0,000148975602271743 0,000204984198529963 0,000129492314428724 0,000838930508449987 0,00160730934379274 0,000690471700248562 0,000941242723363806 4,30529672399825E-05 0,00129276345169245 -7,9232968474346E-05 0,000492494196522148 0,00158658571500059 4,30529672399825E-05 0,00204332694568971 6,88698810854085E-05 0,00120414378597837 0,000962861215731407 0,00102253612597961 0,00108242312733747 0,00129186509560047 0,0014217479664947 0,000692469285980028 0,00152806195326891 0,00106838968990871 0,000352340313031378 0,00102013568322743 0,00175998179000798 0,00217448194187171 0,00121727891519988 0,00160960444328661 0,000736722270195727 0,00175461887963285 9,01528587122137E-06 0,000621368777820266 0,00134378223337963 0,00181000554899243 0,00148176666145079 0,00158443193239041 0,00161599332647429 0,00157737804230179 0,00157592017462311 1,90290072207195E-05 -0,000182121504462385 0,000419330295977905 0,00200974618406538 0,000197103768927758 0,00119466532020682 0,00180772220814152 -0,000276484362972349 0,00027436450957863 0,000143419027767828 0,000952210819789825 0,00195621331228654 0,000581700899251342 0,000849041556669007 8,16853025376856E-05 0,00131852528012352 -0,000342502442435393 0,000452915888776941 0,00200714199919812 8,16853025376856E-05 0,00235068050869984 8,66652406842024E-05 0,00140766285943201 0,000819330261450403 0,000956825912126404 0,000962434806456691 0,00131765638898014 0,00151273020114811 0,000552787719163106 0,00192189720801134 0,000990638844474813 0,000213656916374671 0,00134851586068643 0,00205886360784247 0,0024966943673718 0,00150736170022893 0,00207201984386887 0,000708825121926238 0,00180535820086033 -0,000216885750127966 0,000742427006302829 0,00131557999186405 0,00148176666145079 0,00186767647309486 0,00151309951008958 0,00193832376239825 0,00160755668091413 0,00161131602149096 0,000220825367041563 8,76272813194011E-05 0,000424877946912343 0,00172872789672101 0,000216836739666154 0,00127440420810725 0,00150313164601811 -0,000138920211495205 0,000219005557569548 0,000122958908023512 0,000910875443118023 0,0018227256701026 0,000745827036330196 0,0010127947921004 4,69530345850132E-05 0,00121634770420468 -6,03152342133946E-05 0,000611503480643589 0,00176099422467957 4,69530345850132E-05 0,00219311887207841 9,98490321612188E-05 0,00146241167775456 0,000936094150067187 0,00105622822161108 0,00104846734572833 0,00121548057232632 0,00139876138461441 0,000683998168813076 0,00175704472013326 0,00104334019578726 0,000471418717701885 0,00121818110504887 0,00179815166536076 0,00224176080523039 0,00155142176686466 0,00178124959023749 0,000850198579073605 0,0016773740126183 9,20499058577588E-05 0,00068122689134116 0,00138618139082027 0,00158443193239041 0,00151309951008958 0,00174965220011287 0,00167080384994283 0,00167993710923404 0,00167711896191124 0,000103845489926843 -5,36810317704472E-05 0,000450224396647253 0,00185334511183425 0,000236265366270298 0,0012075029359218 0,00164040032996303 -0,000204898258851908 0,000266774371534958 0,000147077373000532 0,0009203819654117 0,00190208124934724 0,000584127086000511 0,00103740093239099 6,98898398500381E-05 0,00143373853275403 -0,000220881970941606 0,000525321510474134 0,00192382017318265 6,98898398500381E-05 0,00224230782607917 0,000117105797159217 0,0014756591381543 0,00101284239970565 0,00103718285153295 0,00106531619018123 0,00143277102783223 0,0015370950438803 0,000676457169134534 0,00178024434174423 0,00114718521031902 0,000325647235171323 0,00121116968308237 0,00203416735596274 0,00236453296141066 0,00153437464028934 0,00192777454880703 0,000760370707943753 0,00180562533660176 -8,14207791094615E-05 0,000789206798305634 0,00148117968663547 0,00161599332647429 0,00193832376239825 0,00167080384994283 0,00221427214433314 0,00177335607307523 0,00177189301034733 0,000178917609903355 -4,2593988268183E-05 0,000472952620854783 0,00199632016567851 0,000230377047948814 0,00150389081931024 0,0017276715723928 -0,000250928002642186 0,00024877768862295 0,000120334436285065 0,000984727381022637 0,00202608230976586 0,000841493373549693 0,00104842863129885 3,04090376558435E-05 0,00136532823898447 -0,00019211101600503 0,000598208530796607 0,0020073660419502 3,04090376558435E-05 0,00262411314864224 8,50518597294384E-05 0,00158809980765384 0,000990672897724947 0,00104322624747807 0,00116912268511911 0,00136437990026689 0,00154367428830483 0,000772579984302665 0,00198734766902922 0,001123776911705 0,000393709445716261 0,0013655020930278 0,00204551833829265 0,00272933928658285 0,00170525665219367 0,00209097319591665 0,000864634332456887 0,00187892814494349 -5,10202423791498E-05 0,000683683613696676 0,00138432561878841 0,00157737804230179 0,00160755668091413 0,00167993710923404 0,00177335607307523 0,00181013180466968 0,00179304143430811 8,31430150375595E-05 -0,000134653517721278 0,00045793505436776 0,00196934602666392 0,000247057245000454 0,00121937451737914 0,00173255300036082 -0,000224278726689088 0,000258350943109405 0,000144398292156293 0,000944146573304296 0,00199540426562258 0,000630897334982424 0,00101524604741857 6,96795964992169E-05 0,00133216847686012 -0,000280681947669949 0,000485830821211829 0,00204383171773354 6,96795964992169E-05 0,0024242429243952 0,000111251234178526 0,00151805531266209 0,000969494346842419 0,000981546502420792 0,00107097925058328 0,00133120051547992 0,00150631110318599 0,000672894407148898 0,00179948034336807 0,00109395412215002 0,000288086073725686 0,00129684945719883 0,00210459958755247 0,00240194702689565 0,00162311823600657 0,00213292998110661 0,000725497151269495 0,00183138813358795 -0,000129819792557216 0,000687661895645498 0,00138859513925371 0,00157592017462311 0,00161131602149096 0,00167711896191124 0,00177189301034733 0,00179304143430811 0,00178998647087257 9,74238149655551E-05 -0,000103006505038059 0,000460566347680157 0,00196279615787986 0,000251041026924718 0,00121294020038258 0,0017356941690807 -0,000210218214112181 0,000256748329288081 0,000145758675283978 0,000940256714174002 0,00198469935064035 0,000637277664783566 0,00102576875404981 6,91486758214648E-05 0,00134931575768578 -0,000252283135854512 0,000508279354696116 0,00203443841537 6,91486758214648E-05 0,00240517972471709 0,000111711529742093 0,00151592129134859 0,000980353333462224 0,000987461649976625 0,001071864748673 0,00134834322383616 0,00150396688017965 0,000681688010696041 0,00179503057079108 0,00110302424898544 0,000312372757204209 0,00128656767371634 0,00209780849275344 0,00239691894626533 0,00162267787708764 0,00211061643650523 0,00073371546974508 0,00182592489489489 -0,00010374189203554 0,000238959785321438 0,000114435996375478 1,90290072207195E-05 0,000220825367041563 0,000103845489926843 0,000178917609903355 8,31430150375595E-05 9,74238149655551E-05 0,000483533883084624 0,000646852848804239 0,000155001855200304 -7,82166505246431E-05 0,000138580560151035 0,000111226554803464 -0,000133261712064766 0,000384656346428819 2,71525439066912E-05 7,7142257327032E-05 9,06703720817551E-05 -2,86721770593673E-05 0,000537518946079271 0,000420938509413019 9,66931140016357E-05 0,000253362730088112 0,000549878072810674 0,000490482093321302 -7,37957805265549E-05 9,66931140016357E-05 -0,000153016922245707 0,00014806089654017 0,000119569509214046 0,000308985498016999 0,000360001805772924 0,000330059021636918 0,000253206862300697 0,000181192857234096 0,000464486710121717 -5,47581821377673E-05 0,00025045304910675 0,000539639769374446 2,00138132029926E-05 -0,000119415083305661 -0,000190752796243412 9,99780851989063E-05 -0,000175752177022027 0,000410453569059743 7,19575795786844E-05 0,000588148991103677 0,000279918436342689 -8,92385846561403E-06 -0,000182121504462385 8,76272813194011E-05 -5,36810317704472E-05 -4,2593988268183E-05 -0,000134653517721278 -0,000103006505038059 0,000646852848804239 0,00123981256465342 0,000156557586244475 -0,00042195871644986 0,000173499499889306 -0,000172514756373661 -0,00041008438938873 0,00066421352458636 -8,89100761343497E-06 0,000111550808333811 3,7290776175265E-05 -0,000343944885792307 0,000711597455755349 0,000633993931176822 0,000133056767625161 0,000217281857362265 0,00102250994249303 0,000721468803978925 -0,000490099435104416 0,000133056767625161 -0,000711677546732492 0,000205364602490725 -5,20951241503188E-05 0,000426370773142499 0,000494886388762606 0,000351555763900125 0,000217167105060378 2,72928009385468E-05 0,000630113004526542 -0,000296988100720747 0,000320510694467004 0,000901066794297803 -0,000283655592515545 -0,000554586890018349 -0,000682104294690421 -0,000122415943649516 -0,000707396061983306 0,000601637651236957 -0,000112523230170121 0,00105119096581634 0,000272025100568901 0,000422829206284932 0,000419330295977905 0,000424877946912343 0,000450224396647253 0,000472952620854783 0,00045793505436776 0,000460566347680157 0,000155001855200304 0,000156557586244475 0,000236192003657336 0,000471652299177374 0,000147702486351193 0,000437896051236443 0,00041150546189467 7,89676289404405E-05 0,000125236159801089 9,02659575877014E-05 0,000299242912772945 0,00051002389911501 0,000317077278746514 0,00038895481244902 9,17324948454062E-05 0,000489637795171867 0,000112021300129885 0,000297029954123474 0,000499606327091484 9,17324948454062E-05 0,00060989552461513 0,000107424904215904 0,000404923259264904 0,00036709794700049 0,000382701365537108 0,000388942779664081 0,000489373431809488 0,000524849486357096 0,000317852160440821 0,000443390391373849 0,000391317273141994 0,000230339970904115 0,000346090876777739 0,000506629422980992 0,000623665698075806 0,000432998747768363 0,000498342075930571 0,000309415735242343 0,00054666641256854 0,000137037034391025 0,000664796782878292 0,00152364734938035 0,00200974618406538 0,00172872789672101 0,00185334511183425 0,00199632016567851 0,00196934602666392 0,00196279615787986 -7,82166505246431E-05 -0,00042195871644986 0,000471652299177374 0,00331850968822381 0,000291167470257205 0,00139891783138378 0,00298063505279051 -0,000486463748588546 0,000385664675333776 0,000174196884251772 0,00113321929095774 0,00250305520733728 0,000550409100081956 0,000882797344033999 7,36506043846388E-05 0,00129522276217419 -0,000562402123244516 0,000316732798033008 0,00258728822819343 7,36506043846388E-05 0,00279671806383896 8,07498588527266E-05 0,0017117096933369 0,000813892305036095 0,00102856379473726 0,00104142716771315 0,00129435036590223 0,00143651897701904 0,0005638240057226 0,00236779435512857 0,00106159486512506 3,57927731376806E-05 0,00161599600665155 0,00244935496356214 0,00290272117821366 0,00204057943572113 0,00329295506421575 0,000671034442803201 0,00200843005994039 -0,000471951490680819 0,000164094988815526 0,000175958232057837 0,000197103768927758 0,000216836739666154 0,000236265366270298 0,000230377047948814 0,000247057245000454 0,000251041026924718 0,000138580560151035 0,000173499499889306 0,000147702486351193 0,000291167470257205 0,000157975754459314 0,000163243683655338 0,000254631441960606 0,000104837234658286 9,26202796759996E-05 8,04639124919174E-05 0,000172702647237668 0,000274957376377409 0,000207335945984464 0,000238137875928798 8,9913523093535E-05 0,000244421381984526 0,000101697764451882 0,000205220289279203 0,000242884779322201 8,9913523093535E-05 0,000187459109732155 0,00012225513204007 0,000225999364056775 0,000206475007346724 0,000210219087307678 0,000189905433968133 0,000244280511618736 0,000216092438100191 0,000206378562421955 0,000227510542228843 0,000206560279144177 0,00017496977137744 0,000179936755391393 0,000229669882940352 0,000134392444176375 0,000252255513985906 0,000291127951437736 0,000177488695430056 0,000225378998067147 0,000124945655688262 0,000597601366004976 0,00122858163360488 0,00119466532020682 0,00127440420810725 0,0012075029359218 0,00150389081931024 0,00121937451737914 0,00121294020038258 0,000111226554803464 -0,000172514756373661 0,000437896051236443 0,00139891783138378 0,000163243683655338 0,00163820664861223 0,00120982429676058 -0,000169518407036304 0,0002151837573259 0,000107436048092539 0,000739225094314714 0,00143115456903332 0,000586971047808422 0,000789869413267439 4,28259653487043E-05 0,00111988891382711 -0,000160733940382776 0,000426043732064583 0,0014229301219512 4,28259653487043E-05 0,00214131033273793 6,55662019608878E-05 0,00107031434275856 0,000697359219025296 0,000726588577291185 0,000873320379514667 0,00111926475436805 0,00139079325260192 0,000569613229715204 0,0013398380396116 0,000832863719107693 0,000227526134585401 0,000994663125322719 0,00157383911869441 0,00254856254543362 0,00114084372259492 0,00149022899137511 0,000608581575489394 0,00160108528995746 -0,000116218038083262 0,000569270430044402 0,00135858514917049 0,00180772220814152 0,00150313164601811 0,00164040032996303 0,0017276715723928 0,00173255300036082 0,0017356941690807 -0,000133261712064766 -0,00041008438938873 0,00041150546189467 0,00298063505279051 0,000254631441960606 0,00120982429676058 0,00283082843384864 -0,000448996793717003 0,000357334613857482 0,000160194762601318 0,00102146489091608 0,00226648681431487 0,000372492974397983 0,000745579952774157 6,10381581870956E-05 0,00107711178237141 -0,000523150692446448 0,000191565233308376 0,00233950321626636 6,10381581870956E-05 0,00239422626591244 5,72190257769033E-05 0,00151214418341728 0,000692886683267279 0,00091172001256843 0,000870340808415721 0,00107645350870818 0,00121323771052671 0,000432437146918541 0,00211856235200132 0,000913766239401753 -3,25522752078138E-05 0,00138543289060758 0,00223720839445925 0,0024944700191726 0,00181538671535992 0,00294391397419353 0,000551895921026336 0,00175413375549024 -0,000470368854010664 0,000104070389807836 -0,000148975602271743 -0,000276484362972349 -0,000138920211495205 -0,000204898258851908 -0,000250928002642186 -0,000224278726689088 -0,000210218214112181 0,000384656346428819 0,00066421352458636 7,89676289404405E-05 -0,000486463748588546 0,000104837234658286 -0,000169518407036304 -0,000448996793717003 0,000492489749545922 -3,08356301963624E-05 6,81339122616131E-05 -7,15735567960197E-05 -0,000396387744049284 0,000369096316390861 0,000283865025235895 9,3019316604882E-05 -1,21207965843898E-05 0,000629644742333272 0,000364151276395673 -0,000458095661416994 9,3019316604882E-05 -0,000647943419245388 0,000138283196120918 -0,000162251409887875 0,000164098201148699 0,000153802718248458 8,59197229515638E-05 -1,20607946337275E-05 -9,5851061133911E-05 0,000323270062814641 -0,000420348274371085 6,82259914548801E-05 0,000488940410977765 -0,000289165660227577 -0,000487857072166248 -0,000645072539173274 -0,000233684922035048 -0,000594528945513876 0,000246329970778477 -0,000249112523684052 0,000632842449135867 0,000119496465389096 0,000204984198529963 0,00027436450957863 0,000219005557569548 0,000266774371534958 0,00024877768862295 0,000258350943109405 0,000256748329288081 2,71525439066912E-05 -8,89100761343497E-06 0,000125236159801089 0,000385664675333776 9,26202796759996E-05 0,0002151837573259 0,000357334613857482 -3,08356301963624E-05 0,000133092465323741 6,10407653649344E-05 0,000186690118760634 0,000333543339059396 8,6933843975599E-05 0,000132860021596915 7,4233792584525E-05 0,000221541580296642 -3,25097897963726E-05 6,45086268753699E-05 0,000354974784088677 7,4233792584525E-05 0,000299799599255561 6,14907757062976E-05 0,000236947039311681 0,000143662995312 0,00019064340547268 0,00017153711771191 0,000221492322520206 0,000232334009297831 0,000100561260365867 0,000304307061054079 0,000178527736190392 1,18972273378695E-05 0,000241964807210738 0,000300896619289879 0,000295859911884037 0,000293074401481387 0,000420448881699479 0,000109790432543797 0,00026554871365687 -3,59631433232488E-05 9,67483895801035E-05 0,000129492314428724 0,000143419027767828 0,000122958908023512 0,000147077373000532 0,000120334436285065 0,000144398292156293 0,000145758675283978 7,7142257327032E-05 0,000111550808333811 9,02659575877014E-05 0,000174196884251772 8,04639124919174E-05 0,000107436048092539 0,000160194762601318 6,81339122616131E-05 6,10407653649344E-05 6,22977110386694E-05 0,000127024693323766 0,000163458084322857 0,000139488637150066 0,000139440636695844 6,45852293671109E-05 0,000162607876186874 7,56586078302017E-05 0,000112890940049263 0,00015459590001767 6,45852293671109E-05 9,89072872828914E-05 7,16063235082555E-05 0,000136857354366746 0,000149474164288818 0,000128280343167589 0,000138237309232952 0,000162572969261111 0,000144006459916804 0,000127099787548589 0,000131351428459221 0,000148350142605791 9,90213279351199E-05 9,30143565633554E-05 0,000154850433510678 0,000103931037966893 0,000135565083967914 0,000177572981586204 0,00011406896788322 0,000150854481711299 7,92501596971494E-05 0,000422560407779765 0,000838930508449987 0,000952210819789825 0,000910875443118023 0,0009203819654117 0,000984727381022637 0,000944146573304296 0,000940256714174002 9,06703720817551E-05 3,7290776175265E-05 0,000299242912772945 0,00113321929095774 0,000172702647237668 0,000739225094314714 0,00102146489091608 -7,15735567960197E-05 0,000186690118760634 0,000127024693323766 0,000634497053319647 0,00111477520054859 0,000443429610278966 0,000629731432318209 8,03127175679253E-05 0,000775395438462426 -5,79894669186602E-05 0,000313691307641426 0,00113692929113749 8,03127175679253E-05 0,00127626780601826 8,49908380874849E-05 0,000842470441075105 0,000588656048993032 0,000648981210937822 0,000661818634761691 0,000774967542591792 0,000850641614845229 0,000443325115339825 0,00104370283467502 0,00064662705831909 0,000220216313536322 0,000721589437277305 0,00115106341963031 0,00129367165355225 0,000881064327207026 0,00121171565820412 0,000470224740087915 0,0010463512471948 4,93457123829748E-06 0,0007582486272505 0,00160730934379274 0,00195621331228654 0,0018227256701026 0,00190208124934724 0,00202608230976586 0,00199540426562258 0,00198469935064035 -2,86721770593673E-05 -0,000343944885792307 0,00051002389911501 0,00250305520733728 0,000274957376377409 0,00143115456903332 0,00226648681431487 -0,000396387744049284 0,000333543339059396 0,000163458084322857 0,00111477520054859 0,00252270739990339 0,000616119542673185 0,00099363618707709 7,24302156913583E-05 0,00147410519345697 -0,000503793129993918 0,000426496731511609 0,0024726752028778 7,24302156913583E-05 0,00285778293993715 9,41015920744972E-05 0,00175312615553704 0,000979399732267279 0,00106762251686256 0,00116491747935096 0,00147308717910341 0,00169623787095164 0,000647814238060068 0,00225453946314494 0,0011894051033694 0,000153465552861559 0,00155969998070875 0,00251672064002034 0,00291111530301354 0,00194743966737431 0,00266422000470045 0,000767454550267509 0,00210985498542774 -0,0003786513565439 0,000614066180923804 0,000690471700248562 0,000581700899251342 0,000745827036330196 0,000584127086000511 0,000841493373549693 0,000630897334982424 0,000637277664783566 0,000537518946079271 0,000711597455755349 0,000317077278746514 0,000550409100081956 0,000207335945984464 0,000586971047808422 0,000372492974397983 0,000369096316390861 8,6933843975599E-05 0,000139488637150066 0,000443429610278966 0,000616119542673185 0,00233757994606083 0,00153152593860874 0,000136652504896882 0,000741701459916997 0,000567898980747426 0,000716712030594579 0,000547757564209719 0,000136652504896882 0,000657797086081872 0,00016995463338877 0,000619808449651342 0,000713072277488886 0,000818186407457334 0,00150451822969089 0,000741095298387223 0,000810440622885109 0,00171229858088202 0,000602476276484931 0,000693042142972341 0,000743853824860264 0,000489420434610144 0,000416434804284129 0,000601567539141376 0,00068573078894581 0,000558012187324719 0,000857188027856932 0,00110634513671397 0,000648270937541911 0,000711209353198254 0,000941242723363806 0,000849041556669007 0,0010127947921004 0,00103740093239099 0,00104842863129885 0,00101524604741857 0,00102576875404981 0,000420938509413019 0,000633993931176822 0,00038895481244902 0,000882797344033999 0,000238137875928798 0,000789869413267439 0,000745579952774157 0,000283865025235895 0,000132860021596915 0,000139440636695844 0,000629731432318209 0,00099363618707709 0,00153152593860874 0,00192579656097719 9,33428884483234E-05 0,000932863472982325 0,000550623107149586 0,000660435554364812 0,000919077257320353 9,33428884483234E-05 0,00126586565610253 0,000134242624981044 0,000941938261121246 0,000849279773778874 0,00110415293755738 0,00137987452791085 0,000932224031527253 0,00106717917366164 0,00153125256212904 0,000908929545743705 0,000886846321151853 0,000735011502737481 0,000613669727995344 0,000894924428094898 0,00145841120292476 0,000985911180394267 0,000858456017594807 0,000890388479649305 0,00149462115082224 0,00060373909467622 8,24212453660659E-05 4,30529672399825E-05 8,16853025376856E-05 4,69530345850132E-05 6,98898398500381E-05 3,04090376558435E-05 6,96795964992169E-05 6,91486758214648E-05 9,66931140016357E-05 0,000133056767625161 9,17324948454062E-05 7,36506043846388E-05 8,9913523093535E-05 4,28259653487043E-05 6,10381581870956E-05 9,3019316604882E-05 7,4233792584525E-05 6,45852293671109E-05 8,03127175679253E-05 7,24302156913583E-05 0,000136652504896882 9,33428884483234E-05 0,000107478877812627 0,000124751589217689 0,000100591989133135 0,0001193441743116 6,73673297117199E-05 0,000107478877812627 -3,01200619083075E-06 9,93635200617149E-05 7,3318095292191E-05 0,000105129455517069 7,9648438856089E-05 0,000111006383032343 0,00012476865476362 0,000115430099807564 8,86246191525397E-05 4,42550134140575E-05 0,000100859188869496 0,000105605064575652 9,68247613092977E-05 3,35857409952096E-05 -3,97580743901856E-05 8,29180753964981E-05 8,32689510548903E-05 0,000103635746639839 6,83306627359459E-05 0,00010611235511119 0,000639000333556505 0,00129276345169245 0,00131852528012352 0,00121634770420468 0,00143373853275403 0,00136532823898447 0,00133216847686012 0,00134931575768578 0,000253362730088112 0,000217281857362265 0,000489637795171867 0,00129522276217419 0,000244421381984526 0,00111988891382711 0,00107711178237141 -1,21207965843898E-05 0,000221541580296642 0,000162607876186874 0,000775395438462426 0,00147410519345697 0,000741701459916997 0,000932863472982325 0,000124751589217689 0,00197600014342458 -4,36523453561881E-05 0,000861052436917365 0,00140037163846948 0,000124751589217689 0,00223258432908544 0,000196850989662674 0,00114739626611588 0,00111184863390641 0,000893049841422981 0,00107613129908423 0,00197451737818071 0,00178389187836594 0,000633069845484175 0,00142687419291019 0,0012276951922683 0,00057318145797091 0,00107102961639581 0,00151944917301388 0,00235941897685862 0,00111947972630436 0,00130463389628354 0,000789715443196238 0,00179527704326482 0,000153949042773533 0,000218805874824061 -7,9232968474346E-05 -0,000342502442435393 -6,03152342133946E-05 -0,000220881970941606 -0,00019211101600503 -0,000280681947669949 -0,000252283135854512 0,000549878072810674 0,00102250994249303 0,000112021300129885 -0,000562402123244516 0,000101697764451882 -0,000160733940382776 -0,000523150692446448 0,000629644742333272 -3,25097897963726E-05 7,56586078302017E-05 -5,79894669186602E-05 -0,000503793129993918 0,000567898980747426 0,000550623107149586 0,000100591989133135 -4,36523453561881E-05 0,00112014383818814 0,000506590586837576 -0,00059586651732735 0,000100591989133135 -0,000836435344771358 0,000133320702388804 -0,00016630419740107 0,000286051687376785 0,000428516206715987 0,000282300852083815 -4,34471494283506E-05 -0,000137177902759322 0,000546050629086178 -0,000498724396266574 0,000192102927103082 0,000751389196785611 -0,000476199921338456 -0,000668438377833074 -0,000751131682893948 -0,00024723823360224 -0,000774252826170764 0,000505915095287542 -0,000286732951576311 0,00100529194778729 0,00041389208262405 0,000492494196522148 0,000452915888776941 0,000611503480643589 0,000525321510474134 0,000598208530796607 0,000485830821211829 0,000508279354696116 0,000490482093321302 0,000721468803978925 0,000297029954123474 0,000316732798033008 0,000205220289279203 0,000426043732064583 0,000191565233308376 0,000364151276395673 6,45086268753699E-05 0,000112890940049263 0,000313691307641426 0,000426496731511609 0,000716712030594579 0,000660435554364812 0,0001193441743116 0,000861052436917365 0,000506590586837576 0,000965963533389669 0,00031606853521482 0,0001193441743116 0,000655676809710476 0,000203341580575733 0,000454882861055187 0,000689498659675311 0,00062809063659764 0,000596615730287707 0,000860280003307274 0,000777459238343628 0,000591437134536072 0,000397619766332774 0,000618586657558693 0,000851169577673985 0,000368606465176292 0,000336877658932852 0,000607818196570371 0,000432178932933895 0,00021604420121661 0,00069354977485152 0,000629851127810317 0,00068003175683084 0,000668827961332593 0,00158658571500059 0,00200714199919812 0,00176099422467957 0,00192382017318265 0,0020073660419502 0,00204383171773354 0,00203443841537 -7,37957805265549E-05 -0,000490099435104416 0,000499606327091484 0,00258728822819343 0,000242884779322201 0,0014229301219512 0,00233950321626636 -0,000458095661416994 0,000354974784088677 0,00015459590001767 0,00113692929113749 0,0024726752028778 0,000547757564209719 0,000919077257320353 6,73673297117199E-05 0,00140037163846948 -0,00059586651732735 0,00031606853521482 0,00273649986970702 6,73673297117199E-05 0,00290646950521404 5,10229428400685E-05 0,00176266740345592 0,000877865793513469 0,00103501956872008 0,00113294469617141 0,00139944960722063 0,00163572369719581 0,000617459334040932 0,00225161235749833 0,00110285800998257 2,12214450122761E-05 0,00164397923673918 0,00270608042254302 0,00293419280355475 0,00194580608344866 0,00288880076503411 0,000652958292768352 0,00207992987402051 -0,000482897497812058 8,24212453660659E-05 4,30529672399825E-05 8,16853025376856E-05 4,69530345850132E-05 6,98898398500381E-05 3,04090376558435E-05 6,96795964992169E-05 6,91486758214648E-05 9,66931140016357E-05 0,000133056767625161 9,17324948454062E-05 7,36506043846388E-05 8,9913523093535E-05 4,28259653487043E-05 6,10381581870956E-05 9,3019316604882E-05 7,4233792584525E-05 6,45852293671109E-05 8,03127175679253E-05 7,24302156913583E-05 0,000136652504896882 9,33428884483234E-05 0,000107478877812627 0,000124751589217689 0,000100591989133135 0,0001193441743116 6,73673297117199E-05 0,000107478877812627 -3,01200619083075E-06 9,93635200617149E-05 7,3318095292191E-05 0,000105129455517069 7,9648438856089E-05 0,000111006383032343 0,00012476865476362 0,000115430099807564 8,86246191525397E-05 4,42550134140575E-05 0,000100859188869496 0,000105605064575652 9,68247613092977E-05 3,35857409952096E-05 -3,97580743901856E-05 8,29180753964981E-05 8,32689510548903E-05 0,000103635746639839 6,83306627359459E-05 0,00010611235511119 0,000873509128389056 0,00204332694568971 0,00235068050869984 0,00219311887207841 0,00224230782607917 0,00262411314864224 0,0024242429243952 0,00240517972471709 -0,000153016922245707 -0,000711677546732492 0,00060989552461513 0,00279671806383896 0,000187459109732155 0,00214131033273793 0,00239422626591244 -0,000647943419245388 0,000299799599255561 9,89072872828914E-05 0,00127626780601826 0,00285778293993715 0,000657797086081872 0,00126586565610253 -3,01200619083075E-06 0,00223258432908544 -0,000836435344771358 0,000655676809710476 0,00290646950521404 -3,01200619083075E-06 0,00527709198550952 1,81164558378191E-05 0,00194984461155689 0,00112755167185047 0,000894316248089333 0,00150077028581258 0,00223074143788605 0,00262674720935513 0,000672910485802957 0,00275051270131181 0,00131314568650343 0,000149673776100837 0,00217699240117054 0,00300600728065474 0,00574974613882367 0,00213311645551893 0,00298487694903741 0,000785596383109221 0,00310425946793495 -0,000603111131525503 0,000116359963006302 6,88698810854085E-05 8,66652406842024E-05 9,98490321612188E-05 0,000117105797159217 8,50518597294384E-05 0,000111251234178526 0,000111711529742093 0,00014806089654017 0,000205364602490725 0,000107424904215904 8,07498588527266E-05 0,00012225513204007 6,55662019608878E-05 5,72190257769033E-05 0,000138283196120918 6,14907757062976E-05 7,16063235082555E-05 8,49908380874849E-05 9,41015920744972E-05 0,00016995463338877 0,000134242624981044 9,93635200617149E-05 0,000196850989662674 0,000133320702388804 0,000203341580575733 5,10229428400685E-05 9,93635200617149E-05 1,81164558378191E-05 0,000148140048458779 0,000113068968626909 0,000161464591663853 0,000126846049183249 0,000118892780469153 0,000196775102072027 0,000159195279410435 0,000138078535618112 7,02226306206258E-05 0,000140160568042682 0,000175472064571545 9,0959436127231E-05 6,76855957275109E-05 -1,58982299011352E-05 9,85681696741602E-05 5,1558209729705E-05 0,00014733047252883 9,7257922019228E-05 0,000153779568082725 0,000649504609035056 0,00120414378597837 0,00140766285943201 0,00146241167775456 0,0014756591381543 0,00158809980765384 0,00151805531266209 0,00151592129134859 0,000119569509214046 -5,20951241503188E-05 0,000404923259264904 0,0017117096933369 0,000225999364056775 0,00107031434275856 0,00151214418341728 -0,000162251409887875 0,000236947039311681 0,000136857354366746 0,000842470441075105 0,00175312615553704 0,000619808449651342 0,000941938261121246 7,3318095292191E-05 0,00114739626611588 -0,00016630419740107 0,000454882861055187 0,00176266740345592 7,3318095292191E-05 0,00194984461155689 0,000113068968626909 0,00142831783600044 0,000866874229068891 0,000963710334247623 0,00096427578920623 0,00114660140542977 0,00128939513178946 0,000661500652624677 0,0016144257487082 0,000993334200962435 0,000310836261415363 0,00109592045825087 0,00180228681454623 0,0019010628781779 0,00146095199968668 0,00180687693275406 0,000713338757336679 0,00154435157888193 -5,52637872952157E-05 0,000529625045886742 0,000962861215731407 0,000819330261450403 0,000936094150067187 0,00101284239970565 0,000990672897724947 0,000969494346842419 0,000980353333462224 0,000308985498016999 0,000426370773142499 0,00036709794700049 0,000813892305036095 0,000206475007346724 0,000697359219025296 0,000692886683267279 0,000164098201148699 0,000143662995312 0,000149474164288818 0,000588656048993032 0,000979399732267279 0,000713072277488886 0,000849279773778874 0,000105129455517069 0,00111184863390641 0,000286051687376785 0,000689498659675311 0,000877865793513469 0,000105129455517069 0,00112755167185047 0,000161464591663853 0,000866874229068891 0,00113547147574418 0,000848055178994707 0,000874331787305827 0,00111102451924136 0,00103283971174077 0,00069354791362949 0,00089078579502113 0,000992436570538629 0,000614819255963981 0,000535524889549816 0,000954161865504967 0,00108925034555423 0,000791447198331028 0,000780039338906521 0,000679117453809327 0,00113338961095004 0,000404916161929132 0,000630555385091813 0,00102253612597961 0,000956825912126404 0,00105622822161108 0,00103718285153295 0,00104322624747807 0,000981546502420792 0,000987461649976625 0,000360001805772924 0,000494886388762606 0,000382701365537108 0,00102856379473726 0,000210219087307678 0,000726588577291185 0,00091172001256843 0,000153802718248458 0,00019064340547268 0,000128280343167589 0,000648981210937822 0,00106762251686256 0,000818186407457334 0,00110415293755738 7,9648438856089E-05 0,000893049841422981 0,000428516206715987 0,00062809063659764 0,00103501956872008 7,9648438856089E-05 0,000894316248089333 0,000126846049183249 0,000963710334247623 0,000848055178994707 0,00163163367158461 0,000929997876186837 0,000892333794726873 0,000946012499593468 0,000862621598521232 0,00100758736039123 0,000962305202833678 0,000659947044753355 0,000605869687458904 0,00102519837854449 0,00069928059849699 0,000968383652853627 0,000951405807769019 0,000884483439575411 0,00121885052086729 0,000478122393665814 0,00063982887633911 0,00108242312733747 0,000962434806456691 0,00104846734572833 0,00106531619018123 0,00116912268511911 0,00107097925058328 0,001071864748673 0,000330059021636918 0,000351555763900125 0,000388942779664081 0,00104142716771315 0,000189905433968133 0,000873320379514667 0,000870340808415721 8,59197229515638E-05 0,00017153711771191 0,000138237309232952 0,000661818634761691 0,00116491747935096 0,00150451822969089 0,00137987452791085 0,000111006383032343 0,00107613129908423 0,000282300852083815 0,000596615730287707 0,00113294469617141 0,000111006383032343 0,00150077028581258 0,000118892780469153 0,00096427578920623 0,000874331787305827 0,000929997876186837 0,00173449112075497 0,00107538890619468 0,00126205796163599 0,00132055165510462 0,00106520291785908 0,000890360795017677 0,000557195279004581 0,00077949862786802 0,00114715461048506 0,00154661916885142 0,00101216855611774 0,0011155832749242 0,000839962392452457 0,00166662013011174 0,000359706421975587 0,00063859339365675 0,00129186509560047 0,00131765638898014 0,00121548057232632 0,00143277102783223 0,00136437990026689 0,00133120051547992 0,00134834322383616 0,000253206862300697 0,000217167105060378 0,000489373431809488 0,00129435036590223 0,000244280511618736 0,00111926475436805 0,00107645350870818 -1,20607946337275E-05 0,000221492322520206 0,000162572969261111 0,000774967542591792 0,00147308717910341 0,000741095298387223 0,000932224031527253 0,00012476865476362 0,00197451737818071 -4,34471494283506E-05 0,000860280003307274 0,00139944960722063 0,00012476865476362 0,00223074143788605 0,000196775102072027 0,00114660140542977 0,00111102451924136 0,000892333794726873 0,00107538890619468 0,00197303792050017 0,00178252063589654 0,000632655682531581 0,00142584449986178 0,00122691913347862 0,000572590161183036 0,00107026266038471 0,00151841419983063 0,00235768571312535 0,00111872252209317 0,00130374480723471 0,000789148890665876 0,00179382983899738 0,000153732472544716 0,000707071782542029 0,0014217479664947 0,00151273020114811 0,00139876138461441 0,0015370950438803 0,00154367428830483 0,00150631110318599 0,00150396688017965 0,000181192857234096 2,72928009385468E-05 0,000524849486357096 0,00143651897701904 0,000216092438100191 0,00139079325260192 0,00121323771052671 -9,5851061133911E-05 0,000232334009297831 0,000144006459916804 0,000850641614845229 0,00169623787095164 0,000810440622885109 0,00106717917366164 0,000115430099807564 0,00178389187836594 -0,000137177902759322 0,000777459238343628 0,00163572369719581 0,000115430099807564 0,00262674720935513 0,000159195279410435 0,00128939513178946 0,00103283971174077 0,000946012499593468 0,00126205796163599 0,00178252063589654 0,00211323783896017 0,000676273476266353 0,00160632570393531 0,00116195661802419 0,000500851199106586 0,00126166174631711 0,00181302027229816 0,00278760065817773 0,00129909523878779 0,0015142458250884 0,00083841352874904 0,00218537614423382 4,28779517909087E-05 0,000577813957771789 0,000692469285980028 0,000552787719163106 0,000683998168813076 0,000676457169134534 0,000772579984302665 0,000672894407148898 0,000681688010696041 0,000464486710121717 0,000630113004526542 0,000317852160440821 0,0005638240057226 0,000206378562421955 0,000569613229715204 0,000432437146918541 0,000323270062814641 0,000100561260365867 0,000127099787548589 0,000443325115339825 0,000647814238060068 0,00171229858088202 0,00153125256212904 8,86246191525397E-05 0,000633069845484175 0,000546050629086178 0,000591437134536072 0,000617459334040932 8,86246191525397E-05 0,000672910485802957 0,000138078535618112 0,000661500652624677 0,00069354791362949 0,000862621598521232 0,00132055165510462 0,000632655682531581 0,000676273476266353 0,00177648909212363 0,000598243500225106 0,000660007698923888 0,000654045698241912 0,000401475180724456 0,000533892373545999 0,000732220299899341 0,000725437909480953 0,000592069040656764 0,000772117611249772 0,00102532069898268 0,000580417850195213 0,000680313162473287 0,00152806195326891 0,00192189720801134 0,00175704472013326 0,00178024434174423 0,00198734766902922 0,00179948034336807 0,00179503057079108 -5,47581821377673E-05 -0,000296988100720747 0,000443390391373849 0,00236779435512857 0,000227510542228843 0,0013398380396116 0,00211856235200132 -0,000420348274371085 0,000304307061054079 0,000131351428459221 0,00104370283467502 0,00225453946314494 0,000602476276484931 0,000908929545743705 4,42550134140575E-05 0,00142687419291019 -0,000498724396266574 0,000397619766332774 0,00225161235749833 4,42550134140575E-05 0,00275051270131181 7,02226306206258E-05 0,0016144257487082 0,00089078579502113 0,00100758736039123 0,00106520291785908 0,00142584449986178 0,00160632570393531 0,000598243500225106 0,00243247054911154 0,00111039234668946 0,000131004037521754 0,00150457257245147 0,00227309604452482 0,00295699288620077 0,00176154565257325 0,00241442141205732 0,000720802312470588 0,0020563247167798 -0,000370123732438517 0,000581024966113138 0,00106838968990871 0,000990638844474813 0,00104334019578726 0,00114718521031902 0,001123776911705 0,00109395412215002 0,00110302424898544 0,00025045304910675 0,000320510694467004 0,000391317273141994 0,00106159486512506 0,000206560279144177 0,000832863719107693 0,000913766239401753 6,82259914548801E-05 0,000178527736190392 0,000148350142605791 0,00064662705831909 0,0011894051033694 0,000693042142972341 0,000886846321151853 0,000100859188869496 0,0012276951922683 0,000192102927103082 0,000618586657558693 0,00110285800998257 0,000100859188869496 0,00131314568650343 0,000140160568042682 0,000993334200962435 0,000992436570538629 0,000962305202833678 0,000890360795017677 0,00122691913347862 0,00116195661802419 0,000660007698923888 0,00111039234668946 0,00111431267762363 0,00051949824076131 0,000677166772001878 0,00119381054772732 0,00135649623876619 0,000981452286959973 0,00100984938733333 0,000742882381597463 0,00130110546062391 0,000265082629852115 0,000386703586971035 0,000352340313031378 0,000213656916374671 0,000471418717701885 0,000325647235171323 0,000393709445716261 0,000288086073725686 0,000312372757204209 0,000539639769374446 0,000901066794297803 0,000230339970904115 3,57927731376806E-05 0,00017496977137744 0,000227526134585401 -3,25522752078138E-05 0,000488940410977765 1,18972273378695E-05 9,90213279351199E-05 0,000220216313536322 0,000153465552861559 0,000743853824860264 0,000735011502737481 0,000105605064575652 0,00057318145797091 0,000751389196785611 0,000851169577673985 2,12214450122761E-05 0,000105605064575652 0,000149673776100837 0,000175472064571545 0,000310836261415363 0,000614819255963981 0,000659947044753355 0,000557195279004581 0,000572590161183036 0,000500851199106586 0,000654045698241912 0,000131004037521754 0,00051949824076131 0,000926375149219413 0,00011380541580265 1,71067064221519E-05 9,69227516112697E-05 0,000242968166535752 -0,000120470521377501 0,000697006414871916 0,000409985691915075 0,000875896357336148 0,000483597168857905 0,00102013568322743 0,00134851586068643 0,00121818110504887 0,00121116968308237 0,0013655020930278 0,00129684945719883 0,00128656767371634 2,00138132029926E-05 -0,000283655592515545 0,000346090876777739 0,00161599600665155 0,000179936755391393 0,000994663125322719 0,00138543289060758 -0,000289165660227577 0,000241964807210738 9,30143565633554E-05 0,000721589437277305 0,00155969998070875 0,000489420434610144 0,000613669727995344 9,68247613092977E-05 0,00107102961639581 -0,000476199921338456 0,000368606465176292 0,00164397923673918 9,68247613092977E-05 0,00217699240117054 9,0959436127231E-05 0,00109592045825087 0,000535524889549816 0,000605869687458904 0,00077949862786802 0,00107026266038471 0,00126166174631711 0,000401475180724456 0,00150457257245147 0,000677166772001878 0,00011380541580265 0,00141514780490206 0,00158570630934058 0,00219996356987506 0,00125881357507015 0,00177534709714877 0,000454168226763803 0,001488162618306 -0,00029230009351536 0,000679806747470131 0,00175998179000798 0,00205886360784247 0,00179815166536076 0,00203416735596274 0,00204551833829265 0,00210459958755247 0,00209780849275344 -0,000119415083305661 -0,000554586890018349 0,000506629422980992 0,00244935496356214 0,000229669882940352 0,00157383911869441 0,00223720839445925 -0,000487857072166248 0,000300896619289879 0,000154850433510678 0,00115106341963031 0,00251672064002034 0,000416434804284129 0,000894924428094898 3,35857409952096E-05 0,00151944917301388 -0,000668438377833074 0,000336877658932852 0,00270608042254302 3,35857409952096E-05 0,00300600728065474 6,76855957275109E-05 0,00180228681454623 0,000954161865504967 0,00102519837854449 0,00114715461048506 0,00151841419983063 0,00181302027229816 0,000533892373545999 0,00227309604452482 0,00119381054772732 1,71067064221519E-05 0,00158570630934058 0,00312890484603661 0,00311415586956506 0,00187255858514486 0,00276303532356308 0,000673128845612722 0,00227434941058644 -0,000533235606882349 0,000882671917815686 0,00217448194187171 0,0024966943673718 0,00224176080523039 0,00236453296141066 0,00272933928658285 0,00240194702689565 0,00239691894626533 -0,000190752796243412 -0,000682104294690421 0,000623665698075806 0,00290272117821366 0,000134392444176375 0,00254856254543362 0,0024944700191726 -0,000645072539173274 0,000295859911884037 0,000103931037966893 0,00129367165355225 0,00291111530301354 0,000601567539141376 0,00145841120292476 -3,97580743901856E-05 0,00235941897685862 -0,000751131682893948 0,000607818196570371 0,00293419280355475 -3,97580743901856E-05 0,00574974613882367 -1,58982299011352E-05 0,0019010628781779 0,00108925034555423 0,00069928059849699 0,00154661916885142 0,00235768571312535 0,00278760065817773 0,000732220299899341 0,00295699288620077 0,00135649623876619 9,69227516112697E-05 0,00219996356987506 0,00311415586956506 0,00768390329099977 0,00207748542325457 0,00295016855621412 0,000786130027514506 0,0034496830431133 -0,00061886721477778 0,000679407617077815 0,00121727891519988 0,00150736170022893 0,00155142176686466 0,00153437464028934 0,00170525665219367 0,00162311823600657 0,00162267787708764 9,99780851989063E-05 -0,000122415943649516 0,000432998747768363 0,00204057943572113 0,000252255513985906 0,00114084372259492 0,00181538671535992 -0,000233684922035048 0,000293074401481387 0,000135565083967914 0,000881064327207026 0,00194743966737431 0,00068573078894581 0,000985911180394267 8,29180753964981E-05 0,00111947972630436 -0,00024723823360224 0,000432178932933895 0,00194580608344866 8,29180753964981E-05 0,00213311645551893 9,85681696741602E-05 0,00146095199968668 0,000791447198331028 0,000968383652853627 0,00101216855611774 0,00111872252209317 0,00129909523878779 0,000725437909480953 0,00176154565257325 0,000981452286959973 0,000242968166535752 0,00125881357507015 0,00187255858514486 0,00207748542325457 0,0016949146740154 0,00213646329002512 0,000721414764624796 0,00159766604503764 -0,000138307957567058 0,000639309565703662 0,00160960444328661 0,00207201984386887 0,00178124959023749 0,00192777454880703 0,00209097319591665 0,00213292998110661 0,00211061643650523 -0,000175752177022027 -0,000707396061983306 0,000498342075930571 0,00329295506421575 0,000291127951437736 0,00149022899137511 0,00294391397419353 -0,000594528945513876 0,000420448881699479 0,000177572981586204 0,00121171565820412 0,00266422000470045 0,000558012187324719 0,000858456017594807 8,32689510548903E-05 0,00130463389628354 -0,000774252826170764 0,00021604420121661 0,00288880076503411 8,32689510548903E-05 0,00298487694903741 5,1558209729705E-05 0,00180687693275406 0,000780039338906521 0,000951405807769019 0,0011155832749242 0,00130374480723471 0,0015142458250884 0,000592069040656764 0,00241442141205732 0,00100984938733333 -0,000120470521377501 0,00177534709714877 0,00276303532356308 0,00295016855621412 0,00213646329002512 0,00371555219341082 0,000564785602259525 0,00210746177133904 -0,000664406881168906 0,000552096867603331 0,000736722270195727 0,000708825121926238 0,000850198579073605 0,000760370707943753 0,000864634332456887 0,000725497151269495 0,00073371546974508 0,000410453569059743 0,000601637651236957 0,000309415735242343 0,000671034442803201 0,000177488695430056 0,000608581575489394 0,000551895921026336 0,000246329970778477 0,000109790432543797 0,00011406896788322 0,000470224740087915 0,000767454550267509 0,000857188027856932 0,000890388479649305 0,000103635746639839 0,000789715443196238 0,000505915095287542 0,00069354977485152 0,000652958292768352 0,000103635746639839 0,000785596383109221 0,00014733047252883 0,000713338757336679 0,000679117453809327 0,000884483439575411 0,000839962392452457 0,000789148890665876 0,00083841352874904 0,000772117611249772 0,000720802312470588 0,000742882381597463 0,000697006414871916 0,000454168226763803 0,000673128845612722 0,000786130027514506 0,000721414764624796 0,000564785602259525 0,000900123019568421 0,000864809608816498 0,000582651823274575 0,000781301128698278 0,00175461887963285 0,00180535820086033 0,0016773740126183 0,00180562533660176 0,00187892814494349 0,00183138813358795 0,00182592489489489 7,19575795786844E-05 -0,000112523230170121 0,00054666641256854 0,00200843005994039 0,000225378998067147 0,00160108528995746 0,00175413375549024 -0,000249112523684052 0,00026554871365687 0,000150854481711299 0,0010463512471948 0,00210985498542774 0,00110634513671397 0,00149462115082224 6,83306627359459E-05 0,00179527704326482 -0,000286732951576311 0,000629851127810317 0,00207992987402051 6,83306627359459E-05 0,00310425946793495 9,7257922019228E-05 0,00154435157888193 0,00113338961095004 0,00121885052086729 0,00166662013011174 0,00179382983899738 0,00218537614423382 0,00102532069898268 0,0020563247167798 0,00130110546062391 0,000409985691915075 0,001488162618306 0,00227434941058644 0,0034496830431133 0,00159766604503764 0,00210746177133904 0,000864809608816498 0,00295276115741921 -0,00011325883674655 0,0002642908074645 9,01528587122137E-06 -0,000216885750127966 9,20499058577588E-05 -8,14207791094615E-05 -5,10202423791498E-05 -0,000129819792557216 -0,00010374189203554 0,000588148991103677 0,00105119096581634 0,000137037034391025 -0,000471951490680819 0,000124945655688262 -0,000116218038083262 -0,000470368854010664 0,000632842449135867 -3,59631433232488E-05 7,92501596971494E-05 4,93457123829748E-06 -0,0003786513565439 0,000648270937541911 0,00060373909467622 0,00010611235511119 0,000153949042773533 0,00100529194778729 0,00068003175683084 -0,000482897497812058 0,00010611235511119 -0,000603111131525503 0,000153779568082725 -5,52637872952157E-05 0,000404916161929132 0,000478122393665814 0,000359706421975587 0,000153732472544716 4,28779517909087E-05 0,000580417850195213 -0,000370123732438517 0,000265082629852115 0,000875896357336148 -0,00029230009351536 -0,000533235606882349 -0,00061886721477778 -0,000138307957567058 -0,000664406881168906 0,000582651823274575 -0,00011325883674655 0,00105532679306507 |
From: Thierry M. <Thi...@in...> - 2016-07-05 15:23:59
|
Dear Anders, I simply added "if(i!=j)" before the block "x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(d[i][j]); // model.addVariable(x[i][j]);" and this solves the problem. Thanks a lot for your reactivity. Best regards, Thierry Moyaux _______________ Thierry MOYAUX - Univ. de Lyon <http://www.universite-lyon.fr/>, INSA-Lyon <http://www.insa-lyon.fr/>, Dpt. Génie Industriel <http://gi.insa-lyon.fr/>, Labo. DISP <http://disp-lab.fr/fr/thierry-moyaux>. Tél. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda <https://zmail.insa-lyon.fr/home/thi...@in...?view=week&fmt=freebusy> Le 05/07/2016 14:05, oja...@li... a écrit : > Send ojAlgo-user mailing list submissions to > oja...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > or, via email, send a message with subject or body 'help' to > oja...@li... > > You can reach the person managing the list at > oja...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ojAlgo-user digest..." > > > Today's Topics: > > 1. Re: ojAlgo-user Digest, Vol 72, Issue 2 (Anders Peterson) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 4 Jul 2016 17:10:43 +0200 > From: Anders Peterson <an...@op...> > Subject: Re: [ojAlgo-user] ojAlgo-user Digest, Vol 72, Issue 2 > To: oja...@li... > Message-ID: <65D...@op...> > Content-Type: text/plain; charset=windows-1252 > > ojAlgo?s IntegerSolver is multithreaded, and in a way that (unfortunately) makes it indeterministic. That?s why you see those randomly changing solutions, but that?s not ?the problem?. The real problem in your case is that you?ve used Double.MAX_VALUE as model parameters. > > ExpressionsBasedModel has a feature that automatically rescales model parameters (to maximize numerical accuracy) before invoking the solver. The current implementation of that feature (apparently) doesn?t work very well with extremely large parameters in the model. I have now modified the behavior of that feature to not scale anything when/if there are extremely large or small parameters present. As far as I can see that solves the problem with your model. > > In your case can?t you simply omit those variables, rather than penalize using them? > > > /Anders > > > >> On 4 juli 2016, at 11:00, Thierry Moyaux <Thi...@in...> wrote: >> >> Dear Anders, >> >> ok, thank you very much for your help! >> >> Best regards, >> Thierry Moyaux >> _______________ >> Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. G?nie Industriel, Labo. DISP. >> T?l. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda >> Le 02/07/2016 14:02, oja...@li... a ?crit : >>> Send ojAlgo-user mailing list submissions to >>> >>> oja...@li... >>> >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> or, via email, send a message with subject or body 'help' to >>> >>> oja...@li... >>> >>> >>> You can reach the person managing the list at >>> >>> oja...@li... >>> >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of ojAlgo-user digest..." >>> >>> >>> Today's Topics: >>> >>> 1. Re: Stop on a feasible solution before the optimum >>> (Anders Peterson) >>> >>> >>> ---------------------------------------------------------------------- >>> >>> Message: 1 >>> Date: Fri, 1 Jul 2016 21:15:02 +0200 >>>> From: Anders Peterson >>> <an...@op...> >>> >>> Subject: Re: [ojAlgo-user] Stop on a feasible solution before the >>> optimum >>> To: >>> oja...@li... >>> >>> Message-ID: >>> <F29...@op...> >>> >>> Content-Type: text/plain; charset=utf-8 >>> >>> My guess is that this is a concurrency related problem with ojAlgo?s IntegerSolver. I?ll investigate, but don?t expect a quick solution. /Anders >>> >>> >>> >>>> On 1 juli 2016, at 16:06, Thierry Moyaux <Thi...@in...> >>>> wrote: >>>> >>>> Dear Anders, >>>> >>>> I am trying to call Ojalgo 40 from AnyLogic 7.3.2 ( >>>> http://www.anylogic..com/downloads >>>> ) on Ubuntu 16.04 in order to solve a Traveling Salesman Problem, but Ojalgo sometimes stops on a feasible solution before the optimum. >>>> >>>> The following code works well without Anylogic and always finds 917.31 as optimal solution: (Simply copy/paste the following code in a file called "Tsp.java" in order to test it.) >>>> >>>> import org.ojalgo.OjAlgoUtils; >>>> import org.ojalgo.netio.BasicLogger; >>>> import org.ojalgo.optimisation.Expression; >>>> import org.ojalgo.optimisation.ExpressionsBasedModel; >>>> import org.ojalgo.optimisation.Optimisation; >>>> import org.ojalgo.optimisation.Variable; >>>> import java.math.BigDecimal; >>>> >>>> public class Tsp{ >>>> public static void main(String[] arg){ >>>> int n = 6; >>>> double[][] c = new double[n][n]; >>>> c[0][0]=1.7976931348623157E308; c[0][1]=141.4213562373095; c[0][2]=223.60679774997897; c[0][3]=223.60679774997897; c[0][4]=141.4213562373095; c[0][5]=156.63604262201076; >>>> c[1][0]=141.4213562373095; c[1][1]=1.7976931348623157E308; c[1][2]=100.0; c[1][3]=223.60679774997897; c[1][4]=200.0; c[1][5]=219.25609608009617; >>>> c[2][0]=223.60679774997897; c[2][1]=100.0; c[2][2]=1.7976931348623157E308; c[2][3]=200.0; c[2][4]=223.60679774997897; c[2][5]=319.2543607976003; >>>> c[3][0]=223.60679774997897; c[3][1]=223.60679774997897; c[3][2]=200.0; c[3][3]=1.7976931348623157E308; c[3][4]=100.0; c[3][5]=377.5537017276938; >>>> c[4][0]=141.4213562373095; c[4][1]=200.0; c[4][2]=223..60679774997897; c[4][3]=100.0; c[4][4]=1.7976931348623157E308; c[4][5]=297.81988930943544; >>>> c[5][0]=156.63604262201076; c[5][1]=219.25609608009617; c[5][2]=319.2543607976003; c[5][3]=377.5537017276938; c[5][4]=297.81988930943544; c[5][5]=1.7976931348623157E308; >>>> >>>> final ExpressionsBasedModel model = new ExpressionsBasedModel(); >>>> >>>> //DECISION VARIABLES >>>> final Variable[][] x = new Variable[n][n]; >>>> for(int i=0 ; i<n ; i++){ >>>> for(int j=0 ; j<n ; j++){ >>>> x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(c[i][j]); >>>> model.addVariable(x[i][j]); >>>> } >>>> } >>>> final Variable[] u = new Variable[n]; >>>> for(int i=1 ; i<n ; i++){ >>>> u[i] = new Variable("u"+i); >>>> model.addVariable(u[i]); >>>> } >>>> >>>> //CONSTRAINTS >>>> //forall(i in cities) >>>> //flow_out: >>>> //sum(j in cities : i!=j) x[i][j]==1; >>>> for(int i=0 ; i<n ; i++){ >>>> final Expression constraint_line = model.addExpression("constraint_line"+i).lower(1).upper(1); >>>> for( int j=0 ; j<n ; j++){ >>>> if( i!=j) >>>> constraint_line.setLinearFactor(x[i][j], 1); >>>> } >>>> } >>>> >>>> //forall(j in cities) >>>> //flow_in: >>>> //sum(i in cities : i!=j) x[i][j]==1; >>>> for(int j=0 ; j<n ; j++){ >>>> final Expression constraint_column = model.addExpression("constraint_column"+j).lower(1).upper(1); >>>> for( int i=0 ; i<n ; i++){ >>>> if( i!=j) >>>> constraint_column.setLinearFactor(x[i][j], 1); >>>> } >>>> } >>>> >>>> //forall(i in cities: i>=1, j in cities: j>=1) >>>> //subroute: >>>> //u[i]-u[j]+n*x[i][j] <= n-1; >>>> for(int i=1 ; i<n ; i++){ >>>> for( int j=1 ; j<n ; j++){ >>>> if( i!=j ){ >>>> final Expression constraint_subroute = model.addExpression("constraint_subroute"+i+"_"+j).upper(n-1); >>>> constraint_subroute.setLinearFactor(u[i], 1); >>>> constraint_subroute.setLinearFactor(u[j], -1); >>>> constraint_subroute.setLinearFactor(x[i][j], n); >>>> } >>>> } >>>> } >>>> >>>> Optimisation.Result result = model.minimise(); >>>> >>>> System.out.print("u=\n\t "); >>>> for(int i=1 ; i<n ; i++) System.out.print(u[i].getValue()..intValue()+" "); >>>> System.out.print("\nx=\n\t"); >>>> for(int i=0 ; i<n ; i++) System.out.print(i+" "); >>>> System.out.println(); >>>> for(int i=0 ; i<n ; i++){ >>>> System.out.print(i+"\t"); >>>> for(int j=0 ; j<n ; j++){ >>>> System.out.print(x[i][j].getValue().intValue() + " "); >>>> } >>>> System.out.println(); >>>> } >>>> System.out.println("\nResult = " + result); >>>> } >>>> } >>>> >>>> Next, I try to run the same code in the "On startup" section of the "Agent actions" of the "Main" agent in an AnyLogic model. (Click on the project name "Ojalgo" to change the location of ojalgo-40.0.0.jar, like in the attached file.) Unfortunately, the obtained result is not always 917.31, but also sometimes 1099.22 and 1161.84. >>>> >>>> I do not understand why the solution randomly changes. I also call Cplex from AnyLogic to solve this same problem, which always returns the optimal solution, hence the problem seems not to be due to AnyLogic. As shown by the above Java code, the problem is not due to Ojalgo as well, but only related to the coupling of AnyLogic and Ojalgo. >>>> >>>> Thank you very much for Ojalgo and your help! >>>> >>>> Best regards, >>>> Thierry Moyaux >>>> _______________ >>>> Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. G?nie Industriel, Labo. DISP. >>>> T?l. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda >>>> <Ojalgo.alp>------------------------------------------------------------------------------ >>>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >>>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >>>> present their vision of the future. This family event has something for >>>> everyone, including kids. Get more information and register today. >>>> >>>> http://sdm.link/attshape_______________________________________________ >>>> >>>> ojAlgo-user mailing list >>>> >>>> ojA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >>> ------------------------------ >>> >>> ------------------------------------------------------------------------------ >>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >>> present their vision of the future. This family event has something for >>> everyone, including kids. Get more information and register today. >>> >>> http://sdm.link/attshape >>> >>> >>> ------------------------------ >>> >>> _______________________________________________ >>> ojAlgo-user mailing list >>> >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >>> >>> >>> >>> End of ojAlgo-user Digest, Vol 72, Issue 2 >>> ****************************************** >>> >> ------------------------------------------------------------------------------ >> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >> present their vision of the future. This family event has something for >> everyone, including kids. Get more information and register today. >> http://sdm.link/attshape_______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ------------------------------ > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > > ------------------------------ > > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > End of ojAlgo-user Digest, Vol 72, Issue 4 > ****************************************** |
From: Anders P. <an...@op...> - 2016-07-04 15:11:02
|
ojAlgo’s IntegerSolver is multithreaded, and in a way that (unfortunately) makes it indeterministic. That’s why you see those randomly changing solutions, but that’s not “the problem”. The real problem in your case is that you’ve used Double.MAX_VALUE as model parameters. ExpressionsBasedModel has a feature that automatically rescales model parameters (to maximize numerical accuracy) before invoking the solver. The current implementation of that feature (apparently) doesn’t work very well with extremely large parameters in the model. I have now modified the behavior of that feature to not scale anything when/if there are extremely large or small parameters present. As far as I can see that solves the problem with your model. In your case can’t you simply omit those variables, rather than penalize using them? /Anders > On 4 juli 2016, at 11:00, Thierry Moyaux <Thi...@in...> wrote: > > Dear Anders, > > ok, thank you very much for your help! > > Best regards, > Thierry Moyaux > _______________ > Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. Génie Industriel, Labo. DISP. > Tél. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda > Le 02/07/2016 14:02, oja...@li... a écrit : >> Send ojAlgo-user mailing list submissions to >> >> oja...@li... >> >> >> To subscribe or unsubscribe via the World Wide Web, visit >> >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> or, via email, send a message with subject or body 'help' to >> >> oja...@li... >> >> >> You can reach the person managing the list at >> >> oja...@li... >> >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of ojAlgo-user digest..." >> >> >> Today's Topics: >> >> 1. Re: Stop on a feasible solution before the optimum >> (Anders Peterson) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 1 Jul 2016 21:15:02 +0200 >> >From: Anders Peterson >> <an...@op...> >> >> Subject: Re: [ojAlgo-user] Stop on a feasible solution before the >> optimum >> To: >> oja...@li... >> >> Message-ID: >> <F29...@op...> >> >> Content-Type: text/plain; charset=utf-8 >> >> My guess is that this is a concurrency related problem with ojAlgo?s IntegerSolver. I?ll investigate, but don?t expect a quick solution. /Anders >> >> >> >>> On 1 juli 2016, at 16:06, Thierry Moyaux <Thi...@in...> >>> wrote: >>> >>> Dear Anders, >>> >>> I am trying to call Ojalgo 40 from AnyLogic 7.3.2 ( >>> http://www.anylogic..com/downloads >>> ) on Ubuntu 16.04 in order to solve a Traveling Salesman Problem, but Ojalgo sometimes stops on a feasible solution before the optimum. >>> >>> The following code works well without Anylogic and always finds 917.31 as optimal solution: (Simply copy/paste the following code in a file called "Tsp.java" in order to test it.) >>> >>> import org.ojalgo.OjAlgoUtils; >>> import org.ojalgo.netio.BasicLogger; >>> import org.ojalgo.optimisation.Expression; >>> import org.ojalgo.optimisation.ExpressionsBasedModel; >>> import org.ojalgo.optimisation.Optimisation; >>> import org.ojalgo.optimisation.Variable; >>> import java.math.BigDecimal; >>> >>> public class Tsp{ >>> public static void main(String[] arg){ >>> int n = 6; >>> double[][] c = new double[n][n]; >>> c[0][0]=1.7976931348623157E308; c[0][1]=141.4213562373095; c[0][2]=223.60679774997897; c[0][3]=223.60679774997897; c[0][4]=141.4213562373095; c[0][5]=156.63604262201076; >>> c[1][0]=141.4213562373095; c[1][1]=1.7976931348623157E308; c[1][2]=100.0; c[1][3]=223.60679774997897; c[1][4]=200.0; c[1][5]=219.25609608009617; >>> c[2][0]=223.60679774997897; c[2][1]=100.0; c[2][2]=1.7976931348623157E308; c[2][3]=200.0; c[2][4]=223.60679774997897; c[2][5]=319.2543607976003; >>> c[3][0]=223.60679774997897; c[3][1]=223.60679774997897; c[3][2]=200.0; c[3][3]=1.7976931348623157E308; c[3][4]=100.0; c[3][5]=377.5537017276938; >>> c[4][0]=141.4213562373095; c[4][1]=200.0; c[4][2]=223..60679774997897; c[4][3]=100.0; c[4][4]=1.7976931348623157E308; c[4][5]=297.81988930943544; >>> c[5][0]=156.63604262201076; c[5][1]=219.25609608009617; c[5][2]=319.2543607976003; c[5][3]=377.5537017276938; c[5][4]=297.81988930943544; c[5][5]=1.7976931348623157E308; >>> >>> final ExpressionsBasedModel model = new ExpressionsBasedModel(); >>> >>> //DECISION VARIABLES >>> final Variable[][] x = new Variable[n][n]; >>> for(int i=0 ; i<n ; i++){ >>> for(int j=0 ; j<n ; j++){ >>> x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(c[i][j]); >>> model.addVariable(x[i][j]); >>> } >>> } >>> final Variable[] u = new Variable[n]; >>> for(int i=1 ; i<n ; i++){ >>> u[i] = new Variable("u"+i); >>> model.addVariable(u[i]); >>> } >>> >>> //CONSTRAINTS >>> //forall(i in cities) >>> //flow_out: >>> //sum(j in cities : i!=j) x[i][j]==1; >>> for(int i=0 ; i<n ; i++){ >>> final Expression constraint_line = model.addExpression("constraint_line"+i).lower(1).upper(1); >>> for( int j=0 ; j<n ; j++){ >>> if( i!=j) >>> constraint_line.setLinearFactor(x[i][j], 1); >>> } >>> } >>> >>> //forall(j in cities) >>> //flow_in: >>> //sum(i in cities : i!=j) x[i][j]==1; >>> for(int j=0 ; j<n ; j++){ >>> final Expression constraint_column = model.addExpression("constraint_column"+j).lower(1).upper(1); >>> for( int i=0 ; i<n ; i++){ >>> if( i!=j) >>> constraint_column.setLinearFactor(x[i][j], 1); >>> } >>> } >>> >>> //forall(i in cities: i>=1, j in cities: j>=1) >>> //subroute: >>> //u[i]-u[j]+n*x[i][j] <= n-1; >>> for(int i=1 ; i<n ; i++){ >>> for( int j=1 ; j<n ; j++){ >>> if( i!=j ){ >>> final Expression constraint_subroute = model.addExpression("constraint_subroute"+i+"_"+j).upper(n-1); >>> constraint_subroute.setLinearFactor(u[i], 1); >>> constraint_subroute.setLinearFactor(u[j], -1); >>> constraint_subroute.setLinearFactor(x[i][j], n); >>> } >>> } >>> } >>> >>> Optimisation.Result result = model.minimise(); >>> >>> System.out.print("u=\n\t "); >>> for(int i=1 ; i<n ; i++) System.out.print(u[i].getValue()..intValue()+" "); >>> System.out.print("\nx=\n\t"); >>> for(int i=0 ; i<n ; i++) System.out.print(i+" "); >>> System.out.println(); >>> for(int i=0 ; i<n ; i++){ >>> System.out.print(i+"\t"); >>> for(int j=0 ; j<n ; j++){ >>> System.out.print(x[i][j].getValue().intValue() + " "); >>> } >>> System.out.println(); >>> } >>> System.out.println("\nResult = " + result); >>> } >>> } >>> >>> Next, I try to run the same code in the "On startup" section of the "Agent actions" of the "Main" agent in an AnyLogic model. (Click on the project name "Ojalgo" to change the location of ojalgo-40.0.0.jar, like in the attached file.) Unfortunately, the obtained result is not always 917.31, but also sometimes 1099.22 and 1161.84. >>> >>> I do not understand why the solution randomly changes. I also call Cplex from AnyLogic to solve this same problem, which always returns the optimal solution, hence the problem seems not to be due to AnyLogic. As shown by the above Java code, the problem is not due to Ojalgo as well, but only related to the coupling of AnyLogic and Ojalgo. >>> >>> Thank you very much for Ojalgo and your help! >>> >>> Best regards, >>> Thierry Moyaux >>> _______________ >>> Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. G?nie Industriel, Labo. DISP. >>> T?l. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda >>> <Ojalgo.alp>------------------------------------------------------------------------------ >>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >>> present their vision of the future. This family event has something for >>> everyone, including kids. Get more information and register today. >>> >>> http://sdm.link/attshape_______________________________________________ >>> >>> ojAlgo-user mailing list >>> >>> ojA...@li... >>> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> >> >> ------------------------------ >> >> ------------------------------------------------------------------------------ >> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >> present their vision of the future. This family event has something for >> everyone, including kids. Get more information and register today. >> >> http://sdm.link/attshape >> >> >> ------------------------------ >> >> _______________________________________________ >> ojAlgo-user mailing list >> >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> >> >> End of ojAlgo-user Digest, Vol 72, Issue 2 >> ****************************************** >> > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Thierry M. <Thi...@in...> - 2016-07-04 09:00:17
|
Dear Anders, ok, thank you very much for your help! Best regards, Thierry Moyaux _______________ Thierry MOYAUX - Univ. de Lyon <http://www.universite-lyon.fr/>, INSA-Lyon <http://www.insa-lyon.fr/>, Dpt. Génie Industriel <http://gi.insa-lyon.fr/>, Labo. DISP <http://disp-lab.fr/fr/thierry-moyaux>. Tél. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda <https://zmail.insa-lyon.fr/home/thi...@in...?view=week&fmt=freebusy> Le 02/07/2016 14:02, oja...@li... a écrit : > Send ojAlgo-user mailing list submissions to > oja...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > or, via email, send a message with subject or body 'help' to > oja...@li... > > You can reach the person managing the list at > oja...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ojAlgo-user digest..." > > > Today's Topics: > > 1. Re: Stop on a feasible solution before the optimum > (Anders Peterson) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 1 Jul 2016 21:15:02 +0200 > From: Anders Peterson <an...@op...> > Subject: Re: [ojAlgo-user] Stop on a feasible solution before the > optimum > To: oja...@li... > Message-ID: <F29...@op...> > Content-Type: text/plain; charset=utf-8 > > My guess is that this is a concurrency related problem with ojAlgo?s IntegerSolver. I?ll investigate, but don?t expect a quick solution. /Anders > > >> On 1 juli 2016, at 16:06, Thierry Moyaux <Thi...@in...> wrote: >> >> Dear Anders, >> >> I am trying to call Ojalgo 40 from AnyLogic 7.3.2 (http://www.anylogic..com/downloads) on Ubuntu 16.04 in order to solve a Traveling Salesman Problem, but Ojalgo sometimes stops on a feasible solution before the optimum. >> >> The following code works well without Anylogic and always finds 917.31 as optimal solution: (Simply copy/paste the following code in a file called "Tsp.java" in order to test it.) >> >> import org.ojalgo.OjAlgoUtils; >> import org.ojalgo.netio.BasicLogger; >> import org.ojalgo.optimisation.Expression; >> import org.ojalgo.optimisation.ExpressionsBasedModel; >> import org.ojalgo.optimisation.Optimisation; >> import org.ojalgo.optimisation.Variable; >> import java.math.BigDecimal; >> >> public class Tsp{ >> public static void main(String[] arg){ >> int n = 6; >> double[][] c = new double[n][n]; >> c[0][0]=1.7976931348623157E308; c[0][1]=141.4213562373095; c[0][2]=223.60679774997897; c[0][3]=223.60679774997897; c[0][4]=141.4213562373095; c[0][5]=156.63604262201076; >> c[1][0]=141.4213562373095; c[1][1]=1.7976931348623157E308; c[1][2]=100.0; c[1][3]=223.60679774997897; c[1][4]=200.0; c[1][5]=219.25609608009617; >> c[2][0]=223.60679774997897; c[2][1]=100.0; c[2][2]=1.7976931348623157E308; c[2][3]=200.0; c[2][4]=223.60679774997897; c[2][5]=319.2543607976003; >> c[3][0]=223.60679774997897; c[3][1]=223.60679774997897; c[3][2]=200.0; c[3][3]=1.7976931348623157E308; c[3][4]=100.0; c[3][5]=377.5537017276938; >> c[4][0]=141.4213562373095; c[4][1]=200.0; c[4][2]=223.60679774997897; c[4][3]=100.0; c[4][4]=1.7976931348623157E308; c[4][5]=297.81988930943544; >> c[5][0]=156.63604262201076; c[5][1]=219.25609608009617; c[5][2]=319.2543607976003; c[5][3]=377.5537017276938; c[5][4]=297.81988930943544; c[5][5]=1.7976931348623157E308; >> >> final ExpressionsBasedModel model = new ExpressionsBasedModel(); >> >> //DECISION VARIABLES >> final Variable[][] x = new Variable[n][n]; >> for(int i=0 ; i<n ; i++){ >> for(int j=0 ; j<n ; j++){ >> x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(c[i][j]); >> model.addVariable(x[i][j]); >> } >> } >> final Variable[] u = new Variable[n]; >> for(int i=1 ; i<n ; i++){ >> u[i] = new Variable("u"+i); >> model.addVariable(u[i]); >> } >> >> //CONSTRAINTS >> //forall(i in cities) >> //flow_out: >> //sum(j in cities : i!=j) x[i][j]==1; >> for(int i=0 ; i<n ; i++){ >> final Expression constraint_line = model.addExpression("constraint_line"+i).lower(1).upper(1); >> for( int j=0 ; j<n ; j++){ >> if( i!=j) >> constraint_line.setLinearFactor(x[i][j], 1); >> } >> } >> >> //forall(j in cities) >> //flow_in: >> //sum(i in cities : i!=j) x[i][j]==1; >> for(int j=0 ; j<n ; j++){ >> final Expression constraint_column = model.addExpression("constraint_column"+j).lower(1).upper(1); >> for( int i=0 ; i<n ; i++){ >> if( i!=j) >> constraint_column.setLinearFactor(x[i][j], 1); >> } >> } >> >> //forall(i in cities: i>=1, j in cities: j>=1) >> //subroute: >> //u[i]-u[j]+n*x[i][j] <= n-1; >> for(int i=1 ; i<n ; i++){ >> for( int j=1 ; j<n ; j++){ >> if( i!=j ){ >> final Expression constraint_subroute = model.addExpression("constraint_subroute"+i+"_"+j).upper(n-1); >> constraint_subroute.setLinearFactor(u[i], 1); >> constraint_subroute.setLinearFactor(u[j], -1); >> constraint_subroute.setLinearFactor(x[i][j], n); >> } >> } >> } >> >> Optimisation.Result result = model.minimise(); >> >> System.out.print("u=\n\t "); >> for(int i=1 ; i<n ; i++) System.out.print(u[i].getValue().intValue()+" "); >> System.out.print("\nx=\n\t"); >> for(int i=0 ; i<n ; i++) System.out.print(i+" "); >> System.out.println(); >> for(int i=0 ; i<n ; i++){ >> System.out.print(i+"\t"); >> for(int j=0 ; j<n ; j++){ >> System.out.print(x[i][j].getValue().intValue() + " "); >> } >> System.out.println(); >> } >> System.out.println("\nResult = " + result); >> } >> } >> >> Next, I try to run the same code in the "On startup" section of the "Agent actions" of the "Main" agent in an AnyLogic model. (Click on the project name "Ojalgo" to change the location of ojalgo-40.0.0.jar, like in the attached file.) Unfortunately, the obtained result is not always 917.31, but also sometimes 1099.22 and 1161.84. >> >> I do not understand why the solution randomly changes. I also call Cplex from AnyLogic to solve this same problem, which always returns the optimal solution, hence the problem seems not to be due to AnyLogic. As shown by the above Java code, the problem is not due to Ojalgo as well, but only related to the coupling of AnyLogic and Ojalgo. >> >> Thank you very much for Ojalgo and your help! >> >> Best regards, >> Thierry Moyaux >> _______________ >> Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. G?nie Industriel, Labo. DISP. >> T?l. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda >> <Ojalgo.alp>------------------------------------------------------------------------------ >> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San >> Francisco, CA to explore cutting-edge tech and listen to tech luminaries >> present their vision of the future. This family event has something for >> everyone, including kids. Get more information and register today. >> http://sdm.link/attshape_______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > > ------------------------------ > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > > ------------------------------ > > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > > End of ojAlgo-user Digest, Vol 72, Issue 2 > ****************************************** |
From: Anders P. <an...@op...> - 2016-07-01 19:15:11
|
My guess is that this is a concurrency related problem with ojAlgo’s IntegerSolver. I’ll investigate, but don’t expect a quick solution. /Anders > On 1 juli 2016, at 16:06, Thierry Moyaux <Thi...@in...> wrote: > > Dear Anders, > > I am trying to call Ojalgo 40 from AnyLogic 7.3.2 (http://www.anylogic..com/downloads) on Ubuntu 16.04 in order to solve a Traveling Salesman Problem, but Ojalgo sometimes stops on a feasible solution before the optimum. > > The following code works well without Anylogic and always finds 917.31 as optimal solution: (Simply copy/paste the following code in a file called "Tsp.java" in order to test it.) > > import org.ojalgo.OjAlgoUtils; > import org.ojalgo.netio.BasicLogger; > import org.ojalgo.optimisation.Expression; > import org.ojalgo.optimisation.ExpressionsBasedModel; > import org.ojalgo.optimisation.Optimisation; > import org.ojalgo.optimisation.Variable; > import java.math.BigDecimal; > > public class Tsp{ > public static void main(String[] arg){ > int n = 6; > double[][] c = new double[n][n]; > c[0][0]=1.7976931348623157E308; c[0][1]=141.4213562373095; c[0][2]=223.60679774997897; c[0][3]=223.60679774997897; c[0][4]=141.4213562373095; c[0][5]=156.63604262201076; > c[1][0]=141.4213562373095; c[1][1]=1.7976931348623157E308; c[1][2]=100.0; c[1][3]=223.60679774997897; c[1][4]=200.0; c[1][5]=219.25609608009617; > c[2][0]=223.60679774997897; c[2][1]=100.0; c[2][2]=1.7976931348623157E308; c[2][3]=200.0; c[2][4]=223.60679774997897; c[2][5]=319.2543607976003; > c[3][0]=223.60679774997897; c[3][1]=223.60679774997897; c[3][2]=200.0; c[3][3]=1.7976931348623157E308; c[3][4]=100.0; c[3][5]=377.5537017276938; > c[4][0]=141.4213562373095; c[4][1]=200.0; c[4][2]=223.60679774997897; c[4][3]=100.0; c[4][4]=1.7976931348623157E308; c[4][5]=297.81988930943544; > c[5][0]=156.63604262201076; c[5][1]=219.25609608009617; c[5][2]=319.2543607976003; c[5][3]=377.5537017276938; c[5][4]=297.81988930943544; c[5][5]=1.7976931348623157E308; > > final ExpressionsBasedModel model = new ExpressionsBasedModel(); > > //DECISION VARIABLES > final Variable[][] x = new Variable[n][n]; > for(int i=0 ; i<n ; i++){ > for(int j=0 ; j<n ; j++){ > x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(c[i][j]); > model.addVariable(x[i][j]); > } > } > final Variable[] u = new Variable[n]; > for(int i=1 ; i<n ; i++){ > u[i] = new Variable("u"+i); > model.addVariable(u[i]); > } > > //CONSTRAINTS > //forall(i in cities) > //flow_out: > //sum(j in cities : i!=j) x[i][j]==1; > for(int i=0 ; i<n ; i++){ > final Expression constraint_line = model.addExpression("constraint_line"+i).lower(1).upper(1); > for( int j=0 ; j<n ; j++){ > if( i!=j) > constraint_line.setLinearFactor(x[i][j], 1); > } > } > > //forall(j in cities) > //flow_in: > //sum(i in cities : i!=j) x[i][j]==1; > for(int j=0 ; j<n ; j++){ > final Expression constraint_column = model.addExpression("constraint_column"+j).lower(1).upper(1); > for( int i=0 ; i<n ; i++){ > if( i!=j) > constraint_column.setLinearFactor(x[i][j], 1); > } > } > > //forall(i in cities: i>=1, j in cities: j>=1) > //subroute: > //u[i]-u[j]+n*x[i][j] <= n-1; > for(int i=1 ; i<n ; i++){ > for( int j=1 ; j<n ; j++){ > if( i!=j ){ > final Expression constraint_subroute = model.addExpression("constraint_subroute"+i+"_"+j).upper(n-1); > constraint_subroute.setLinearFactor(u[i], 1); > constraint_subroute.setLinearFactor(u[j], -1); > constraint_subroute.setLinearFactor(x[i][j], n); > } > } > } > > Optimisation.Result result = model.minimise(); > > System.out.print("u=\n\t "); > for(int i=1 ; i<n ; i++) System.out.print(u[i].getValue().intValue()+" "); > System.out.print("\nx=\n\t"); > for(int i=0 ; i<n ; i++) System.out.print(i+" "); > System.out.println(); > for(int i=0 ; i<n ; i++){ > System.out.print(i+"\t"); > for(int j=0 ; j<n ; j++){ > System.out.print(x[i][j].getValue().intValue() + " "); > } > System.out.println(); > } > System.out.println("\nResult = " + result); > } > } > > Next, I try to run the same code in the "On startup" section of the "Agent actions" of the "Main" agent in an AnyLogic model. (Click on the project name "Ojalgo" to change the location of ojalgo-40.0.0.jar, like in the attached file.) Unfortunately, the obtained result is not always 917.31, but also sometimes 1099.22 and 1161.84. > > I do not understand why the solution randomly changes. I also call Cplex from AnyLogic to solve this same problem, which always returns the optimal solution, hence the problem seems not to be due to AnyLogic. As shown by the above Java code, the problem is not due to Ojalgo as well, but only related to the coupling of AnyLogic and Ojalgo. > > Thank you very much for Ojalgo and your help! > > Best regards, > Thierry Moyaux > _______________ > Thierry MOYAUX - Univ. de Lyon, INSA-Lyon, Dpt. Génie Industriel, Labo. DISP. > Tél. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda > <Ojalgo.alp>------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape_______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |
From: Thierry M. <Thi...@in...> - 2016-07-01 14:06:28
|
Dear Anders, I am trying to call Ojalgo 40 from AnyLogic 7.3.2 (http://www.anylogic.com/downloads) on Ubuntu 16.04 in order to solve a Traveling Salesman Problem, but Ojalgo sometimes stops on a feasible solution before the optimum. The following code works well without Anylogic and always finds 917.31 as optimal solution: (Simply copy/paste the following code in a file called "Tsp.java" in order to test it.) import org.ojalgo.OjAlgoUtils; import org.ojalgo.netio.BasicLogger; import org.ojalgo.optimisation.Expression; import org.ojalgo.optimisation.ExpressionsBasedModel; import org.ojalgo.optimisation.Optimisation; import org.ojalgo.optimisation.Variable; import java.math.BigDecimal; public class Tsp{ public static void main(String[] arg){ int n = 6; double[][] c = new double[n][n]; c[0][0]=1.7976931348623157E308; c[0][1]=141.4213562373095; c[0][2]=223.60679774997897; c[0][3]=223.60679774997897; c[0][4]=141.4213562373095; c[0][5]=156.63604262201076; c[1][0]=141.4213562373095; c[1][1]=1.7976931348623157E308; c[1][2]=100.0; c[1][3]=223.60679774997897; c[1][4]=200.0; c[1][5]=219.25609608009617; c[2][0]=223.60679774997897; c[2][1]=100.0; c[2][2]=1.7976931348623157E308; c[2][3]=200.0; c[2][4]=223.60679774997897; c[2][5]=319.2543607976003; c[3][0]=223.60679774997897; c[3][1]=223.60679774997897; c[3][2]=200.0; c[3][3]=1.7976931348623157E308; c[3][4]=100.0; c[3][5]=377.5537017276938; c[4][0]=141.4213562373095; c[4][1]=200.0; c[4][2]=223.60679774997897; c[4][3]=100.0; c[4][4]=1.7976931348623157E308; c[4][5]=297.81988930943544; c[5][0]=156.63604262201076; c[5][1]=219.25609608009617; c[5][2]=319.2543607976003; c[5][3]=377.5537017276938; c[5][4]=297.81988930943544; c[5][5]=1.7976931348623157E308; final ExpressionsBasedModel model = new ExpressionsBasedModel(); //DECISION VARIABLES final Variable[][] x = new Variable[n][n]; for(int i=0 ; i<n ; i++){ for(int j=0 ; j<n ; j++){ x[i][j] = Variable.make("x"+i+"_"+j).binary().weight(c[i][j]); model.addVariable(x[i][j]); } } final Variable[] u = new Variable[n]; for(int i=1 ; i<n ; i++){ u[i] = new Variable("u"+i); model.addVariable(u[i]); } //CONSTRAINTS //forall(i in cities) //flow_out: //sum(j in cities : i!=j) x[i][j]==1; for(int i=0 ; i<n ; i++){ final Expression constraint_line = model.addExpression("constraint_line"+i).lower(1).upper(1); for( int j=0 ; j<n ; j++){ if( i!=j) constraint_line.setLinearFactor(x[i][j], 1); } } //forall(j in cities) //flow_in: //sum(i in cities : i!=j) x[i][j]==1; for(int j=0 ; j<n ; j++){ final Expression constraint_column = model.addExpression("constraint_column"+j).lower(1).upper(1); for( int i=0 ; i<n ; i++){ if( i!=j) constraint_column.setLinearFactor(x[i][j], 1); } } //forall(i in cities: i>=1, j in cities: j>=1) //subroute: //u[i]-u[j]+n*x[i][j] <= n-1; for(int i=1 ; i<n ; i++){ for( int j=1 ; j<n ; j++){ if( i!=j ){ final Expression constraint_subroute = model.addExpression("constraint_subroute"+i+"_"+j).upper(n-1); constraint_subroute.setLinearFactor(u[i], 1); constraint_subroute.setLinearFactor(u[j], -1); constraint_subroute.setLinearFactor(x[i][j], n); } } } Optimisation.Result result = model.minimise(); System.out.print("u=\n\t "); for(int i=1 ; i<n ; i++) System.out.print(u[i].getValue().intValue()+" "); System.out.print("\nx=\n\t"); for(int i=0 ; i<n ; i++) System.out.print(i+" "); System.out.println(); for(int i=0 ; i<n ; i++){ System.out.print(i+"\t"); for(int j=0 ; j<n ; j++){ System.out.print(x[i][j].getValue().intValue() + " "); } System.out.println(); } System.out.println("\nResult = " + result); } } Next, I try to run the same code in the "On startup" section of the "Agent actions" of the "Main" agent in an AnyLogic model. (Click on the project name "Ojalgo" to change the location of ojalgo-40.0.0.jar, like in the attached file.) Unfortunately, the obtained result is not always 917.31, but also sometimes 1099.22 and 1161.84. I do not understand why the solution randomly changes. I also call Cplex from AnyLogic to solve this same problem, which always returns the optimal solution, hence the problem seems not to be due to AnyLogic. As shown by the above Java code, the problem is not due to Ojalgo as well, but only related to the coupling of AnyLogic and Ojalgo. Thank you very much for Ojalgo and your help! Best regards, Thierry Moyaux _______________ Thierry MOYAUX - Univ. de Lyon <http://www.universite-lyon.fr/>, INSA-Lyon <http://www.insa-lyon.fr/>, Dpt. Génie Industriel <http://gi.insa-lyon.fr/>, Labo. DISP <http://disp-lab.fr/fr/thierry-moyaux>. Tél. : (+33) 4 72 43 75 37 - Cell. : (+33) 6 83 93 69 42 - Agenda <https://zmail.insa-lyon.fr/home/thi...@in...?view=week&fmt=freebusy> |
From: Anders P. <an...@op...> - 2016-06-19 09:20:45
|
v40 is planned to be released within a couple of weeks. Just now released a new snapshot at SourceForge: https://sourceforge.net/projects/ojalgo/files/ojAlgo/snapshot/ v39.1.17 or the latest v40.0.0.0-SNAPSHOT is very close to what will be v40 |