Search found 439 matches

by Renger
4 months ago
Forum: Syntax
Topic: MIP modelling
Replies: 1
Views: 298

Re: MIP modelling

Hi
If you want help, you have to more speficic (please read the guidelines of this forum on how to).
Cheers
Renger
by Renger
4 months ago
Forum: Syntax
Topic: Size of a Table
Replies: 2
Views: 314

Re: Size of a Table

Hi No, there is no command for that, however, you can find it out using some code: If the table is defined over known sets, you can do something like this: set i /i1*i4/, j /j1*j5/; parameter a(i,j); a(i,j) = uniform(0,1); parameter dimension; dimension("a","row") = sum(i,1); dimension("a","col") = ...
by Renger
4 months ago
Forum: Syntax
Topic: Problem with the OF when replacing =g= with =e=
Replies: 7
Views: 534

Re: Problem with the OF when replacing =g= with =e=

Hi Hard to say: your model is infeasible so it might have no solution with the specifications you give. The constraint 7 seems to be a problem. You should btw always check the model status in the solve summary: S O L V E S U M M A R Y MODEL loadflow OBJECTIVE OF TYPE LP DIRECTION MINIMIZE SOLVER CPL...
by Renger
4 months ago
Forum: Syntax
Topic: Problem with the OF when replacing =g= with =e=
Replies: 7
Views: 534

Re: Problem with the OF when replacing =g= with =e=

Hi If I run it with CPLEX, I get an infeasible model: Iteration log . . . Iteration: 1 Infeasibility = 16.858406 LP status(3): infeasible Cplex Time: 0.00sec (det. 0.02 ticks) Model has been proven infeasible. --- Restarting execution --- Reading solution for model loadflow *** Status: Normal comple...
by Renger
4 months ago
Forum: Syntax
Topic: Problem with the OF when replacing =g= with =e=
Replies: 7
Views: 534

Re: Problem with the OF when replacing =g= with =e=

Hi If I run your model with the equal sign, I get an infeasible solution as the constraint 7 is infeasible. Taking this constraint out leads to an optimal solution. Set =E= to =G= doesn't change the problem of infeasibility. So I don't know if you are running the same code. If you post code, put it ...
by Renger
4 months ago
Forum: Syntax
Topic: How to add up negative and positive numbers?
Replies: 3
Views: 309

Re: How to add up negative and positive numbers?

Hi
Search in this forum for "absolute value" and you will find 8 pages with hits (not all relevant).
Cheers
Renger
by Renger
4 months ago
Forum: Syntax
Topic: Least Squares Notation
Replies: 1
Views: 193

Re: Least Squares Notation

Hi
The 'x' and 'y' are just the column headings for a table with the x and y values.

Code: Select all

set o Observations /o1*o12/;

table data(o,*) Table with data
      	x     	y
ob1 	1     	2
ob2 	2     	3.9
...
Your example looks fine.
Cheers
Renger
by Renger
4 months ago
Forum: Modeling
Topic: Error 142 suffix is not allowed
Replies: 6
Views: 1373

Re: Error 142 suffix is not allowed

Hi It might be the following problem: If you scale, you should scale all parameters in a consistent way. Not just one. For example if you had an equation like VARX * parB =E= parC; you should not only scale parB but also parC. If you have infeasibilities, either you still have problems in your equat...
by Renger
4 months ago
Forum: Modeling
Topic: Complement of set
Replies: 1
Views: 192

Re: Complement of set

Hi Yes this is possible as follows set all 'Overall set' /i1*i10/, s1(all) 'Subset of overall set' /i1,i2, i9,i10/, s2(all) 'Complement set'; s2(all)$(not s1(all)) = YES; display s2; gives the following ---- 7 SET s2 Complement set i3, i4, i5, i6, i7, i8 I hope this helps Renger