2021-03-25 13:16:17 +0200 | received badge | ● Popular Question (source) |
2013-12-17 13:30:08 +0200 | answered a question | Use os SOS2 in Linear Optimization When I am looking at documentation? I see there is solution for Piecewise in Sage, This Piecewise helped me to solve the problem, with accurate results. when I am passing a MixedIntegerLinearProgram variable I am getting the exception saying the value should be Integer. There is another thread where the results are wrong when doing minimization of the SOS2. http://ask.sagemath.org/question/3314... Need help in integrating a SOS2 or Piecewise model with MixedIntegerLinearProgram. |
2013-12-16 14:49:05 +0200 | answered a question | what type of object is a function defined with the piecewise command? Use lambda functions it worked for me. |
2013-12-13 09:58:06 +0200 | commented question | Output results of sage MixedIntegerLinearProgram solution are not as expected Yes, I am sure. I checked on paper and even with other LP solver LINDO. |
2013-12-12 16:01:29 +0200 | asked a question | Output results of sage MixedIntegerLinearProgram solution are not as expected For the problem below I am expecting the result to be 8136 but I am getting Can anyone help or explain why this is happening? |
2013-12-07 01:06:53 +0200 | asked a question | nameError: name MixedIntegerLinearProgram not defined Getting error in this file File Content as below in test.py --------------#!/usr/bin/sage -python from sage.all import * p = MixedIntegerLinearProgram() --------------------
after executing I am receiving the error Traceback (most recent call last): File "./test2.py", line 3, in <module> from sage.all import * File "/opt/sage/local/lib/python2.7/site-packages/sage/all.py", line 63, in <module> from sage.misc.all import * # takes a while File "/opt/sage/local/lib/python2.7/site-packages/sage/misc/all.py", line 60, in <module> from log import log_html, log_dvi, log_text File "/opt/sage/local/lib/python2.7/site-packages/sage/misc/log.py", line 64, in <module> import interpreter File "/opt/sage/local/lib/python2.7/site-packages/sage/misc/interpreter.py", line 67, in <module> import os, log, re, new, sys File "/home/bob/tank/new.py", line 18, in <module> problem = MixedIntegerLinearProgram(maximization=False, solver = "GLPK") NameError: name 'MixedIntegerLinearProgram' is not defined Can anyone help me in fixing this problem? |
2013-11-01 00:20:01 +0200 | asked a question | Use os SOS2 in Linear Optimization I have a linear optimization to minimize value like Where this f(x_i) is a SOS2 function: When I make individual MixedIntegerLinearProgram(maximization=False, solver = "GLPK") one for f(x), I am able to slove. When introducing the function as another variable into another MixedIntegerLinearProgram(maximization=False, solver = "GLPK") I am unable to get the results. Need help in actually formulating the sage equations. |