Hello, I have a linear integer programm in Cplex, and I have to test it with several instances, I need to generate random instances. I want to generate integer number in CPLEX and memorise them in a table, how can i do it? I must use randomseed in the file ".dat" where i have to define the value of my table with this random generated numbers or in the file ".mod" where i have to declare my table? How to use this function? or there is another function more adequat to my request? Thanks for your answer!

asked 21 Jan '16, 03:53

sanabou's gravatar image

sanabou
112
accept rate: 0%

retagged 03 Feb '16, 09:52

Rob%20Pratt's gravatar image

Rob Pratt
1.2k26

1

im not sure i understand your question but this must be normally done before calling cplex. so, use the function to generate random numbers in the respective language that you use to write the model. For AMPL, this link might be useful http://ampl.com/BOOK/CHAPTERS/10-params.pdf

(21 Jan '16, 10:04) crypto

thanks a lot for your answer, surely this link will be helpful for me.

(21 Jan '16, 10:18) sanabou

Hi, actually I cannot work with Cplex, But I suggest you to use CVX-Solver (based on matlab) I bileave CVX is a best solver for LP, and you can easily use randi function in matlab. CVX is available in cvxr.com

link

answered 25 Jan '16, 05:28

saeed's gravatar image

saeed
111
accept rate: 0%

As far as I known, CVX is not a solver? As I understand it, it is a modelling system using the MATLAB solvers for optimizing convex optimization problems. According to the Mittelmann benchmarks MATLAB is about 10 times slower on LPs compared to CPLEX and Gurobi.

(26 Jan '16, 03:07) Sune
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×231
×191
×14

Asked: 21 Jan '16, 03:53

Seen: 1,008 times

Last updated: 03 Feb '16, 09:52

OR-Exchange! Your site for questions, answers, and announcements about operations research.