cyclic definition

189 views
Skip to first unread message

Mo

unread,
Oct 27, 2012, 11:11:26 AM10/27/12
to ai...@googlegroups.com
Hi,
 
I am trying to perform what-if analysis for my problem by incorporating the same steps as done in 'Power system Expansion' problem.
 
When I tried to insert the pivot table/table for Demand in Page Manager, the following error message flashed on the error tab:
 
Aimms detected a cyclic definition.  See message window for details.
      ScenarioPlans [definition] (0,0)
 
Could you please help explain this error and how to resolve this issue?
 
Thanks,
Mo.

Guido Diepen

unread,
Oct 29, 2012, 3:41:43 AM10/29/12
to ai...@googlegroups.com
Hi Mo,

as stated in the error, please see the message window in AIMMS for more information. You can open this message window via Menu > Window > Message window or alternatively by pressing the keyboard shortcut Ctrl-m

Probably you are using an identifier in the attributes of the identifier scenarioplans, which refers back again to the identifier scenarioplans. The message in the message window should provide you more information about this cycle.

Guido Diepen
AIMMS Specialist
Message has been deleted
Message has been deleted

Mo

unread,
Oct 30, 2012, 4:42:39 AM10/30/12
to ai...@googlegroups.com
Hi Guido,
 
Thanks! The issue got resolved when I reopened the software. However I find the Message Window helpful.
 
I have another question based on scenario analysis (or) what-if analysis from Power system expansion problem:
 
- Which part of the procedure performs the task of using the output of a scenario as input into the other scenarios? (Please see the procedure from powersysexp.prj)
 
        If not IsRunningAsViewer then
                  FixNewCapVariables;
                           NewCap(p).Nonvar := 1;
                           NewCapVarAreFixed := 1;

  
        for spl do
                  CurrentPlan := spl;
                  SetNewCapAsInCurrentPlan;
                          NewCap(p) := PlanNewCap(CurrentPlan,p);
        for s do
                  CurrentScenario := s;
                  SetInstDemAsInCurrentScenario;
                          InstDemand(k) := SPInstDemand(k,CurrentScenario);
                  SolveDet_PowerExpModel;
                         solve PowerExpModel;
                  CopyCurrentPlanSolInScenario;
                         PlanCapImportedInScenario(CurrentPlan,CurrentScenario) := CapImported;  //CapImported := sum(k, ImportCap(k) /$ DemandDuration(k))
                         PlanTotalCostsInScenario(CurrentPlan,CurrentScenario) := TotalCosts;

   
       endfor
       endfor;
 
                 UnfixNewcapVariables;
       else
 
                 DialogMessage("In the AIMMS Viewer, the SOLVE statement is disabled. Hence the solution is read from a case.");
                 CaseFind("Viewer Case", ACase);
                 CaseLoadCurrent(ACase,0);
       endif;
 
Would much appreciate your explanation.
 
Thanks,
Mo
 
___________________________________________________________________________________________________________________________________

Guido Diepen

unread,
Oct 30, 2012, 11:02:26 AM10/30/12
to ai...@googlegroups.com
Hi Mo,

did not take a detailed look into the model to answer your question. However, would like to point out that you can use the AIMMS Debugger to go step by step through the code. At each point, you can then check the values of all parameters/sets/variables and see what AIMMS does.

For more information about the AIMMS debugger, please see the AIMMS users guide.

Guido Diepen
AIMMS Specialist

Mo

unread,
Oct 31, 2012, 9:54:14 PM10/31/12
to ai...@googlegroups.com
Hi Guido,
 
I was able to figure it out using the debugger.
 
Thanks,
Mo.
Reply all
Reply to author
Forward
0 new messages