Skip to content

Commit b2cb101

Browse files
committed
v2.10.150
1 parent 375f12a commit b2cb101

39 files changed

+3246
-2479
lines changed

examples/cp/basic/plant_location_with_kpis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
msol = mdl.solve(TimeLimit=10, trace_log=False) # Set trace_log=True to have a real-time view of the KPIs
114114
if msol:
115115
print(" Objective value: {}".format(msol.get_objective_values()[0]))
116-
if context.model.version >= '12.9':
116+
if compare_natural(context.model.version, '12.9') >= 0:
117117
print(" KPIs: {}".format(msol.get_kpis()))
118118
else:
119119
print(" No solution")

examples/cp/jupyter/SteelMill.ipynb

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"\n",
1212
"When you finish this tutorial, you'll have a foundational knowledge of _Prescriptive Analytics_.\n",
1313
"\n",
14-
">This notebook is part of the **[Prescriptive Analytics for Python](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)**\n",
15-
"\n",
16-
">It requires a **local installation of CPLEX Optimizers**. \n",
14+
">This notebook is part of **[Prescriptive Analytics for Python](http://ibmdecisionoptimization.github.io/docplex-doc/)**\n",
15+
">\n",
16+
">It requires either an [installation of CPLEX Optimizers](http://ibmdecisionoptimization.github.io/docplex-doc/getting_started.html) or it can be run on [IBM Watson Studio Cloud](https://www.ibm.com/cloud/watson-studio/>) (Sign up for a [free IBM Cloud account](https://dataplatform.cloud.ibm.com/registration/stepone?context=wdp&apps=all>)\n",
17+
"and you can start using Watson Studio Cloud right away).\n",
1718
"\n",
1819
"Table of contents:\n",
1920
"\n",
@@ -316,9 +317,7 @@
316317
{
317318
"cell_type": "code",
318319
"execution_count": null,
319-
"metadata": {
320-
"collapsed": false
321-
},
320+
"metadata": {},
322321
"outputs": [],
323322
"source": [
324323
"print(\"\\nSolving model....\")\n",
@@ -338,9 +337,7 @@
338337
{
339338
"cell_type": "code",
340339
"execution_count": null,
341-
"metadata": {
342-
"collapsed": false
343-
},
340+
"metadata": {},
344341
"outputs": [],
345342
"source": [
346343
"# Print solution\n",
@@ -374,7 +371,7 @@
374371
"#### References\n",
375372
"* [CPLEX Modeling for Python documentation](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)\n",
376373
"* [Decision Optimization on Cloud](https://developer.ibm.com/docloud/)\n",
377-
"* Need help with DOcplex or to report a bug? Please go [here](https://developer.ibm.com/answers/smartspace/docloud)\n",
374+
"* Need help with DOcplex or to report a bug? Please go [here](https://stackoverflow.com/questions/tagged/docplex)\n",
378375
"* Contact us at dofeedback@wwpdl.vnet.ibm.com"
379376
]
380377
},
@@ -388,23 +385,23 @@
388385
],
389386
"metadata": {
390387
"kernelspec": {
391-
"display_name": "Python 2",
388+
"display_name": "Python 3",
392389
"language": "python",
393-
"name": "python2"
390+
"name": "python3"
394391
},
395392
"language_info": {
396393
"codemirror_mode": {
397394
"name": "ipython",
398-
"version": 2
395+
"version": 3
399396
},
400397
"file_extension": ".py",
401398
"mimetype": "text/x-python",
402399
"name": "python",
403400
"nbconvert_exporter": "python",
404-
"pygments_lexer": "ipython2",
405-
"version": "2.7.11"
401+
"pygments_lexer": "ipython3",
402+
"version": "3.6.1"
406403
}
407404
},
408405
"nbformat": 4,
409-
"nbformat_minor": 0
406+
"nbformat_minor": 1
410407
}

examples/cp/jupyter/golomb_ruler.ipynb

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
"\n",
1111
"When you finish this tutorial, you'll have a foundational knowledge of _Prescriptive Analytics_.\n",
1212
"\n",
13-
">This notebook is part of the **[Prescriptive Analytics for Python](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)**\n",
14-
"\n",
15-
">It requires a **local installation of CPLEX Optimizers**. \n",
16-
"\n",
17-
"Discover us [here](https://developer.ibm.com/docloud)\n",
13+
">This notebook is part of **[Prescriptive Analytics for Python](http://ibmdecisionoptimization.github.io/docplex-doc/)**\n",
14+
">\n",
15+
">It requires either an [installation of CPLEX Optimizers](http://ibmdecisionoptimization.github.io/docplex-doc/getting_started.html) or it can be run on [IBM Watson Studio Cloud](https://www.ibm.com/cloud/watson-studio/>) (Sign up for a [free IBM Cloud account](https://dataplatform.cloud.ibm.com/registration/stepone?context=wdp&apps=all>)\n",
16+
"and you can start using Watson Studio Cloud right away).\n",
1817
"\n",
1918
"Table of contents:\n",
2019
"\n",
@@ -400,9 +399,7 @@
400399
{
401400
"cell_type": "code",
402401
"execution_count": null,
403-
"metadata": {
404-
"collapsed": false
405-
},
402+
"metadata": {},
406403
"outputs": [],
407404
"source": [
408405
"# Solve the model\n",
@@ -422,9 +419,7 @@
422419
{
423420
"cell_type": "code",
424421
"execution_count": null,
425-
"metadata": {
426-
"collapsed": false
427-
},
422+
"metadata": {},
428423
"outputs": [],
429424
"source": [
430425
"# Print solution\n",
@@ -444,9 +439,7 @@
444439
{
445440
"cell_type": "code",
446441
"execution_count": null,
447-
"metadata": {
448-
"collapsed": false
449-
},
442+
"metadata": {},
450443
"outputs": [],
451444
"source": [
452445
"# Print solution\n",
@@ -474,9 +467,7 @@
474467
{
475468
"cell_type": "code",
476469
"execution_count": null,
477-
"metadata": {
478-
"collapsed": false
479-
},
470+
"metadata": {},
480471
"outputs": [],
481472
"source": [
482473
"# Print solution as a ruler\n",
@@ -514,7 +505,7 @@
514505
"#### References\n",
515506
"* [CPLEX Modeling for Python documentation](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)\n",
516507
"* [Decision Optimization on Cloud](https://developer.ibm.com/docloud/)\n",
517-
"* Need help with DOcplex or to report a bug? Please go [here](https://developer.ibm.com/answers/smartspace/docloud)\n",
508+
"* Need help with DOcplex or to report a bug? Please go [here](https://stackoverflow.com/questions/tagged/docplex)\n",
518509
"* Contact us at dofeedback@wwpdl.vnet.ibm.com"
519510
]
520511
},
@@ -528,23 +519,23 @@
528519
],
529520
"metadata": {
530521
"kernelspec": {
531-
"display_name": "Python 2",
522+
"display_name": "Python 3",
532523
"language": "python",
533-
"name": "python2"
524+
"name": "python3"
534525
},
535526
"language_info": {
536527
"codemirror_mode": {
537528
"name": "ipython",
538-
"version": 2
529+
"version": 3
539530
},
540531
"file_extension": ".py",
541532
"mimetype": "text/x-python",
542533
"name": "python",
543534
"nbconvert_exporter": "python",
544-
"pygments_lexer": "ipython2",
545-
"version": "2.7.11"
535+
"pygments_lexer": "ipython3",
536+
"version": "3.6.1"
546537
}
547538
},
548539
"nbformat": 4,
549-
"nbformat_minor": 0
540+
"nbformat_minor": 1
550541
}

examples/cp/jupyter/house_building.ipynb

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"\n",
1313
"When you finish this tutorial, you'll have a foundational knowledge of _Prescriptive Analytics_.\n",
1414
"\n",
15-
">This notebook is part of the **[Prescriptive Analytics for Python](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)**\n",
15+
">This notebook is part of **[Prescriptive Analytics for Python](http://ibmdecisionoptimization.github.io/docplex-doc/)**\n",
16+
">\n",
17+
">It requires either an [installation of CPLEX Optimizers](http://ibmdecisionoptimization.github.io/docplex-doc/getting_started.html) or it can be run on [IBM Watson Studio Cloud](https://www.ibm.com/cloud/watson-studio/>) (Sign up for a [free IBM Cloud account](https://dataplatform.cloud.ibm.com/registration/stepone?context=wdp&apps=all>)\n",
18+
"and you can start using Watson Studio Cloud right away).\n",
1619
"\n",
17-
">It requires a **local installation of CPLEX Optimizers**. \n",
1820
"\n",
1921
"\n",
2022
"Table of contents:\n",
@@ -741,9 +743,7 @@
741743
{
742744
"cell_type": "code",
743745
"execution_count": null,
744-
"metadata": {
745-
"collapsed": false
746-
},
746+
"metadata": {},
747747
"outputs": [],
748748
"source": [
749749
"obj = mdl.sum([s.level * mdl.presence_of(wtasks[(h, s)]) for s in SKILLS for h in HOUSES])\n",
@@ -761,9 +761,7 @@
761761
{
762762
"cell_type": "code",
763763
"execution_count": null,
764-
"metadata": {
765-
"collapsed": false
766-
},
764+
"metadata": {},
767765
"outputs": [],
768766
"source": [
769767
"# Solve the model\n",
@@ -781,9 +779,7 @@
781779
{
782780
"cell_type": "code",
783781
"execution_count": null,
784-
"metadata": {
785-
"collapsed": false
786-
},
782+
"metadata": {},
787783
"outputs": [],
788784
"source": [
789785
"print(\"Solve status: \" + msol.get_solve_status())\n",
@@ -881,9 +877,7 @@
881877
{
882878
"cell_type": "code",
883879
"execution_count": null,
884-
"metadata": {
885-
"collapsed": false
886-
},
880+
"metadata": {},
887881
"outputs": [],
888882
"source": [
889883
"if msol and visu.is_visu_enabled():\n",
@@ -935,9 +929,7 @@
935929
{
936930
"cell_type": "code",
937931
"execution_count": null,
938-
"metadata": {
939-
"collapsed": false
940-
},
932+
"metadata": {},
941933
"outputs": [],
942934
"source": [
943935
"if msol and visu.is_visu_enabled():\n",
@@ -986,7 +978,7 @@
986978
"#### References\n",
987979
"* [CPLEX Modeling for Python documentation](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)\n",
988980
"* [Decision Optimization on Cloud](https://developer.ibm.com/docloud/)\n",
989-
"* Need help with DOcplex or to report a bug? Please go [here](https://developer.ibm.com/answers/smartspace/docloud)\n",
981+
"* Need help with DOcplex or to report a bug? Please go [here](https://stackoverflow.com/questions/tagged/docplex)\n",
990982
"* Contact us at dofeedback@wwpdl.vnet.ibm.com"
991983
]
992984
},
@@ -1000,23 +992,23 @@
1000992
],
1001993
"metadata": {
1002994
"kernelspec": {
1003-
"display_name": "Python 2",
995+
"display_name": "Python 3",
1004996
"language": "python",
1005-
"name": "python2"
997+
"name": "python3"
1006998
},
1007999
"language_info": {
10081000
"codemirror_mode": {
10091001
"name": "ipython",
1010-
"version": 2
1002+
"version": 3
10111003
},
10121004
"file_extension": ".py",
10131005
"mimetype": "text/x-python",
10141006
"name": "python",
10151007
"nbconvert_exporter": "python",
1016-
"pygments_lexer": "ipython2",
1017-
"version": "2.7.11"
1008+
"pygments_lexer": "ipython3",
1009+
"version": "3.6.1"
10181010
}
10191011
},
10201012
"nbformat": 4,
1021-
"nbformat_minor": 0
1013+
"nbformat_minor": 1
10221014
}

examples/cp/jupyter/n_queen.ipynb

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
"\n",
1212
"When you finish this tutorial, you'll have a foundational knowledge of _Prescriptive Analytics_.\n",
1313
"\n",
14-
">This notebook is part of the **[Prescriptive Analytics for Python](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)**\n",
14+
">This notebook is part of **[Prescriptive Analytics for Python](http://ibmdecisionoptimization.github.io/docplex-doc/)**\n",
15+
">\n",
16+
">It requires either an [installation of CPLEX Optimizers](http://ibmdecisionoptimization.github.io/docplex-doc/getting_started.html) or it can be run on [IBM Watson Studio Cloud](https://www.ibm.com/cloud/watson-studio/>) (Sign up for a [free IBM Cloud account](https://dataplatform.cloud.ibm.com/registration/stepone?context=wdp&apps=all>)\n",
17+
"and you can start using Watson Studio Cloud right away).\n",
1518
"\n",
16-
">It requires a **local installation of CPLEX Optimizers**. \n",
1719
"\n",
1820
"Table of contents:\n",
1921
"\n",
@@ -232,9 +234,7 @@
232234
{
233235
"cell_type": "code",
234236
"execution_count": null,
235-
"metadata": {
236-
"collapsed": false
237-
},
237+
"metadata": {},
238238
"outputs": [],
239239
"source": [
240240
"print(\"\\nSolving model....\")\n",
@@ -315,9 +315,7 @@
315315
{
316316
"cell_type": "code",
317317
"execution_count": null,
318-
"metadata": {
319-
"collapsed": false
320-
},
318+
"metadata": {},
321319
"outputs": [],
322320
"source": [
323321
"if msol: \n",
@@ -349,7 +347,7 @@
349347
"#### References\n",
350348
"* [CPLEX Modeling for Python documentation](https://rawgit.com/IBMDecisionOptimization/docplex-doc/master/docs/index.html)\n",
351349
"* [Decision Optimization on Cloud](https://developer.ibm.com/docloud/)\n",
352-
"* Need help with DOcplex or to report a bug? Please go [here](https://developer.ibm.com/answers/smartspace/docloud)\n",
350+
"* Need help with DOcplex or to report a bug? Please go [here](https://stackoverflow.com/questions/tagged/docplex)\n",
353351
"* Contact us at dofeedback@wwpdl.vnet.ibm.com"
354352
]
355353
},
@@ -359,27 +357,34 @@
359357
"source": [
360358
"Copyright © 2017, 2018 IBM. IPLA licensed Sample Materials."
361359
]
360+
},
361+
{
362+
"cell_type": "code",
363+
"execution_count": null,
364+
"metadata": {},
365+
"outputs": [],
366+
"source": []
362367
}
363368
],
364369
"metadata": {
365370
"kernelspec": {
366-
"display_name": "Python 2",
371+
"display_name": "Python 3",
367372
"language": "python",
368-
"name": "python2"
373+
"name": "python3"
369374
},
370375
"language_info": {
371376
"codemirror_mode": {
372377
"name": "ipython",
373-
"version": 2
378+
"version": 3
374379
},
375380
"file_extension": ".py",
376381
"mimetype": "text/x-python",
377382
"name": "python",
378383
"nbconvert_exporter": "python",
379-
"pygments_lexer": "ipython2",
380-
"version": "2.7.11"
384+
"pygments_lexer": "ipython3",
385+
"version": "3.6.1"
381386
}
382387
},
383388
"nbformat": 4,
384-
"nbformat_minor": 0
389+
"nbformat_minor": 1
385390
}

0 commit comments

Comments
 (0)